Commit Graph

62 Commits

Author SHA1 Message Date
aj 9946e237de Douglas E. Engert:
Major improvments in the PIV card modules: 
* OpenSC-0.11.2 only supported RSA 1K keys, the patch supports RSA 2K and 3K
  keys.
* The FASC-N in the CHUID object is used as the card serial number. 
* A PIV card may have additional objects. These can now be read by pkcs11-tool
  and pkcs15-tool. 
* The p15card-helper.c module is no longer used. The code to call the
  sc_pkcs15emu_* routines has been moved back into pkcs15-piv.c and uses
  existing OpenSC routines to parse the certificate to find the modulus_len. 
* pkcs15-piv.c will now get the modulus_len from the certificates to store into
  the emulated prvkey an pubkey objects as they are being created using the
  sc_pkcs15emu_* routines. 
* The caching code that was added to card-piv.c in 0.11.2 is disabled, as
  pkcs15-piv.c will cache the certificate using existing OpenSC routines. 
* piv-tool will now print a serial number. 
* The key-usage bits for prvkey and pubkey objects are set in pkcs15-piv.c 
* The PIV "9E" key was added. It is not a private object, and can be used
  without a PIN. It is used with the "Certificate for Card Authenticaiton". 
* When used with the OpenSSL engine to generate a certificate request, the
  public key saved by piv-tool during a "generate asymmetric key pair" card
  command can be read from a file pointed at by the environment variable
  PIV_9*_KEY. Where * is A, C, D or E. 
* In the card_atr section of opensc.conf, flags = 20; can be used to only show
  the PIV Authentication cert. This feature was in 0.11.1 but was dropped in
  0.11.2 when the p15card-helper.c was introduced.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3174 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 07:07:49 +00:00
aj eab8ade2ec changes by Douglas E. Engert:
change the do_decompress* to sc_decompress* and the initialize_* to
sc_pkcs15emu_initialize_* in the new code.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3126 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-12 20:15:39 +00:00
aj c6954a9c33 full piv update by Thomas harning Jr. and David E. Engert,
adding compression etc. Also enables opensc to be compiled
with and without zlib support.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3125 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-10 10:46:32 +00:00
nils 42ad6be451 win build fixes; patch supplied by Douglas E. Engert <deengert@anl.gov>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3003 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-02 19:31:34 +00:00
ludovic.rousseau 126593aa01 - use strlcpy() instead of strncpy() to always have a terminating
NUL-byte

- use sizeof(field) instead of SC_PKCS15_MAX_LABEL_SIZE-1 or equivalent as
  the 3rd argument of strlcpy()


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2993 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-12 08:12:38 +00:00
aj 0f64e9d3f1 make objects on piv card public.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2957 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-20 16:06:42 +00:00
aj 77ce30fe26 Douglas E. Engert:
removes the private bit on the pubkey. Without this change the openssl req with engine can not be used to generate a certificate request, as it will not be 
able to find the public key that should have been saved by the piv-tool when 
the private key was generated on the card.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2951 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-12 20:03:45 +00:00
aj d78f5ad5c2 piv fixes by Douglas E. Engert.
This patch will allow a flag in the opensc.conf file to be set to
only expose the PIV authentication certificate and matching keys.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2938 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-04 06:50:56 +00:00
nils 3b25ca27e9 remove useless code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2865 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-02 16:17:05 +00:00
nils b2d4d6a9bc NIST 800-73-1 certs aren't protected by a pin anymore; patch supplied by Douglas E. Engert <deengert@anl.gov>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2853 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-23 08:10:07 +00:00
nils 149b5cf187 use sc_format_oid()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2852 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-22 20:35:57 +00:00
nils b051b08584 add initial PIV card support; patch supplied by Douglas E. Engert <deengert@anl.gov>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2842 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-14 22:09:10 +00:00