org.apache.hadoop.security.ssl
Class SSLHostnameVerifier.AbstractVerifier

java.lang.Object
  extended by org.apache.hadoop.security.ssl.SSLHostnameVerifier.AbstractVerifier
All Implemented Interfaces:
HostnameVerifier, org.apache.hadoop.security.ssl.SSLHostnameVerifier
Enclosing interface:
org.apache.hadoop.security.ssl.SSLHostnameVerifier

public abstract static class SSLHostnameVerifier.AbstractVerifier
extends Object
implements org.apache.hadoop.security.ssl.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
protected SSLHostnameVerifier.AbstractVerifier()
           
 
Method Summary
static boolean acceptableCountryWildcard(String cn)
           
 void check(String[] host, SSLSocket ssl)
           
 void check(String[] hosts, String[] cns, String[] subjectAlts, boolean ie6, boolean strictWithSubDomains)
           
 void check(String[] host, X509Certificate cert)
           
 void check(String host, SSLSocket ssl)
           
 void check(String host, String[] cns, String[] subjectAlts)
           
 void check(String host, X509Certificate cert)
           
static int countDots(String s)
          Counts the number of dots "." in a string.
static boolean isIP4Address(String cn)
           
static boolean isLocalhost(String host)
           
 boolean verify(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, wait
 
Methods inherited from interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
check
 

Constructor Detail

SSLHostnameVerifier.AbstractVerifier

protected SSLHostnameVerifier.AbstractVerifier()
Method Detail

verify

public boolean verify(String host,
                      SSLSession session)
The javax.net.ssl.HostnameVerifier contract.

Specified by:
verify in interface HostnameVerifier
Specified by:
verify in interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
Parameters:
host - 'hostname' we used to create our socket
session - SSLSession with the remote server
Returns:
true if the host matched the one in the certificate.

check

public void check(String host,
                  SSLSocket ssl)
           throws IOException
Specified by:
check in interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
Throws:
IOException

check

public void check(String host,
                  X509Certificate cert)
           throws SSLException
Specified by:
check in interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
Throws:
SSLException

check

public void check(String host,
                  String[] cns,
                  String[] subjectAlts)
           throws SSLException
Specified by:
check in interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
Throws:
SSLException

check

public void check(String[] host,
                  SSLSocket ssl)
           throws IOException
Specified by:
check in interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
Throws:
IOException

check

public void check(String[] host,
                  X509Certificate cert)
           throws SSLException
Specified by:
check in interface org.apache.hadoop.security.ssl.SSLHostnameVerifier
Throws:
SSLException

check

public void check(String[] hosts,
                  String[] cns,
                  String[] subjectAlts,
                  boolean ie6,
                  boolean strictWithSubDomains)
           throws SSLException
Throws:
SSLException

isIP4Address

public static boolean isIP4Address(String cn)

acceptableCountryWildcard

public static boolean acceptableCountryWildcard(String cn)

isLocalhost

public static boolean isLocalhost(String host)

countDots

public static int countDots(String s)
Counts the number of dots "." in a string.

Parameters:
s - string to count dots from
Returns:
number of dots


Copyright © 2014 Apache Software Foundation. All Rights Reserved.