@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class TrustAllSSLSocketVerifier extends SSLSocketVerifier implements javax.net.ssl.HostnameVerifier
SSLSocket verifier that
will blindly accept any SSLSocket.| Modifier and Type | Method and Description |
|---|---|
static TrustAllSSLSocketVerifier |
getInstance()
Retrieves a singleton instance of this SSL socket verifier.
|
boolean |
verify(java.lang.String hostname,
javax.net.ssl.SSLSession session)
Verifies that the provided hostname is acceptable for use with the
negotiated SSL session.
|
void |
verifySSLSocket(java.lang.String host,
int port,
javax.net.ssl.SSLSocket sslSocket)
Verifies that the provided
SSLSocket is acceptable and the
connection should be allowed to remain established. |
@NotNull public static TrustAllSSLSocketVerifier getInstance()
public void verifySSLSocket(@NotNull java.lang.String host, int port, @NotNull javax.net.ssl.SSLSocket sslSocket) throws LDAPException
SSLSocket is acceptable and the
connection should be allowed to remain established.verifySSLSocket in class SSLSocketVerifierhost - The address to which the client intended the connection
to be established.port - The port to which the client intended the connection to
be established.sslSocket - The SSLSocket that should be verified.LDAPException - If a problem is identified that should prevent the
provided SSLSocket from remaining
established.public boolean verify(@NotNull java.lang.String hostname, @NotNull javax.net.ssl.SSLSession session)
verify in interface javax.net.ssl.HostnameVerifierhostname - The address to which the client intended the connection
to be established.session - The SSL session that was established.