Package org.apache.http.conn.ssl
Class DefaultHostnameVerifier
java.lang.Object
org.apache.http.conn.ssl.DefaultHostnameVerifier
- All Implemented Interfaces:
HostnameVerifier
public final class DefaultHostnameVerifier extends Object implements HostnameVerifier
Default
HostnameVerifier implementation.- Since:
- 4.4
-
Field Summary
Fields Modifier and Type Field Description (package private) static intDNS_NAME_TYPE(package private) static intIP_ADDRESS_TYPE -
Constructor Summary
Constructors Constructor Description DefaultHostnameVerifier()DefaultHostnameVerifier(PublicSuffixMatcher publicSuffixMatcher) -
Method Summary
Modifier and Type Method Description (package private) static StringextractCN(String subjectPrincipal)(package private) static List<String>extractSubjectAlts(X509Certificate cert, int subjectType)(package private) static voidmatchCN(String host, String cn, PublicSuffixMatcher publicSuffixMatcher)(package private) static voidmatchDNSName(String host, List<String> subjectAlts, PublicSuffixMatcher publicSuffixMatcher)(package private) static booleanmatchDomainRoot(String host, String domainRoot)(package private) static booleanmatchIdentity(String host, String identity)(package private) static booleanmatchIdentity(String host, String identity, PublicSuffixMatcher publicSuffixMatcher)(package private) static booleanmatchIdentityStrict(String host, String identity)(package private) static booleanmatchIdentityStrict(String host, String identity, PublicSuffixMatcher publicSuffixMatcher)(package private) static voidmatchIPAddress(String host, List<String> subjectAlts)(package private) static voidmatchIPv6Address(String host, List<String> subjectAlts)(package private) static StringnormaliseAddress(String hostname)voidverify(String host, X509Certificate cert)booleanverify(String host, SSLSession session)
-
Field Details
-
DNS_NAME_TYPE
static final int DNS_NAME_TYPE- See Also:
- Constant Field Values
-
IP_ADDRESS_TYPE
static final int IP_ADDRESS_TYPE- See Also:
- Constant Field Values
-
-
Constructor Details
-
DefaultHostnameVerifier
-
DefaultHostnameVerifier
public DefaultHostnameVerifier()
-
-
Method Details
-
verify
- Specified by:
verifyin interfaceHostnameVerifier
-
verify
- Throws:
SSLException
-
matchIPAddress
- Throws:
SSLException
-
matchIPv6Address
- Throws:
SSLException
-
matchDNSName
static void matchDNSName(String host, List<String> subjectAlts, PublicSuffixMatcher publicSuffixMatcher) throws SSLException- Throws:
SSLException
-
matchCN
static void matchCN(String host, String cn, PublicSuffixMatcher publicSuffixMatcher) throws SSLException- Throws:
SSLException
-
matchDomainRoot
-
matchIdentity
static boolean matchIdentity(String host, String identity, PublicSuffixMatcher publicSuffixMatcher) -
matchIdentity
-
matchIdentityStrict
static boolean matchIdentityStrict(String host, String identity, PublicSuffixMatcher publicSuffixMatcher) -
matchIdentityStrict
-
extractCN
- Throws:
SSLException
-
extractSubjectAlts
-
normaliseAddress
-