Return parsed parameters from algorithmIdentifier if they are an OID (aka EC named...
authorTobias Brunner <tobias@strongswan.org>
Wed, 18 Jan 2012 20:28:38 +0000 (21:28 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 1 Feb 2012 17:27:45 +0000 (18:27 +0100)
Explicit EC parameters are not supported with this function, but before this
change no parameters were actually ever returned.

src/libstrongswan/asn1/asn1.c

index 1497840..64ee6d1 100644 (file)
@@ -554,7 +554,7 @@ bool asn1_parse_simple_object(chunk_t *object, asn1_t type, u_int level, const c
 static const asn1Object_t algorithmIdentifierObjects[] = {
        { 0, "algorithmIdentifier",     ASN1_SEQUENCE,  ASN1_NONE                       }, /* 0 */
        { 1,   "algorithm",                     ASN1_OID,               ASN1_BODY                       }, /* 1 */
-       { 1,   "parameters",            ASN1_EOC,               ASN1_RAW|ASN1_OPT       }, /* 2 */
+       { 1,   "parameters",            ASN1_OID,               ASN1_RAW|ASN1_OPT       }, /* 2 */
        { 1,   "end opt",                       ASN1_EOC,               ASN1_END                        }, /* 3 */
        { 0, "exit",                            ASN1_EOC,               ASN1_EXIT                       }
 };