@Immutable public abstract class AbstractVerifier extends java.lang.Object implements X509HostnameVerifier
X509HostnameVerifier
implementations.| Modifier and Type | Field and Description |
|---|---|
HttpClientAndroidLog |
log |
| Constructor and Description |
|---|
AbstractVerifier() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
acceptableCountryWildcard(java.lang.String cn)
Deprecated.
(4.3.1) should not be a part of public APIs.
|
static int |
countDots(java.lang.String s)
Counts the number of dots "." in a string.
|
static java.lang.String[] |
getCNs(java.security.cert.X509Certificate cert) |
static java.lang.String[] |
getDNSSubjectAlts(java.security.cert.X509Certificate cert)
Extracts the array of SubjectAlt DNS names from an X509Certificate.
|
boolean |
verify(java.lang.String host,
javax.net.ssl.SSLSession session) |
void |
verify(java.lang.String host,
javax.net.ssl.SSLSocket ssl)
Verifies that the host name is an acceptable match with the server's
authentication scheme based on the given
SSLSocket. |
void |
verify(java.lang.String host,
java.lang.String[] cns,
java.lang.String[] subjectAlts,
boolean strictWithSubDomains) |
void |
verify(java.lang.String host,
java.security.cert.X509Certificate cert)
Verifies that the host name is an acceptable match with the server's
authentication scheme based on the given
X509Certificate. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitverifypublic HttpClientAndroidLog log
public final void verify(java.lang.String host,
javax.net.ssl.SSLSocket ssl)
throws java.io.IOException
X509HostnameVerifierSSLSocket.verify in interface X509HostnameVerifierhost - the host.ssl - the SSL socket.java.io.IOException - if an I/O error occurs or the verification process
fails.public final boolean verify(java.lang.String host,
javax.net.ssl.SSLSession session)
verify in interface javax.net.ssl.HostnameVerifierpublic final void verify(java.lang.String host,
java.security.cert.X509Certificate cert)
throws javax.net.ssl.SSLException
X509HostnameVerifierX509Certificate.verify in interface X509HostnameVerifierhost - the host.cert - the certificate.javax.net.ssl.SSLException - if the verification process fails.public final void verify(java.lang.String host,
java.lang.String[] cns,
java.lang.String[] subjectAlts,
boolean strictWithSubDomains)
throws javax.net.ssl.SSLException
javax.net.ssl.SSLException@Deprecated public static boolean acceptableCountryWildcard(java.lang.String cn)
public static java.lang.String[] getCNs(java.security.cert.X509Certificate cert)
public static java.lang.String[] getDNSSubjectAlts(java.security.cert.X509Certificate cert)
cert - X509Certificatepublic static int countDots(java.lang.String s)
s - string to count dots from