Top Description Fields Constructors Methods
org.apache.hc.core5.http2.ssl

public Class ConscryptClientTlsStrategy

extends Object
implements TlsStrategy
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.nio.ssl.TlsStrategy
Imports
java.net.SocketAddress, javax.net.ssl.SSLContext, org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.http.HttpHost, .URIScheme, org.apache.hc.core5.http.nio.ssl.TlsStrategy, org.apache.hc.core5.net.NamedEndpoint, org.apache.hc.core5.reactor.ssl.SSLBufferMode, .SSLSessionInitializer, .SSLSessionVerifier, .TransportSecurityLayer, org.apache.hc.core5.ssl.SSLContexts, org.apache.hc.core5.util.Args, .Timeout

Basic client-side implementation of TlsStrategy that upgrades to TLS for all endpoints with HTTPS scheme.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final SSLSessionInitializer
private final SSLBufferMode
private final SSLContext
private final SSLSessionVerifier

Constructor Summary

AccessConstructor and Description
public
ConscryptClientTlsStrategy(final SSLContext sslContext, final SSLBufferMode sslBufferMode, final SSLSessionInitializer initializer, final SSLSessionVerifier verifier)

public
ConscryptClientTlsStrategy(final SSLContext sslContext, final SSLSessionInitializer initializer, final SSLSessionVerifier verifier)

public
ConscryptClientTlsStrategy(final SSLContext sslContext, final SSLSessionVerifier verifier)

public
public
ConscryptClientTlsStrategy()

Empty constructor with the default SSL context based on system properties.

public
ConscryptClientTlsStrategy(final SSLSessionVerifier
the custom SSLSessionVerifier.
verifier
)

Constructor with the default SSL context based on system properties and custom SSLSessionVerifier verifier.

Method Summary

Modifier and TypeMethod and Description
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.
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.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

initializerback to summary
private final SSLSessionInitializer initializer
sslBufferModeback to summary
private final SSLBufferMode sslBufferMode
sslContextback to summary
private final SSLContext sslContext
verifierback to summary
private final SSLSessionVerifier verifier

Constructor Detail

ConscryptClientTlsStrategyback to summary
public ConscryptClientTlsStrategy(final SSLContext sslContext, final SSLBufferMode sslBufferMode, final SSLSessionInitializer initializer, final SSLSessionVerifier verifier)
ConscryptClientTlsStrategyback to summary
public ConscryptClientTlsStrategy(final SSLContext sslContext, final SSLSessionInitializer initializer, final SSLSessionVerifier verifier)
ConscryptClientTlsStrategyback to summary
public ConscryptClientTlsStrategy(final SSLContext sslContext, final SSLSessionVerifier verifier)
ConscryptClientTlsStrategyback to summary
public ConscryptClientTlsStrategy(final SSLContext sslContext)
ConscryptClientTlsStrategyback to summary
public ConscryptClientTlsStrategy()

Empty constructor with the default SSL context based on system properties.

Since
5.2
See Also
SSLContext
ConscryptClientTlsStrategyback to summary
public ConscryptClientTlsStrategy(final SSLSessionVerifier verifier)

Constructor with the default SSL context based on system properties and custom SSLSessionVerifier verifier.

Parameters
verifier:SSLSessionVerifier

the custom SSLSessionVerifier.

Since
5.2

Method Detail

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
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