Addressing some more feedback

pull/5388/head
Lealem Amedie 2022-08-22 14:47:11 -07:00
parent 91a7b8067c
commit f9ca944106
2 changed files with 5 additions and 7 deletions

View File

@ -33116,10 +33116,8 @@ static int ParseCRL_CertList(DecodedCRL* dcrl, const byte* buf,
return ASN_PARSE_E; return ASN_PARSE_E;
} }
#ifdef OPENSSL_EXTRA #ifdef OPENSSL_EXTRA
else { dcrl->issuerSz = length + (checkIdx - idx);
dcrl->issuerSz = length + 3; dcrl->issuer = (byte*)GetNameFromDer(buf + idx, (int)dcrl->issuerSz);
dcrl->issuer = (byte*)GetNameFromDer(buf + idx, dcrl->issuerSz);
}
#endif #endif
if (GetNameHash(buf, &idx, dcrl->issuerHash, sz) < 0) if (GetNameHash(buf, &idx, dcrl->issuerHash, sz) < 0)
@ -33377,7 +33375,7 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf,
} }
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER); XFREE(m, NULL, DYNAMIC_TYPE_BIGINT);
#endif #endif
mp_free(m); mp_free(m);
} }
@ -33691,7 +33689,7 @@ end:
buff); buff);
dcrl->issuer = (byte*)GetNameFromDer((byte*)GetASNItem_Addr( dcrl->issuer = (byte*)GetNameFromDer((byte*)GetASNItem_Addr(
dataASN[CRLASN_IDX_TBS_ISSUER], buff), dataASN[CRLASN_IDX_TBS_ISSUER], buff),
dcrl->issuerSz); (int)dcrl->issuerSz);
/* Calculate the Hash id from the issuer name. */ /* Calculate the Hash id from the issuer name. */
ret = CalcHashId(GetASNItem_Addr(dataASN[CRLASN_IDX_TBS_ISSUER], buff), ret = CalcHashId(GetASNItem_Addr(dataASN[CRLASN_IDX_TBS_ISSUER], buff),
dcrl->issuerSz, dcrl->issuerHash); dcrl->issuerSz, dcrl->issuerHash);

View File

@ -2412,7 +2412,7 @@ struct DecodedCRL {
RevokedCert* certs; /* revoked cert list */ RevokedCert* certs; /* revoked cert list */
#if defined(OPENSSL_EXTRA) #if defined(OPENSSL_EXTRA)
byte* issuer; /* full name including common name */ byte* issuer; /* full name including common name */
int issuerSz; /* length of the issuer */ word32 issuerSz; /* length of the issuer */
#endif #endif
int totalCerts; /* number on list */ int totalCerts; /* number on list */
int version; /* version of cert */ int version; /* version of cert */