Merge pull request #7710 from anhu/preTBS_altsigalg_fix

Stop stripping out the sequence header on the AltSigAlg extension.
This commit is contained in:
Sean Parkinson
2024-07-16 09:35:11 +10:00
committed by GitHub

View File

@ -20984,6 +20984,7 @@ static int DecodeAltSigAlg(const byte* input, int sz, DecodedCert* cert)
(void)cert;
}
/* We do this to make sure the format of the extension is correct. */
if (ret == 0) {
GetASN_OID(&dataASN[ALTSIG_ALGOID_OID], oidSigType);
@ -20993,8 +20994,8 @@ static int DecodeAltSigAlg(const byte* input, int sz, DecodedCert* cert)
}
if (ret == 0) {
cert->altSigAlgDer = dataASN[ALTSIG_ALGOID_SEQ].data.u8;
cert->altSigAlgLen = dataASN[ALTSIG_ALGOID_SEQ].length;
cert->altSigAlgDer = (byte *)input;
cert->altSigAlgLen = sz;
cert->altSigAlgOID = dataASN[ALTSIG_ALGOID_OID].data.oid.sum;
}