Skip to content

Commit a518f49

Browse files
authored
Merge pull request #7388 from JacobBarthelmeh/x509_cases
check for critical policy extension when not supported
2 parents 7d66cc4 + 983616a commit a518f49

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

wolfcrypt/src/asn.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21121,7 +21121,13 @@ static int DecodeExtensionType(const byte* input, word32 length, word32 oid,
2112121121
ret = ASN_PARSE_E;
2112221122
}
2112321123
#else
21124-
WOLFSSL_MSG("Certificate Policy extension not supported yet.");
21124+
WOLFSSL_MSG("Certificate Policy extension not supported.");
21125+
#ifndef WOLFSSL_NO_ASN_STRICT
21126+
if (critical) {
21127+
WOLFSSL_ERROR_VERBOSE(ASN_CRIT_EXT_E);
21128+
ret = ASN_CRIT_EXT_E;
21129+
}
21130+
#endif
2112521131
#endif
2112621132
break;
2112721133

0 commit comments

Comments
 (0)