Package org.apache.hadoop.security.ssl
Class SSLHostnameVerifier.AbstractVerifier
java.lang.Object
org.apache.hadoop.security.ssl.SSLHostnameVerifier.AbstractVerifier
- All Implemented Interfaces:
HostnameVerifier,SSLHostnameVerifier
- Enclosing interface:
- SSLHostnameVerifier
public abstract static class SSLHostnameVerifier.AbstractVerifier
extends Object
implements SSLHostnameVerifier
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
SSLHostnameVerifier.AbstractVerifier, SSLHostnameVerifier.Certificates -
Field Summary
Fields inherited from interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
ALLOW_ALL, DEFAULT, DEFAULT_AND_LOCALHOST, STRICT, STRICT_IE6 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanvoidcheck(String[] hosts, String[] cns, String[] subjectAlts, boolean ie6, boolean strictWithSubDomains) voidcheck(String[] host, X509Certificate cert) voidvoidvoidcheck(String host, X509Certificate cert) voidstatic intCounts the number of dots "." in a string.static booleanisIP4Address(String cn) static booleanisLocalhost(String host) booleanverify(String host, SSLSession session) The javax.net.ssl.HostnameVerifier contract.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
check
-
Constructor Details
-
AbstractVerifier
protected AbstractVerifier()
-
-
Method Details
-
verify
The javax.net.ssl.HostnameVerifier contract.- Specified by:
verifyin interfaceHostnameVerifier- Specified by:
verifyin interfaceSSLHostnameVerifier- Parameters:
host- 'hostname' we used to create our socketsession- SSLSession with the remote server- Returns:
- true if the host matched the one in the certificate.
-
check
- Specified by:
checkin interfaceSSLHostnameVerifier- Throws:
IOException
-
check
- Specified by:
checkin interfaceSSLHostnameVerifier- Throws:
SSLException
-
check
- Specified by:
checkin interfaceSSLHostnameVerifier- Throws:
SSLException
-
check
- Specified by:
checkin interfaceSSLHostnameVerifier- Throws:
IOException
-
check
- Specified by:
checkin interfaceSSLHostnameVerifier- Throws:
SSLException
-
check
public void check(String[] hosts, String[] cns, String[] subjectAlts, boolean ie6, boolean strictWithSubDomains) throws SSLException - Throws:
SSLException
-
isIP4Address
-
acceptableCountryWildcard
-
isLocalhost
-
countDots
Counts the number of dots "." in a string.- Parameters:
s- string to count dots from- Returns:
- number of dots
-