From d435c16fe8922f9589a84320f2e71c7322ea7e90 Mon Sep 17 00:00:00 2001 From: David Garske Date: Tue, 25 Apr 2017 12:06:08 -0700 Subject: [PATCH] Fix issue with ASN encoding, where the SetName function was incorrectly adding extra byte for object id tag. Refactor changed lines 7694 and 7700 to use SetObjectId which handles length (was using SetLength prior to refactor). Issue was noticed via compatibility testing using generated cert against openssl asn1parse. --- wolfcrypt/src/asn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index c6b592fb5..503b6d3fc 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -7700,7 +7700,6 @@ int SetName(byte* output, word32 outputSz, CertName* name) firstSz = SetObjectId(JOINT_LEN + 1, firstLen); } thisLen += firstSz; - thisLen++; /* object id */ seqSz = SetSequence(thisLen, sequence); thisLen += seqSz;