Skip to content

Commit 8c839b1

Browse files
authored
Merge pull request #9502 from rlm2002/x509_addressIsIP
Run check for IP address in wolfSSL_X509_check_host()
2 parents 90521b0 + edbca50 commit 8c839b1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/x509.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14190,6 +14190,13 @@ int wolfSSL_X509_check_host(WOLFSSL_X509 *x, const char *chk, size_t chklen,
1419014190
chklen--;
1419114191
}
1419214192

14193+
#ifdef WOLFSSL_IP_ALT_NAME
14194+
ret = CheckIPAddr(dCert, (char *)chk);
14195+
if (ret == 0) {
14196+
goto out;
14197+
}
14198+
#endif /* WOLFSSL_IP_ALT_NAME */
14199+
1419314200
ret = CheckHostName(dCert, (char *)chk, chklen, flags, 0);
1419414201

1419514202
out:

0 commit comments

Comments
 (0)