Skip to content

Commit

Permalink
Merge pull request #6775 from kareem-wolfssl/zd16652
Browse files Browse the repository at this point in the history
Add a build flag ASN_TEMPLATE_SKIP_ISCA_CHECK to optionally skip the isCa != false check.
  • Loading branch information
JacobBarthelmeh authored Sep 15, 2023
2 parents 139fd5d + 8e40130 commit 5654691
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wolfcrypt/src/asn.c
Original file line number Diff line number Diff line change
Expand Up @@ -18584,10 +18584,12 @@ static int DecodeBasicCaConstraint(const byte* input, int sz, DecodedCert* cert)
if ((ret == 0) && (dataASN[BASICCONSASN_IDX_SEQ].length != 0)) {
/* Bad encoding when CA Boolean is false
* (default when not present). */
#ifndef ASN_TEMPLATE_SKIP_ISCA_CHECK
if ((dataASN[BASICCONSASN_IDX_CA].length != 0) && (!isCA)) {
WOLFSSL_ERROR_VERBOSE(ASN_PARSE_E);
ret = ASN_PARSE_E;
}
#endif
/* Path length must be a 7-bit value. */
if ((ret == 0) && (cert->pathLength >= (1 << 7))) {
WOLFSSL_ERROR_VERBOSE(ASN_PARSE_E);
Expand Down

0 comments on commit 5654691

Please sign in to comment.