Merge pull request #3004 from SparkiDev/asn1_int_lead_0_any

Define to allow badly formed ASN integers
This commit is contained in:
toddouska
2020-06-03 14:55:04 -07:00
committed by GitHub

View File

@ -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
}
}