From 7dd7df4e7c01b6338a036f2da78c38cc952964a8 Mon Sep 17 00:00:00 2001 From: aj Date: Wed, 5 Jul 2006 19:36:26 +0000 Subject: [PATCH] Tomasz Lemiech wrote: I found that struct c_asn1_odf[] in pkcs15.c does not define secretKeys object (as specified in PKCS#15 v. 1.1 standard, par. 6.2). I consider this to be an omission. My Setec card contains objects of this type and all PKCS#15 operations fail with "Unable to parse ODF". Attached patch fixes this issue. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2982 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/pkcs15.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libopensc/pkcs15.c b/src/libopensc/pkcs15.c index 2b2277b4..9f8d19b3 100644 --- a/src/libopensc/pkcs15.c +++ b/src/libopensc/pkcs15.c @@ -278,6 +278,7 @@ static const struct sc_asn1_entry c_asn1_odf[] = { { "privateKeys", SC_ASN1_STRUCT, SC_ASN1_CTX | 0 | SC_ASN1_CONS, 0, NULL, NULL }, { "publicKeys", SC_ASN1_STRUCT, SC_ASN1_CTX | 1 | SC_ASN1_CONS, 0, NULL, NULL }, { "trustedPublicKeys", SC_ASN1_STRUCT, SC_ASN1_CTX | 2 | SC_ASN1_CONS, 0, NULL, NULL }, + { "secretKeys", SC_ASN1_STRUCT, SC_ASN1_CTX | 3 | SC_ASN1_CONS, 0, NULL, NULL }, { "certificates", SC_ASN1_STRUCT, SC_ASN1_CTX | 4 | SC_ASN1_CONS, 0, NULL, NULL }, { "trustedCertificates", SC_ASN1_STRUCT, SC_ASN1_CTX | 5 | SC_ASN1_CONS, 0, NULL, NULL }, { "usefulCertificates", SC_ASN1_STRUCT, SC_ASN1_CTX | 6 | SC_ASN1_CONS, 0, NULL, NULL }, @@ -290,6 +291,7 @@ static const unsigned int odf_indexes[] = { SC_PKCS15_PRKDF, SC_PKCS15_PUKDF, SC_PKCS15_PUKDF_TRUSTED, + SC_PKCS15_SKDF, SC_PKCS15_CDF, SC_PKCS15_CDF_TRUSTED, SC_PKCS15_CDF_USEFUL,