Merge pull request #2542 from kojo1/BasicConst

x.509 basic constratint
This commit is contained in:
Chris Conlon
2019-11-05 15:38:07 -07:00
committed by GitHub

View File

@@ -7215,6 +7215,12 @@ static int DecodeBasicCaConstraint(const byte* input, int sz, DecodedCert* cert)
/* If the basic ca constraint is false, this extension may be named, but
* left empty. So, if the length is 0, just return. */
/* For OpenSSL compatibility, if ASN_INTEGER do nothing */
#ifdef WOLFSSL_X509_BASICCONS_INT
if (input[idx] == ASN_INTEGER)
return 0;
#endif
ret = GetBoolean(input, &idx, sz);
if (ret < 0) {
WOLFSSL_MSG("\tfail: constraint not valid BOOLEAN");