@@ -4737,7 +4737,8 @@ static int DecodeBasicOcspResponse(byte* source, word32* ioIndex,
47374737#if defined(HAVE_CRL) && !defined(WOLFCRYPT_ONLY)
47384738static int GetRevoked(RevokedCert* rcert, const byte* buff, word32* idx, DecodedCRL* dcrl, word32 maxIdx);
47394739#ifndef NO_SKID
4740- static int ParseCRL_AuthKeyIdExt(const byte* input, int sz, DecodedCRL* dcrl);
4740+ static int ParseCRL_AuthKeyIdExt(const byte* input, word32 inputIdx, int sz,
4741+ DecodedCRL* dcrl);
47414742#endif
47424743static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32* inOutIdx, word32 sz);
47434744#endif
@@ -39920,7 +39921,8 @@ static int PaseCRL_CheckSignature(DecodedCRL* dcrl, const byte* sigParams,
3992039921
3992139922#ifndef NO_SKID
3992239923#ifdef WOLFSSL_ASN_TEMPLATE
39923- static int ParseCRL_AuthKeyIdExt(const byte* input, int sz, DecodedCRL* dcrl)
39924+ static int ParseCRL_AuthKeyIdExt(const byte* input, word32 inputIdx, int sz,
39925+ DecodedCRL* dcrl)
3992439926{
3992539927 DECL_ASNGETDATA(dataASN, authKeyIdASN_Length);
3992639928 int ret = 0;
@@ -39942,6 +39944,10 @@ static int ParseCRL_AuthKeyIdExt(const byte* input, int sz, DecodedCRL* dcrl)
3994239944 }
3994339945 else {
3994439946 dcrl->extAuthKeyIdSet = 1;
39947+ dcrl->extAuthKeyIdRawIdx = inputIdx + (word32)
39948+ (dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.data - input);
39949+ dcrl->extAuthKeyIdRawSz =
39950+ dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.length;
3994539951
3994639952 /* Get the hash or hash of the hash if wrong size. */
3994739953 ret = GetHashId(dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.data,
@@ -40023,7 +40029,8 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32 idx,
4002340029 #ifndef NO_SKID
4002440030 /* Parse Authority Key Id extension.
4002540031 * idx is at start of OCTET_STRING data. */
40026- ret = ParseCRL_AuthKeyIdExt(buf + localIdx, length, dcrl);
40032+ ret = ParseCRL_AuthKeyIdExt(buf + localIdx, localIdx,
40033+ length, dcrl);
4002740034 if (ret != 0) {
4002840035 WOLFSSL_MSG("\tcouldn't parse AuthKeyId extension");
4002940036 }
0 commit comments