Skip to content

Commit 983616a

Browse files
check for critical policy extension when not supported
1 parent 04ebc96 commit 983616a

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
@@ -21072,7 +21072,13 @@ static int DecodeExtensionType(const byte* input, word32 length, word32 oid,
2107221072
ret = ASN_PARSE_E;
2107321073
}
2107421074
#else
21075-
WOLFSSL_MSG("Certificate Policy extension not supported yet.");
21075+
WOLFSSL_MSG("Certificate Policy extension not supported.");
21076+
#ifndef WOLFSSL_NO_ASN_STRICT
21077+
if (critical) {
21078+
WOLFSSL_ERROR_VERBOSE(ASN_CRIT_EXT_E);
21079+
ret = ASN_CRIT_EXT_E;
21080+
}
21081+
#endif
2107621082
#endif
2107721083
break;
2107821084

0 commit comments

Comments
 (0)