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.

This commit is contained in:
David Garske
2017-04-25 12:06:08 -07:00
parent dd2915f4fa
commit d435c16fe8

View File

@@ -7700,7 +7700,6 @@ int SetName(byte* output, word32 outputSz, CertName* name)
firstSz = SetObjectId(JOINT_LEN + 1, firstLen); firstSz = SetObjectId(JOINT_LEN + 1, firstLen);
} }
thisLen += firstSz; thisLen += firstSz;
thisLen++; /* object id */
seqSz = SetSequence(thisLen, sequence); seqSz = SetSequence(thisLen, sequence);
thisLen += seqSz; thisLen += seqSz;