libopensc: correct ASN.1 parsing of EF(TokenInfo).

Two fields should be optional. This also fixes #322

Thanks to Toni for finding and Andre for fixing the problem.
See http://www.opensc-project.org/pipermail/opensc-devel/2011-January/015613.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5194 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2011-02-10 20:31:34 +00:00
parent f73eb87fed
commit 43be49b4a3
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ static const struct sc_asn1_entry c_asn1_algorithm_info[7] = {
{ "algorithmPKCS#11", SC_ASN1_INTEGER, SC_ASN1_TAG_INTEGER, 0, NULL, NULL },
{ "parameters", SC_ASN1_NULL, SC_ASN1_TAG_NULL, 0, NULL, NULL },
{ "supportedOperations",SC_ASN1_BIT_FIELD, SC_ASN1_TAG_BIT_STRING, 0, NULL, NULL },
{ "objId", SC_ASN1_OBJECT, SC_ASN1_TAG_OBJECT, 0, NULL, NULL },
{ "algRef", SC_ASN1_INTEGER, SC_ASN1_TAG_INTEGER, 0, NULL, NULL },
{ "objId", SC_ASN1_OBJECT, SC_ASN1_TAG_OBJECT, SC_ASN1_OPTIONAL, NULL, NULL },
{ "algRef", SC_ASN1_INTEGER, SC_ASN1_TAG_INTEGER, SC_ASN1_OPTIONAL, NULL, NULL },
{ NULL, 0, 0, 0, NULL, NULL }
};