public final class DefaultHostnameVerifier extends Object implements HostnameVerifier
HostnameVerifier implementation.| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
DNS_NAME_TYPE
DNS name type constant
|
(package private) static int |
IP_ADDRESS_TYPE
IP address type constant
|
| Constructor and Description |
|---|
DefaultHostnameVerifier()
Create hostname verifier with default settings.
|
DefaultHostnameVerifier(PublicSuffixMatcher publicSuffixMatcher)
Create hostname verifier with public suffix matcher.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static String |
extractCN(String subjectPrincipal) |
(package private) static List<String> |
extractSubjectAlts(X509Certificate cert,
int subjectType) |
(package private) static void |
matchCN(String host,
String cn,
PublicSuffixMatcher publicSuffixMatcher) |
(package private) static void |
matchDNSName(String host,
List<String> subjectAlts,
PublicSuffixMatcher publicSuffixMatcher) |
(package private) static boolean |
matchDomainRoot(String host,
String domainRoot) |
(package private) static boolean |
matchIdentity(String host,
String identity) |
(package private) static boolean |
matchIdentity(String host,
String identity,
PublicSuffixMatcher publicSuffixMatcher) |
(package private) static boolean |
matchIdentityStrict(String host,
String identity) |
(package private) static boolean |
matchIdentityStrict(String host,
String identity,
PublicSuffixMatcher publicSuffixMatcher) |
(package private) static void |
matchIPAddress(String host,
List<String> subjectAlts) |
(package private) static void |
matchIPv6Address(String host,
List<String> subjectAlts) |
(package private) static String |
normaliseAddress(String hostname) |
boolean |
verify(String host,
SSLSession session) |
void |
verify(String host,
X509Certificate cert) |
static final int DNS_NAME_TYPE
static final int IP_ADDRESS_TYPE
public DefaultHostnameVerifier()
public DefaultHostnameVerifier(PublicSuffixMatcher publicSuffixMatcher)
publicSuffixMatcher - public suffix matcherstatic String extractCN(String subjectPrincipal) throws SSLException
SSLExceptionstatic List<String> extractSubjectAlts(X509Certificate cert, int subjectType)
static void matchCN(String host, String cn, PublicSuffixMatcher publicSuffixMatcher) throws SSLException
SSLExceptionstatic void matchDNSName(String host, List<String> subjectAlts, PublicSuffixMatcher publicSuffixMatcher) throws SSLException
SSLExceptionstatic boolean matchIdentity(String host, String identity, PublicSuffixMatcher publicSuffixMatcher)
static boolean matchIdentityStrict(String host, String identity, PublicSuffixMatcher publicSuffixMatcher)
static void matchIPAddress(String host, List<String> subjectAlts) throws SSLException
SSLExceptionstatic void matchIPv6Address(String host, List<String> subjectAlts) throws SSLException
SSLExceptionpublic final boolean verify(String host, SSLSession session)
verify in interface HostnameVerifierpublic final void verify(String host, X509Certificate cert) throws SSLException
SSLException