Commit Graph

5808 Commits

Author SHA1 Message Date
vletoux 0b683472b0 win32 setup: add basic minidriver card registration and unregistration via a custom action 2015-05-10 15:04:44 +02:00
vletoux 9e07a75968 detect the wix components installed on the build machine 2015-05-10 15:04:44 +02:00
vletoux 5a1ca44c11 custom action skeleton (without actions) - help welcome ... 2015-05-10 15:04:44 +02:00
vletoux 017d98f87f trying to fix image path when compiling 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 9601041f75 win32 setup:
* change the default wix background image (aka brand the setup)
* add the missing ARPCONTACT property
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
Viktor Tarasov e0aec3764a pkcs15init: 'store-or-update' certificate option 2015-05-10 14:35:41 +02:00
Viktor Tarasov 3cf56d8fb7 pkcs15init: fix non-unique-ID control 2015-05-10 14:35:41 +02:00
vletoux f154cdcaa4 pkcs15-pin: sc_pkcs15_unblock_pin: avoid to ask the PUK twice 2015-05-08 22:37:04 +02:00
Viktor Tarasov 3e0356b170 register CKM_ECDSA and CKM_ECDSA_SHA1 depending on card capabilities
fix #429
2015-05-08 20:45:56 +02:00
Philip Wendland 254320e34c myeid: seperate ECC from RSA flags
Should keep the existing behavior, but improve readability.
2015-05-08 20:45:37 +02:00
Philip Wendland 4142456c74 PIV, sc-hsm, myeid: register ECDH card capabilites
Prior to 066132327c71300188aa66180fde2fb3d90c5140, CKM_ECDH1_DERIVE and
CKM_ECDH1_COFACTOR_DERIVE were always registered for cards that support
SC_ALGORITHM_ECDSA_RAW.
The mentioned commit changed this behavior, so that the ECDH mechanisms
are only registered for cards that set the SC_ALGORITHM_ECDH_CDH_RAW
capability flag.
To keep the existing behavior for the cards, they need to set this flag
in the card driver.
2015-05-08 20:45:37 +02:00
Philip Wendland 78e434da93 register EC mechanisms with flags independent of RSA flags
Prior to this commit, all hashes registered for RSA or other key types were
registered for ECDSA as well.

register ECDH mechanism only when supported by card

ECDH should only be registered if the card driver sets the
SC_ALGORITHM_ECDH_CDH_RAW flag.

register software PKCS#1 (1.5) padding only when RAW RSA is supported by card

If OpenSC supports PSS/OAEP padding or other padding mechanisms in
future, and there would be a card that enforces hardware PSS/OAEP
padding, the PKCS#1 v1.5 padding mechanism should not be registered.
2015-05-08 20:45:27 +02:00
Philip Wendland 37b6f0bbdf IsoApplet: fix EC mechanism ext_flag 2015-05-08 20:19:36 +02:00
Hector Sanjuan fd3d07a884 Issue #451: Newer DNIe not working with OpenSC.
This patch fixes 3 issues which consecutively have shown up when debugging the original problem:

1 - Newer DNIe report a byte count for public certificates which is the compressed size,
while older DNIe report the uncompressed size. This resulted in short-reading the x509 certificates,
and in an error parsing. Therefore, during initialization we proceed to set path->count for
public certificates to -1. This ensures that the lenght of the certificates for reading
will be set to file-> length, which has the correct size.

2 - pkcs11-tool -t was broken for DNIe (old and new)as it tried to strip pcks11 padding
from the data to sign and OpenSC tried signatures with non-padded data
(as the card had SC_ALGORITHM_RSA_RAW).
The new algoflags (SC_ALGORITHM_RSA_HASH_NONE | SC_ALGORITHM_RSA_PAD_PKCS1) and the
removal of the strip-padding call fix the issue.

3 - The new cards won't allow setting the LE bytes when calculating the TLV, when LE equals
256. This caused an wrong SM object error response (0x69 0x88). Therefore,
we don't send the LE bytes anymore in this case.

The patch has been tested to work on the new problematic card and on another old one.

close #451
2015-05-08 09:17:01 +02:00
Frank Morgner ef4edb74ba fixed invalid free
We duplicate mechanisms based on OpenSSL so that they can be freed along
all the card's algorithms created via sc_pkcs11_new_fw_mechanism. Fixes
regression from eaf548aa3dab80a9bbf51da8291e7db978e3a2ad
2015-05-08 09:11:55 +02:00
Frank Morgner e338b7c1ab framework-pkcs15: fixed memory leak when encoding pubkey 2015-05-08 09:11:55 +02:00
Frank Morgner e84951a5bf fix resource leaks in while registering PKCS#11 mechanisms
introduces a free_mech_data for sc_pkcs11_mechanism_type_t to clear the
mechanisms private memory
2015-05-08 09:11:55 +02:00
Frank Morgner 2c32575e89 pkcs11-tool: fixed resource leak 2015-05-08 09:11:55 +02:00
Frank Morgner ecc9b9dac9 openssl: fixed resource leak 2015-05-08 09:11:55 +02:00
Frank Morgner 8838388ceb pkcs15-infocamere: fixed resource leak 2015-05-08 09:11:55 +02:00
Frank Morgner bbb803ff2e sc-hsm-tool: fixed resource leak 2015-05-08 09:11:54 +02:00
Frank Morgner d96f25c147 pkcs15-tool: fixed resource leak 2015-05-08 09:11:54 +02:00
Frank Morgner 1f16f24052 pkcs15-init: fixed resource leak 2015-05-08 09:11:54 +02:00
Frank Morgner a83da8a947 pkcs15-crypt: fixed resource leak 2015-05-08 09:11:54 +02:00
Frank Morgner c65caed7f4 openpgp-tool: fixed resource leak
VTA: slightly touched, original commit f0ddbf4
2015-05-08 09:11:54 +02:00
Frank Morgner b0a708b0bb pintest: fixed resource leak 2015-05-08 09:11:54 +02:00
Frank Morgner efbd4068af sm-cwa14890: fixed resource leak 2015-05-08 09:11:54 +02:00
Frank Morgner 01e573b987 profile: fixed resource leak 2015-05-08 09:11:54 +02:00