Commit Graph

21 Commits

Author SHA1 Message Date
Frank Morgner 24b50a4277 replace sc_debug with sc_log 2018-12-06 09:26:42 +01:00
Andreas Schwier 69eaa66e83 sc-hsm: Fix #698 2016-03-02 14:20:51 +01:00
Andreas Schwier 0caf0d1dd6 sc-hsm: Add missing include introduced by #580 2015-10-29 14:09:01 +01:00
Frank Morgner f9cd1fc476 fixed accessing fixed size cvc members 2015-10-04 17:53:51 +02:00
Viktor Tarasov fa923831f8 introduce EC curve OID into algorithm info data
needed to store information about EC curve supported by card.
Primary usage is when importing/generating key to get know if particular curve is supported by card.
2015-02-20 13:49:18 +01:00
Frank Morgner 77752f442d fixed unused value 2015-01-28 05:47:20 +01:00
Andreas Schwier d014056f1d sc-hsm: Add support for Koblitz curves secp192k1 and secp256k1 (Bitcoin) 2014-11-04 17:11:34 +01:00
Andreas Schwier 7db99500a0 sc-hsm: Fix certificate delete bug
If a certificate is deleted after the related private key, then the driver
picks the wrong certificate EF, leading to an CKR_GENERAL_ERROR or the wrong
certificate being deleted.
2014-09-07 23:10:48 +02:00
Andreas Schwier f9b8b2c220 sc-hsm: Added error if private key import tried
Private key import is not supported by the SmartCard-HSM. However there is no error code
if it is still tried using pkcs15-init or from within Firefox.
2014-09-07 23:10:48 +02:00
Viktor Tarasov 2f8fc498ae sc-hsm: emu: initialize EC key params
;fix EC parameters for the emulated public keys
;add 'sc-context' argument in some function prototypes
2014-02-09 18:49:58 +01:00
Andreas Schwier 67dc60f707 sc-hsm: Added support for persistent EC public keys generated from certificate signing requests 2014-01-09 21:41:12 +01:00
Andreas Schwier 9e54756e1b sc-hsm: Added support to unblock PIN using C_InitPIN() 2014-01-08 19:32:53 +01:00
Andreas Schwier d4be8ec747 sc_pkcs15_encode_pubkey_as_spki replaces sc_pkcs15_encode_pubkey_with_param.
The name implies what the format of the returned value, a SPKI.

The support for spki as a pkcs15 format of a pubkey, is extended to
work for any algorithm not just EC pubkeys. PKCS#15 appears to allow this.

sc_pkcs15_decode_pubkey_with_param will look for a SPKI
and attempt to use it for any algorithm, including RSA.
(RSA is the null case, as there are no algorithm parameters.)

sc_pkcs15_encode_pubkey_as_spki is exported from libopensc.

pkcs15-piv.c will use sc_pkcs15_encode_pubkey_as_spki to load public keys
as SPKI for RSA and EC.

The pubkey->data is never a SPKI, it is the DER encoding of the
pubkey without the parameters.  If an spki is needed, use the
sc_pkcs15_encode_pubkey_as_spki to get the DER encoding of the spki.

As in the previous set of patches, pkcs15-tool.c will output both
sc_pkcs15_decode_pubkey_with_param and its internal.
This was left for testing, and the pubkey_pem_encode should be deleted
2013-12-06 09:23:57 +01:00
Andreas Schwier 3a6e7ba959 pkcs15: Changed encoding for EC public keys in PuKDF to SPKI rather than ECPoint, preserving domain parameter 2013-11-15 11:41:10 +01:00
Andreas Schwier 633c98e9ee sc-hsm: Removed compiler warning 2013-11-15 11:41:10 +01:00
Frank Morgner d21830344f fixed a ton of compiler warnings 2013-08-03 19:15:55 +02:00
Frank Morgner e3649fb7de fixed even more compiler warnings 2013-08-02 15:43:25 +02:00
Andreas Schwier b34d916e60 sc-hsm: Fixed problem deleting CA certificates
sc-hsm: Fixed public key format returned when generating ECC keys
2013-02-15 15:02:28 +01:00
Andreas Schwier bbbfae4bf0 sc-hsm: Now saving the internal CSR in place of the certificate and decoding the public key at initialization (RSA only) 2012-11-20 08:46:27 +01:00
Andreas Schwier ffb20e5916 sc-hsm: Added sc-hsm-tool with DKEK support and key wrap / unwrap 2012-11-11 12:53:03 +01:00
Andreas Schwier 72786abe1f sc-hsm: Added write support for RSA and ECC keys, certificates and data objects 2012-10-01 13:09:02 +02:00