@Contract(threading=STATELESS) public class ConscryptClientTlsStrategy extends Object
Constructor and Description |
---|
ConscryptClientTlsStrategy(SSLContext sslcontext) |
ConscryptClientTlsStrategy(SSLContext sslcontext,
javax.net.ssl.HostnameVerifier hostnameVerifier) |
ConscryptClientTlsStrategy(SSLContext sslContext,
String[] supportedProtocols,
String[] supportedCipherSuites,
SSLBufferMode sslBufferManagement,
javax.net.ssl.HostnameVerifier hostnameVerifier) |
Modifier and Type | Method and Description |
---|---|
static TlsStrategy |
getDefault() |
static TlsStrategy |
getSystemDefault() |
protected void |
initializeEngine(javax.net.ssl.SSLEngine sslEngine) |
static boolean |
isSupported() |
boolean |
upgrade(TransportSecurityLayer tlsSession,
HttpHost host,
SocketAddress localAddress,
SocketAddress remoteAddress,
Object attachment,
Timeout handshakeTimeout)
Secures current session layer with TLS security.
|
protected void |
verifySession(String hostname,
javax.net.ssl.SSLSession sslsession) |
public ConscryptClientTlsStrategy(SSLContext sslcontext)
public ConscryptClientTlsStrategy(SSLContext sslcontext, javax.net.ssl.HostnameVerifier hostnameVerifier)
public ConscryptClientTlsStrategy(SSLContext sslContext, String[] supportedProtocols, String[] supportedCipherSuites, SSLBufferMode sslBufferManagement, javax.net.ssl.HostnameVerifier hostnameVerifier)
public static TlsStrategy getDefault()
public static TlsStrategy getSystemDefault()
public static boolean isSupported()
protected void initializeEngine(javax.net.ssl.SSLEngine sslEngine)
public boolean upgrade(TransportSecurityLayer tlsSession, HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, Timeout handshakeTimeout)
TlsStrategy
upgrade
in interface TlsStrategy
tlsSession
- the session layerhost
- the name of the opposite endpoint when givem or null
otherwise.localAddress
- the address of the local endpoint.remoteAddress
- the address of the remote endpoint.attachment
- arbitrary object passes to the TLS session initialization code.handshakeTimeout
- the timeout to use while performing the TLS handshake; may be null
.true
if the session has been upgraded, false
otherwise.protected void verifySession(String hostname, javax.net.ssl.SSLSession sslsession) throws SSLException
SSLException