@@ -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
@@ -39866,7 +39867,8 @@ static int PaseCRL_CheckSignature(DecodedCRL* dcrl, const byte* sigParams,
3986639867
3986739868#ifndef NO_SKID
3986839869#ifdef WOLFSSL_ASN_TEMPLATE
39869- static int ParseCRL_AuthKeyIdExt(const byte* input, int sz, DecodedCRL* dcrl)
39870+ static int ParseCRL_AuthKeyIdExt(const byte* input, word32 inputIdx, int sz,
39871+ DecodedCRL* dcrl)
3987039872{
3987139873 DECL_ASNGETDATA(dataASN, authKeyIdASN_Length);
3987239874 int ret = 0;
@@ -39888,6 +39890,10 @@ static int ParseCRL_AuthKeyIdExt(const byte* input, int sz, DecodedCRL* dcrl)
3988839890 }
3988939891 else {
3989039892 dcrl->extAuthKeyIdSet = 1;
39893+ dcrl->extAuthKeyIdRawIdx = inputIdx + (word32)
39894+ (dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.data - input);
39895+ dcrl->extAuthKeyIdRawSz =
39896+ dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.length;
3989139897
3989239898 /* Get the hash or hash of the hash if wrong size. */
3989339899 ret = GetHashId(dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.data,
@@ -39969,7 +39975,8 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32 idx,
3996939975 #ifndef NO_SKID
3997039976 /* Parse Authority Key Id extension.
3997139977 * idx is at start of OCTET_STRING data. */
39972- ret = ParseCRL_AuthKeyIdExt(buf + localIdx, length, dcrl);
39978+ ret = ParseCRL_AuthKeyIdExt(buf + localIdx, localIdx,
39979+ length, dcrl);
3997339980 if (ret != 0) {
3997439981 WOLFSSL_MSG("\tcouldn't parse AuthKeyId extension");
3997539982 }
0 commit comments