fix for relative URI detection

This commit is contained in:
Jacob Barthelmeh 2018-05-08 10:19:51 -06:00
parent 08165d5a16
commit 4ee957afa3

View File

@ -5717,7 +5717,7 @@ static int DecodeAltNames(byte* input, int sz, DecodedCert* cert)
/* Verify RFC 5280 Sec 4.2.1.6 rule:
"The name MUST NOT be a relative URI" */
if (XSTRNCMP((const char*)&input[idx], "://", strLen + 1) != 0) {
if (XSTRNSTR((const char*)&input[idx], "://", strLen + 1) == NULL) {
WOLFSSL_MSG("\tAlt Name must be absolute URI");
return ASN_ALT_NAME_E;
}