From f5e27bfb0cf6beae0c638dc9f17786a9867b999f Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Wed, 3 Jul 2024 19:02:04 -0400 Subject: [PATCH] Stop stripping out the sequence header on the AltSigAlg extension. --- wolfcrypt/src/asn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 87e68a4e6c..639f7c8fa2 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -20983,6 +20983,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); @@ -20992,8 +20993,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; }