diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 226278441..67f25bff1 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -460,8 +460,10 @@ static int GetASNInt(const byte* input, word32* inOutIdx, int* len, (*inOutIdx)++; (*len)--; +#ifndef WOLFSSL_ASN_INT_LEAD_0_ANY if (*len > 0 && (input[*inOutIdx] & 0x80) == 0) return ASN_PARSE_E; +#endif } }