Skip to content

Commit 5654691

Browse files
Merge pull request #6775 from kareem-wolfssl/zd16652
Add a build flag ASN_TEMPLATE_SKIP_ISCA_CHECK to optionally skip the isCa != false check.
2 parents 139fd5d + 8e40130 commit 5654691

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18584,10 +18584,12 @@ static int DecodeBasicCaConstraint(const byte* input, int sz, DecodedCert* cert)
1858418584
if ((ret == 0) && (dataASN[BASICCONSASN_IDX_SEQ].length != 0)) {
1858518585
/* Bad encoding when CA Boolean is false
1858618586
* (default when not present). */
18587+
#ifndef ASN_TEMPLATE_SKIP_ISCA_CHECK
1858718588
if ((dataASN[BASICCONSASN_IDX_CA].length != 0) && (!isCA)) {
1858818589
WOLFSSL_ERROR_VERBOSE(ASN_PARSE_E);
1858918590
ret = ASN_PARSE_E;
1859018591
}
18592+
#endif
1859118593
/* Path length must be a 7-bit value. */
1859218594
if ((ret == 0) && (cert->pathLength >= (1 << 7))) {
1859318595
WOLFSSL_ERROR_VERBOSE(ASN_PARSE_E);

0 commit comments

Comments
 (0)