|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.conn.ssl.AbstractBaseHostnameVerifier
org.apache.http.conn.ssl.AbstractCommonHostnameVerifier
@Immutable public abstract class AbstractCommonHostnameVerifier
/**
Abstract base class for all standard X509HostnameVerifier
implementations that provides methods to extract Common Name (CN) and alternative subjects
(subjectAlt) from X509Certificate
being validated as well
as verify(String, String[], String[], boolean)
method that implements common
certificate subject validation logic.
Constructor Summary | |
---|---|
AbstractCommonHostnameVerifier()
|
Method Summary | |
---|---|
static boolean |
acceptableCountryWildcard(String cn)
Deprecated. (4.3.1) should not be a part of public APIs. |
static int |
countDots(String s)
Counts the number of dots "." in a string. |
static String[] |
getCNs(X509Certificate cert)
|
static String[] |
getDNSSubjectAlts(X509Certificate cert)
Extracts the array of SubjectAlt DNS names from an X509Certificate. |
void |
verify(String host,
String[] cns,
String[] subjectAlts,
boolean strictWithSubDomains)
|
void |
verify(String host,
X509Certificate cert)
Verifies that the host name is an acceptable match with the server's authentication scheme based on the given X509Certificate . |
Methods inherited from class org.apache.http.conn.ssl.AbstractBaseHostnameVerifier |
---|
verify, verify |
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 Detail |
---|
public AbstractCommonHostnameVerifier()
Method Detail |
---|
public final void verify(String host, X509Certificate cert) throws SSLException
X509HostnameVerifier
X509Certificate
.
host
- the host.cert
- the certificate.
SSLException
- if the verification process fails.public final void verify(String host, String[] cns, String[] subjectAlts, boolean strictWithSubDomains) throws SSLException
SSLException
@Deprecated public static boolean acceptableCountryWildcard(String cn)
public static String[] getCNs(X509Certificate cert)
public static String[] getDNSSubjectAlts(X509Certificate cert)
cert
- X509Certificate
public static int countDots(String s)
s
- string to count dots from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |