public final class HostnameVerifier
extends java.lang.Object
implements javax.net.ssl.HostnameVerifier
Modifier and Type | Field and Description |
---|---|
static HostnameVerifier |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
allSubjectAltNames(java.security.cert.X509Certificate certificate) |
boolean |
verify(java.lang.String host,
javax.net.ssl.SSLSession session) |
boolean |
verify(java.lang.String host,
java.security.cert.X509Certificate certificate) |
boolean |
verifyHostname(java.lang.String hostname,
java.lang.String pattern)
Returns
true iff hostname matches the domain name pattern . |
public static final HostnameVerifier INSTANCE
public boolean verify(java.lang.String host, javax.net.ssl.SSLSession session)
verify
in interface javax.net.ssl.HostnameVerifier
public boolean verify(java.lang.String host, java.security.cert.X509Certificate certificate)
public static java.util.List<java.lang.String> allSubjectAltNames(java.security.cert.X509Certificate certificate)
public boolean verifyHostname(java.lang.String hostname, java.lang.String pattern)
true
iff hostname
matches the domain name pattern
.hostname
- lower-case host name.pattern
- domain name pattern from certificate. May be a wildcard pattern such as *.android.com
.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.