mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8211339: NPE during SSL handshake caused by HostnameChecker
Reviewed-by: xuelei
This commit is contained in:
parent
9ffe7e1205
commit
f7fc720c9c
2 changed files with 286 additions and 0 deletions
|
@ -92,6 +92,10 @@ public class HostnameChecker {
|
|||
*/
|
||||
public void match(String expectedName, X509Certificate cert,
|
||||
boolean chainsToPublicCA) throws CertificateException {
|
||||
if (expectedName == null) {
|
||||
throw new CertificateException("Hostname or IP address is " +
|
||||
"undefined.");
|
||||
}
|
||||
if (isIpAddress(expectedName)) {
|
||||
matchIP(expectedName, cert);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue