Top Fields Constructors Methods
org.apache.hc.client5.http.ssl

pack-priv abstract Class AbstractClientTlsStrategy

extends Object
implements TlsStrategy
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.nio.ssl.TlsStrategy
Known Direct Subclasses
org.apache.hc.client5.http.ssl.ConscryptClientTlsStrategy, org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy
Annotations
@Contract
threading:STATELESS
Imports
java.net.SocketAddress, java.util.Arrays, javax.net.ssl.HostnameVerifier, .SSLContext, .SSLEngine, .SSLException, .SSLHandshakeException, .SSLParameters, .SSLSession, org.apache.hc.client5.http.config.TlsConfig, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.http.HttpHost, org.apache.hc.core5.http.nio.ssl.TlsStrategy, org.apache.hc.core5.http.ssl.TLS, .TlsCiphers, org.apache.hc.core5.http2.HttpVersionPolicy, org.apache.hc.core5.http2.ssl.ApplicationProtocol, .H2TlsSupport, org.apache.hc.core5.net.NamedEndpoint, org.apache.hc.core5.reactor.ssl.SSLBufferMode, .TlsDetails, .TransportSecurityLayer, org.apache.hc.core5.util.Args, .Timeout, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final HostnameVerifier
private static final Logger
private final SSLBufferMode
private final SSLContext
private final String[]
private final String[]
private final TlsSessionValidator

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractClientTlsStrategy(final SSLContext sslContext, final String[] supportedProtocols, final String[] supportedCipherSuites, final SSLBufferMode sslBufferManagement, final HostnameVerifier hostnameVerifier)

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract void
applyParameters(SSLEngine sslEngine, SSLParameters sslParameters, String[] appProtocols)

pack-priv abstract TlsDetails
protected void
initializeEngine(final SSLEngine sslEngine)

public boolean
upgrade(final TransportSecurityLayer
the session layer
tlsSession
,
final HttpHost
the name of the opposite endpoint when given or null otherwise.
host
,
final SocketAddress
the address of the local endpoint.
localAddress
,
final SocketAddress
the address of the remote endpoint.
remoteAddress
,
final Object
arbitrary object passes to the TLS session initialization code.
attachment
,
final Timeout
the timeout to use while performing the TLS handshake; may be null.
handshakeTimeout
)

Implements org.apache.hc.core5.http.nio.ssl.TlsStrategy.upgrade.

Secures current session layer with TLS.
public void
upgrade(final TransportSecurityLayer
the session layer
tlsSession
,
final NamedEndpoint
the name of the opposite endpoint when applicable or null otherwise.
endpoint
,
final Object
arbitrary object passes to the TLS session initialization code.
attachment
,
final Timeout
the timeout to use while performing the TLS handshake; may be null.
handshakeTimeout
,
final FutureCallback<TransportSecurityLayer>
Operation result callback.
callback
)

Overrides default org.apache.hc.core5.http.nio.ssl.TlsStrategy.upgrade.

Secures current session layer with TLS.
protected void
verifySession(final String hostname, final SSLSession sslsession)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hostnameVerifierback to summary
private final HostnameVerifier hostnameVerifier
LOGback to summary
private static final Logger LOG
sslBufferManagementback to summary
private final SSLBufferMode sslBufferManagement
sslContextback to summary
private final SSLContext sslContext
supportedCipherSuitesback to summary
private final String[] supportedCipherSuites
supportedProtocolsback to summary
private final String[] supportedProtocols
tlsSessionValidatorback to summary
private final TlsSessionValidator tlsSessionValidator

Constructor Detail

AbstractClientTlsStrategyback to summary
pack-priv AbstractClientTlsStrategy(final SSLContext sslContext, final String[] supportedProtocols, final String[] supportedCipherSuites, final SSLBufferMode sslBufferManagement, final HostnameVerifier hostnameVerifier)

Method Detail

applyParametersback to summary
pack-priv abstract void applyParameters(SSLEngine sslEngine, SSLParameters sslParameters, String[] appProtocols)
createTlsDetailsback to summary
pack-priv abstract TlsDetails createTlsDetails(SSLEngine sslEngine)
initializeEngineback to summary
protected void initializeEngine(final SSLEngine sslEngine)
upgradeback to summary
public boolean upgrade(final TransportSecurityLayer tlsSession, final HttpHost host, final SocketAddress localAddress, final SocketAddress remoteAddress, final Object attachment, final Timeout handshakeTimeout)

Implements org.apache.hc.core5.http.nio.ssl.TlsStrategy.upgrade.

Doc from org.apache.hc.core5.http.nio.ssl.TlsStrategy.upgrade.

Secures current session layer with TLS.

Parameters
tlsSession:TransportSecurityLayer

the session layer

host:HttpHost

the name of the opposite endpoint when given or null otherwise.

localAddress:SocketAddress

the address of the local endpoint.

remoteAddress:SocketAddress

the address of the remote endpoint.

attachment:Object

arbitrary object passes to the TLS session initialization code.

handshakeTimeout:Timeout

the timeout to use while performing the TLS handshake; may be null.

Returns:boolean

true if the session has been upgraded, false otherwise.

Annotations
@Deprecated
@Override
upgradeback to summary
public void upgrade(final TransportSecurityLayer tlsSession, final NamedEndpoint endpoint, final Object attachment, final Timeout handshakeTimeout, final FutureCallback<TransportSecurityLayer> callback)

Overrides default org.apache.hc.core5.http.nio.ssl.TlsStrategy.upgrade.

Doc from org.apache.hc.core5.http.nio.ssl.TlsStrategy.upgrade.

Secures current session layer with TLS.

Parameters
tlsSession:TransportSecurityLayer

the session layer

endpoint:NamedEndpoint

the name of the opposite endpoint when applicable or null otherwise.

attachment:Object

arbitrary object passes to the TLS session initialization code.

handshakeTimeout:Timeout

the timeout to use while performing the TLS handshake; may be null.

callback:FutureCallback<TransportSecurityLayer>

Operation result callback.

Annotations
@Override
verifySessionback to summary
protected void verifySession(final String hostname, final SSLSession sslsession) throws SSLException