From 6e47e33ded80c5289508a373b31afd9057fd267e Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 9 Dec 2011 10:54:52 -0800 Subject: [PATCH] pkcs8 ecc convert cert fix --- ctaocrypt/src/asn.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index 838b33ddf..95cf0c92b 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -1249,6 +1249,16 @@ static int GetName(DecodedCert* cert, int nameType) InitSha(&sha); + if (cert->source[cert->srcIdx] == ASN_OBJECT_ID) { + CYASSL_MSG("Trying optional prefix..."); + + if (GetLength(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) + return ASN_PARSE_E; + + cert->srcIdx += length; + CYASSL_MSG("Got optional prefix"); + } + if (GetSequence(cert->source, &cert->srcIdx, &length, cert->maxIdx) < 0) return ASN_PARSE_E;