mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
Check CRL extension errors but don't require them
This commit is contained in:
@ -16030,14 +16030,17 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf,
|
||||
|
||||
idx = *inOutIdx;
|
||||
|
||||
/* CRL Extensions are optional */
|
||||
if ((idx + 1) > sz)
|
||||
return BUFFER_E;
|
||||
return 0;
|
||||
|
||||
/* CRL Extensions are optional */
|
||||
if (GetASNTag(buf, &idx, &tag, sz) < 0)
|
||||
return ASN_PARSE_E;
|
||||
return 0;
|
||||
|
||||
/* CRL Extensions are optional */
|
||||
if (tag != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0))
|
||||
return ASN_PARSE_E;
|
||||
return 0;
|
||||
|
||||
if (GetLength(buf, &idx, &length, sz) < 0)
|
||||
return ASN_PARSE_E;
|
||||
@ -16130,8 +16133,8 @@ int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm)
|
||||
if (ParseCRL_CertList(dcrl, buff, &idx, idx + len) < 0)
|
||||
return ASN_PARSE_E;
|
||||
|
||||
/* CRL Extensions optional, ignoring errors */
|
||||
ParseCRL_Extensions(dcrl, buff, &idx, idx + len);
|
||||
if (ParseCRL_Extensions(dcrl, buff, &idx, idx + len) < 0)
|
||||
return ASN_PARSE_E;
|
||||
|
||||
idx = dcrl->sigIndex;
|
||||
|
||||
|
Reference in New Issue
Block a user