public class BasicClientTlsStrategy extends Object implements TlsStrategy
TlsStrategy
that upgrades to TLS for all endpoints
with HTTPS
scheme.Constructor and Description |
---|
BasicClientTlsStrategy() |
BasicClientTlsStrategy(SSLContext sslContext) |
BasicClientTlsStrategy(SSLContext sslContext,
SSLBufferMode sslBufferMode,
SSLSessionInitializer initializer,
SSLSessionVerifier verifier) |
BasicClientTlsStrategy(SSLContext sslContext,
SSLSessionInitializer initializer,
SSLSessionVerifier verifier) |
BasicClientTlsStrategy(SSLContext sslContext,
SSLSessionVerifier verifier) |
BasicClientTlsStrategy(SSLSessionVerifier verifier)
Constructor with the default SSL context based on system properties and custom
SSLSessionVerifier verifier. |
Modifier and Type | Method and Description |
---|---|
boolean |
upgrade(TransportSecurityLayer tlsSession,
HttpHost host,
SocketAddress localAddress,
SocketAddress remoteAddress,
Object attachment,
Timeout handshakeTimeout)
|
void |
upgrade(TransportSecurityLayer tlsSession,
NamedEndpoint endpoint,
Object attachment,
Timeout handshakeTimeout,
FutureCallback<TransportSecurityLayer> callback)
Secures current session layer with TLS.
|
public BasicClientTlsStrategy(SSLContext sslContext, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
public BasicClientTlsStrategy(SSLContext sslContext, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
public BasicClientTlsStrategy(SSLContext sslContext, SSLSessionVerifier verifier)
public BasicClientTlsStrategy(SSLContext sslContext)
public BasicClientTlsStrategy()
public BasicClientTlsStrategy(SSLSessionVerifier verifier)
SSLSessionVerifier
verifier.verifier
- the custom SSLSessionVerifier
.SSLContext
public void upgrade(TransportSecurityLayer tlsSession, NamedEndpoint endpoint, Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)
TlsStrategy
upgrade
in interface TlsStrategy
tlsSession
- the session layerendpoint
- the name of the opposite endpoint when applicable or null
otherwise.attachment
- arbitrary object passes to the TLS session initialization code.handshakeTimeout
- the timeout to use while performing the TLS handshake; may be null
.callback
- Operation result callback.@Deprecated 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 given 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.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.