Ludovic Rousseau wrote:
Hello,
I have a card conforming to ISO 7816-15. ISO 7816-15 is slightly
different from PKCS#15 and among other changes the tokenInfo changed.
In PKCS#15 (v1.1, June 2000, page 48) we have:
TokenInfo ::= SEQUENCE {
version INTEGER {v1(0)} (v1,...),
serialNumber OCTET STRING,
manufacturerID Label OPTIONAL,
[...]
In ISO 7816-15 (Jan 2004, page 35) we have:
CIAInfo ::= SEQUENCE {
version INTEGER {v1(0),v2(1)} (v1|v2,...),
serialNumber OCTET STRING OPTIONAL,
manufacturerID Label OPTIONAL,
[...]
The serialNumber field is now optional.
Proposed patch:
--- libopensc/pkcs15.c (révision 3040)
+++ libopensc/pkcs15.c (copie de travail)
@@ -34,7 +34,7 @@ static const struct sc_asn1_entry c_asn1
static const struct sc_asn1_entry c_asn1_toki[] = {
{ "version", SC_ASN1_INTEGER, SC_ASN1_TAG_INTEGER, 0,
NULL, NULL },
- { "serialNumber", SC_ASN1_OCTET_STRING,
SC_ASN1_TAG_OCTET_STRING, 0, NULL, NULL },
+ { "serialNumber", SC_ASN1_OCTET_STRING,
SC_ASN1_TAG_OCTET_STRING, SC_ASN1_OPTIONAL, NULL, NULL },
{ "manufacturerID", SC_ASN1_UTF8STRING, SC_ASN1_TAG_UTF8STRING,
SC_ASN1_OPTIONAL, NULL, NULL },
{ "label", SC_ASN1_UTF8STRING, SC_ASN1_CTX | 0,
SC_ASN1_OPTIONAL, NULL, NULL },
/* XXX the Taiwanese ID card erroneously uses explicit tagging */
Any objection?
no
Cheers,
Nils
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel