Package org.apache.http.conn.ssl
Class AbstractVerifier
java.lang.Object
org.apache.http.conn.ssl.AbstractVerifier
- All Implemented Interfaces:
HostnameVerifier
,X509HostnameVerifier
- Direct Known Subclasses:
AllowAllHostnameVerifier
,BrowserCompatHostnameVerifier
,StrictHostnameVerifier
Deprecated.
Abstract base class for all standard
X509HostnameVerifier
implementations.- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Deprecated.static int
Deprecated.Counts the number of dots "." in a string.static String[]
getCNs
(X509Certificate cert) Deprecated.static String[]
Deprecated.Extracts the array of SubjectAlt DNS names from an X509Certificate.final void
Deprecated.final void
verify
(String host, X509Certificate cert) Deprecated.Verifies that the host name is an acceptable match with the server's authentication scheme based on the givenX509Certificate
.final boolean
verify
(String host, SSLSession session) Deprecated.final void
Deprecated.Verifies that the host name is an acceptable match with the server's authentication scheme based on the givenSSLSocket
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.http.conn.ssl.X509HostnameVerifier
verify
-
Constructor Details
-
AbstractVerifier
public AbstractVerifier()Deprecated.
-
-
Method Details
-
verify
Deprecated.Description copied from interface:X509HostnameVerifier
Verifies that the host name is an acceptable match with the server's authentication scheme based on the givenSSLSocket
.- Specified by:
verify
in interfaceX509HostnameVerifier
- Parameters:
host
- the host.ssl
- the SSL socket.- Throws:
IOException
- if an I/O error occurs or the verification process fails.
-
verify
Deprecated.- Specified by:
verify
in interfaceHostnameVerifier
-
verify
Deprecated.Description copied from interface:X509HostnameVerifier
Verifies that the host name is an acceptable match with the server's authentication scheme based on the givenX509Certificate
.- Specified by:
verify
in interfaceX509HostnameVerifier
- Parameters:
host
- the host.cert
- the certificate.- Throws:
SSLException
- if the verification process fails.
-
verify
public final void verify(String host, String[] cns, String[] subjectAlts, boolean strictWithSubDomains) throws SSLException Deprecated.- Throws:
SSLException
-
acceptableCountryWildcard
Deprecated. -
getCNs
Deprecated. -
getDNSSubjectAlts
Deprecated.Extracts the array of SubjectAlt DNS names from an X509Certificate. Returns null if there aren't any.Note: Java doesn't appear able to extract international characters from the SubjectAlts. It can only extract international characters from the CN field.
(Or maybe the version of OpenSSL I'm using to test isn't storing the international characters correctly in the SubjectAlts?).
- Parameters:
cert
- X509Certificate- Returns:
- Array of SubjectALT DNS names stored in the certificate.
-
countDots
Deprecated.Counts the number of dots "." in a string.- Parameters:
s
- string to count dots from- Returns:
- number of dots
-
HostnameVerifier
orDefaultHostnameVerifier
.