Commit Graph

142 Commits

Author SHA1 Message Date
HAMANO Tsukasa 638a69a2ab MD: add and read msroots file 2017-03-20 23:05:09 +01:00
Frank Morgner e7f118d797 config: added disable_popups for internal UI
closes #916
2016-12-18 12:38:28 +01:00
Frank Morgner 9983c4185f fixed incompatible types ('DWORD *' to 'size_t *') 2016-06-14 14:11:26 +02:00
Jakub Jelen ae47e06d57 Typos 2016-05-16 10:58:22 +02:00
Viktor Tarasov 09cbcd80f4 md: use register to enable debug log 2016-04-17 12:43:27 +02:00
Viktor Tarasov 89a5b5893b md: use GUID without frame 2016-04-08 11:02:53 +02:00
Viktor Tarasov 5bbc86eb39 md: replace card specific with pkcs15 'aux-data' facilities 2016-04-08 11:02:53 +02:00
vletoux 57e05d3359 minidriver: use sc_logout for CardDeauthenticate 2015-12-12 02:28:01 +01:00
Frank Morgner 0ca46910f7 use tabs only for indenting 2015-10-16 09:58:01 +02:00
vletoux 35175a814c minidriver: fix according to frank's comments 2015-10-15 22:40:36 +02:00
vletoux fed64b0636 minidriver: fixes according to Frank's comments 2015-10-14 22:48:41 +02:00
vletoux 75d76f5ce4 Merge branch 'master' of https://github.com/OpenSC/OpenSC into OpenSC-master
Conflicts:
	src/minidriver/minidriver.c
2015-10-14 22:22:19 +02:00
vletoux 747678c83d minidriver: remove unnecessary logs on console (certutil -scinfo) 2015-10-11 18:51:36 +02:00
vletoux b968fcfb1f minidriver: Windows x509 enrollment works
Removed cmap_record in sc_pkcs15_prkey_info (not used by any driver nor code)
Remove cardcf specific code (cardcf neutralized by CP_CACHE_MODE_NO_CACHE and it maintened by the Base CSP/KSP, not the minidriver)
Add conversion code for Windows GUID / OpenSC self computed GUID
2015-10-11 15:20:04 +02:00
vletoux bee1a450c9 minidriver: modified configuration functions 2015-10-11 10:39:02 +02:00
vletoux 7551baafbd minidriver: add crt secure functions (*_s) 2015-10-10 22:07:49 +02:00
vletoux ebfb76d311 minidriver: fix library import for guid & one compilation warning 2015-10-10 19:01:14 +02:00
vletoux 8f4420cb78 minidriver: factorize container naming code 2015-10-10 15:39:27 +02:00
vletoux 227f48d7b0 minidriver: replace one sprintf by sprintf_s 2015-10-10 14:15:23 +02:00
Frank Morgner a6b36507a3 removed unused parent in md directory/file 2015-10-06 22:49:32 +02:00
Frank Morgner d18ddcb446 fixed accessing fixed size md file/directory name 2015-10-06 22:49:16 +02:00
Frank Morgner 6c61bf6815 fixed accessing fixed size guid 2015-10-06 22:49:16 +02:00
vletoux 811a86e72a fix: set the container name as the id if md_guid_as_label is set 2015-10-04 19:49:31 +02:00
Frank Morgner c56fe19b31 minidriver.c: fixed accessing label in sc_pkcs15_object_t 2015-10-04 17:33:14 +02:00
vletoux c3f2cb142f fix "use guid as label"
Allow to use as pkcs15 label the windows container name (max: 39 characters)
2015-10-03 18:59:52 +02:00
vletoux b667645797 fix compilation warning 2015-10-03 18:56:19 +02:00
vletoux a9897f9956 First implementation of CardDeleteContainer
Container now can be created, deleted, in short, a read write card
2015-09-30 22:52:37 +02:00
vletoux 67740fb955 quality improvement of CardDeriveKey 2015-09-30 22:49:41 +02:00
vletoux 9a590d64e4 do not reset the authentication state before each operation 2015-09-30 22:47:16 +02:00
vletoux c00f9830ba force recompilation on integration plateforms 2015-09-25 22:56:26 +02:00
vletoux 6cbeea3942 First ECC support for the minidriver 2015-09-25 22:22:29 +02:00
Andreas Kemnade 6a6ef61d1a some more error checks in minidriver in regards to card ejects 2015-05-13 10:11:05 +02:00
Viktor Tarasov 72b5d8fe9a md: use 'store-or-update' store certificate mode 2015-05-10 15:04:44 +02:00
vletoux 8ec000e80d minidriver: change the icon of the pinpad dialog 2015-05-10 15:04:44 +02:00
vletoux ac82a96ccc minidriver: add my name in the author list
setup: change the url to match the new one
2015-05-10 15:04:44 +02:00
vletoux aede9b164b minidriver: fix compilation warnings on x64 (size_t <> DWORD) 2015-05-10 15:04:44 +02:00
vletoux 33cf161941 minidriver: pinpad authentication is now working for smart card logon !!! (still needs 5 pinpad entries)
minidriver: minor fixes
2015-05-10 15:04:41 +02:00
vletoux 6127fe6b77 minidriver: change the UI (remplace a messagebox by a nice dialog) ; add a translation function for errors 2015-05-10 15:04:41 +02:00
vletoux 7d225e28f7 minidriver: add support for the special msroot file which contains the root certificates stored on the card. 2015-05-10 15:04:41 +02:00
vletoux 6b58b1db01 minidriver: merge CardUnblockPin and CardChangeAuthenticator into CardChangeAuthenticatorEx 2015-05-10 15:04:41 +02:00
vletoux a671cf8fe2 CardAuthenticateEx: test for remaining attempts before ... 2015-05-10 15:04:41 +02:00
vletoux 659da4f538 minidriver: CardSignData - better parameter checking 2015-05-10 15:04:41 +02:00
vletoux f3c9525137 fix attempt remaining regression if the card is blocked 2015-05-10 15:04:40 +02:00
vletoux d96e53b102 minidriver: better error code if CARD_PIN_SILENT_CONTEXT is set 2015-05-10 15:04:40 +02:00
vletoux ad47d4d043 minidriver:
* factorize the code from CardAuthenticatePIN into CardAuthenticateEx
* allows authentication with the PINPAD without a UI

minidriver: fix some code analysis warnings
2015-05-10 15:04:36 +02:00
vletoux 8062eac145 minidriver: fix CardQueryCapabilities and CardGetProperty fKeyGen flag. A read only card cannot generate keys 2015-05-10 15:04:36 +02:00
vletoux f331b35c4e minidriver: make the parameter check be aware of pinpad capabilities 2015-05-10 15:04:36 +02:00
vletoux a5593afc78 minidriver: better parameter checking with CardQueryKeySizes and CardGetContainerProperty 2015-05-10 15:04:36 +02:00
vletoux 1e78e16e65 fix memory leak in minidriver: the virtual filesystem is never freed and in some case when an error occurs 2015-05-10 15:04:35 +02:00
vletoux 8036388f29 minidriver PINPAD: fix a regression issue (the parameter - message - can be set to null)
Improve the error code when the user cancel the operation ("The operation was canceled by the user" instead of "invalid parameter")

Signed-off-by: vletoux <vincent.letoux@gmail.com>
2015-05-10 15:04:35 +02:00
vletoux cb38657d47 CardSignData: add support for missing hash algorithm 2015-05-10 15:04:35 +02:00
vletoux c5efcae029 CardRSADecrypt: better parameter checking
CardRSADecrypt & CardSignData: better OpenSC -> minidriver error code translation
2015-05-10 15:04:28 +02:00
vletoux 9544844d83 CardSignData: better error message if the card do not support the signing operation with the algorithm
(replace the return code from internal error to unsupported)
2015-05-10 14:35:42 +02:00
vletoux 54f462368b Fix CardSignData "invalid signature" bug when called from CryptSignHash(CRYPT_NOHASHOID) 2015-05-10 14:35:42 +02:00
vletoux 6aaf9d462c fix a problem: CardDeauthenticate(ex) do nothing, but the base CSP think that the user is deauthenticate from the card.
The user is still authenticated !
2015-05-10 14:35:41 +02:00
vletoux b7f000d6b8 add parameter checking for CardSignData 2015-05-10 14:35:41 +02:00
vletoux 2667394f22 better parameter checks for CardGetProperty and CardSetProperty
Added value for secure key injection (to reject it properly because it is not implemented)
2015-05-10 14:35:41 +02:00
vletoux 6a2e9aa3b6 Merge branch 'upstream/master'
Conflicts:
	src/libopensc/card-openpgp.c
	src/libopensc/pkcs15-gemsafeV1.c
	src/pkcs11/mechanism.c
2015-05-10 14:35:41 +02:00
vletoux 5007e9fc9f md: fix build without OPENSSL_VERSION_NUMBER
Fix the WCHAR / CHAR conversion problem in CardAuthenticateEx in case of PinPAD (vs->wzPinContext is UNICODE)
Fix UNICODE compilation problem( MessageBoxA instead of MessageBox)
2015-03-29 13:59:21 +02:00
Viktor Tarasov e41d94ca1a md: fix return code in 'CardGetContainerInfo' 2014-05-13 18:34:18 +02:00
Viktor Tarasov dd5115bc02 pkcs15: use 'direct' public key value
pkcs15: in pubkey-info data
 * introduced new 'direct' 'raw' and 'spki' members
 * removed 'encoded der data' member
 * in 'read-public-key' try firstly SPKI direct value

pkcs11:
'direct' data used when getting CKA_VALUE attribute of public key

pkcs15init:
 * initialize 'raw' and 'spki' direct public key value
2014-02-09 18:49:58 +01:00
Viktor Tarasov 3f023d3342 pkcs15: PIN value not validated in pkcs15-verify
In pkcs15-verify the value of PIN is not more validated for conformity with PIN policy,
value is only checked for maximal allowed length.

So that, no more need of 'ignore-pin-length' configuration option - now it's default behavior of common framework.
2014-01-19 19:19:17 +01:00
Viktor Tarasov 1d45eea907 md: implement 'CardChangeAuthenticator' 2013-12-29 22:00:29 +01:00
Viktor Tarasov f72c6fe625 md: implement CardUnblockPin 2013-12-29 22:00:28 +01:00
Viktor Tarasov 1dc5a26a8d md: implement CardGetChallenge 2013-12-29 22:00:28 +01:00
Viktor Tarasov 5564b9973b md: when PIN blocked ensure that 0 returned as "tries left" 2013-12-29 22:00:28 +01:00
Viktor Tarasov 89523a99ce md: use "ignore PIN length" configuration option
With this option in 'true' the short PINs will not be ignored by
pkcs#15 framework and applied to card
2013-12-29 22:00:28 +01:00
Viktor Tarasov 075ff22890 md: generic procedure to get bool config option 2013-12-29 20:05:35 +01:00
Viktor Tarasov aaa4489b7f md: configuration options to refuse create-container mechanism
used rather for the debug -- allows to refuse, for example,
'key-import' create container mechanism and to compel the application (IE)
to generate key on card (rather then generate key by soft and then import it onto card).
2013-12-29 20:05:35 +01:00
Viktor Tarasov f7a9ac90e8 md: config option 'use GUID as crypto object's label' 2013-12-29 20:05:35 +01:00
Viktor Tarasov f71e241f03 md: config option 'GUID as ID'
allows to set the container's GUID value as ID of the key and certificate PKCS#15 objects.
2013-12-29 20:05:35 +01:00
Viktor Tarasov 692791e8ed md: set length of container GUID 2013-12-29 20:05:35 +01:00
Viktor Tarasov 0dc39c1125 pkcs15: use value/length pair to hold the object's GUID
GUID can be presented by non-printable string
2013-12-29 19:47:42 +01:00
Viktor Tarasov 98325ab7f2 pkcs15: export 'sc_pkcs15_serialize_guid' ...
change name of exported 'sc_pkcs15_get_guid' to 'sc_pkcs15_get_object_guid' ;
add more 'CALLED' and 'RETURN' macros ;
2013-12-29 19:46:56 +01:00
Viktor Tarasov 3140c6c43b md: use, if available, internal cardcf data 2013-12-29 19:46:56 +01:00
Viktor Tarasov 411cbfb403 md: use if available the GUID from the prkey info ...
the proprietary on-card data can contain the GUIDs created by proprietary MW,
these data are parsed by card driver and put into the internal pkcs15 private key data
to be accesible in the different OpenSC frameworks
2013-12-29 19:46:56 +01:00
Viktor Tarasov e855ac800e pkcs15: introduce 'cmap-record' data into the private key info
existing  'guid' obejct's data replaced by the one in private-key info
New CMAP record data used by pkcs15init emulator for the cards that have
the MD specific on-card data
2013-12-29 19:46:30 +01:00
Viktor Tarasov f641ebd248 fixed errors reported by cppcheck: part 1
partially applied the pull request #182 from Frank Morgner -- updated the common frameworks source files
2013-09-29 20:28:45 +02:00
Tim Taylor 2741f23641 Set output buffer len variable if padding removed. 2013-09-29 19:14:01 +02:00
Tim Taylor cd1116ac7c Use reader pin pad if available and allowed 2013-09-29 19:08:51 +02:00
Tim Taylor b731dac518 Reset return code to success if pubkey read from cert. 2013-09-29 18:31:33 +02:00
Viktor Tarasov e1da77e253 md: fix length of stripped data in RSADecrypt 2013-05-27 16:25:25 +02:00
Viktor Tarasov df9a4d0b2c pkcs15: for 'sc_pkcs15_cer's data use the 'der' object type
To hold the raw certificate blob in 'sc_pkcs15_cert' data use the 'sc_pkcs15_der' data type.
also:
; in 'pkcs15-cert.c' use short call of the debug messages;
; in 'destroy-object' pkcs15 framework handler take into account the multi-application cards:
-- when binding card use the application info;
-- when finalizing profile use the application ID.
2012-09-30 22:54:52 +02:00
Andreas Schwier cb46192d89 minidriver: Added support for ASCII encoded serial numbers 2012-08-23 22:06:01 +02:00
Viktor Tarasov 7819e5ab89 minidriver: 'write' mode
Picked from SM branch of OpenSC, where it was tested mostrly with IAS/ECC card.
Also was used with rutoken and other cards.
2012-05-31 17:21:21 +02:00
Viktor Tarasov 177af40535 md: prototype of sc_pkcs15_get_guid() has been changed
introduced 'flags' parameter
2012-05-30 09:18:03 +02:00
vtarasov f0ab932031 minidriver: 'PinObject-info' data type is changed for the 'AuthenticatioObject-info' data type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5554 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 17:03:23 +00:00
vtarasov a045543cc1 minidriver: unused variable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5514 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-29 11:50:13 +00:00
vtarasov 319cb6f071 minidriver: when reading 'cardid' file return the content of 'cardid' file ...
'cardid' size is 16 bytes.
It's initialized by the 'empty-cardid' value (00-0F) overwritten (from left) by the last 16 (or less) bytes
of the card's serial.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5513 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-29 11:48:50 +00:00
vtarasov 07e0af59b0 minidriver: in CardAuthenticatePin() the PIN to verify is selected by ROLE_USER, thanks to HOURY William
http://www.opensc-project.org/pipermail/opensc-devel/2011-May/016633.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5436 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-11 16:52:13 +00:00
vtarasov 1176c59370 libopensc: export the wrapper for the internal log function dedicated to minidriver
http://www.opensc-project.org/pipermail/opensc-commits/2011-May/011049.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5430 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-08 08:07:03 +00:00
martin 44cf3d06ae MiniDriver: rename cardmod to minidriver in source.
Also change some grammar, whitespace (reported by git) and wording (Opensc->OpenSC) issues.
Add some comments here and there.

See http://www.opensc-project.org/pipermail/opensc-devel/2011-April/016261.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5329 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 07:40:12 +00:00