Return 0 in ParseCRL_Extensions if there are no CRL extensions to parse

This commit is contained in:
Carie Pointer
2020-01-06 08:42:37 -08:00
parent 26eea36d7f
commit 991ee662c0

View File

@ -16036,8 +16036,11 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf,
if (GetASNTag(buf, &idx, &tag, sz) < 0)
return ASN_PARSE_E;
if (tag != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0))
return ASN_PARSE_E;
if (tag != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) {
/* Return without error if no extensions are found */
WOLFSSL_MSG("No CRL Extensions found");
return 0;
}
if (GetLength(buf, &idx, &length, sz) < 0)
return ASN_PARSE_E;