Keep else to GetBoolean

This commit is contained in:
Takashi Kojo
2019-10-31 17:29:46 +09:00
parent 4f602e02ba
commit 2ef4d1a16e

View File

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