Package org.apache.hc.core5.http2.ssl
Class ConscryptServerTlsStrategy
java.lang.Object
org.apache.hc.core5.http2.ssl.ConscryptServerTlsStrategy
- All Implemented Interfaces:
TlsStrategy
Basic side-side implementation of
TlsStrategy that upgrades to TLS for endpoints
with the specified local ports.- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SSLSessionInitializerprivate final SecurePortStrategyprivate final SSLBufferModeprivate final SSLContextprivate final SSLSessionVerifier -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor with the default SSL context based on system properties.ConscryptServerTlsStrategy(SSLContext sslContext) ConscryptServerTlsStrategy(SSLContext sslContext, int... securePorts) Deprecated.ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy) Deprecated.ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier) ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionInitializer initializer, SSLSessionVerifier verifier) ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionVerifier verifier) Deprecated.ConscryptServerTlsStrategy(SSLContext sslContext, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier) ConscryptServerTlsStrategy(SSLContext sslContext, SSLSessionInitializer initializer, SSLSessionVerifier verifier) ConscryptServerTlsStrategy(SSLContext sslContext, SSLSessionVerifier verifier) ConscryptServerTlsStrategy(SSLSessionVerifier verifier) Constructor with the default SSL context based on system properties and customSSLSessionVerifier. -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanisApplicable(SocketAddress localAddress) booleanupgrade(TransportSecurityLayer tlsSession, HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, Timeout handshakeTimeout) voidupgrade(TransportSecurityLayer tlsSession, NamedEndpoint endpoint, Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback) Secures current session layer with TLS.
-
Field Details
-
sslContext
-
securePortStrategy
-
sslBufferMode
-
initializer
-
verifier
-
-
Constructor Details
-
ConscryptServerTlsStrategy
@Deprecated public ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier) -
ConscryptServerTlsStrategy
@Deprecated public ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionInitializer initializer, SSLSessionVerifier verifier) -
ConscryptServerTlsStrategy
@Deprecated public ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionVerifier verifier) Deprecated. -
ConscryptServerTlsStrategy
@Deprecated public ConscryptServerTlsStrategy(SSLContext sslContext, SecurePortStrategy securePortStrategy) Deprecated. -
ConscryptServerTlsStrategy
Deprecated. -
ConscryptServerTlsStrategy
public ConscryptServerTlsStrategy(SSLContext sslContext, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier) -
ConscryptServerTlsStrategy
public ConscryptServerTlsStrategy(SSLContext sslContext, SSLSessionInitializer initializer, SSLSessionVerifier verifier) -
ConscryptServerTlsStrategy
-
ConscryptServerTlsStrategy
-
ConscryptServerTlsStrategy
public ConscryptServerTlsStrategy()Empty constructor with the default SSL context based on system properties.- Since:
- 5.2
- See Also:
-
ConscryptServerTlsStrategy
Constructor with the default SSL context based on system properties and customSSLSessionVerifier.- Parameters:
verifier- the customSSLSessionVerifier.- Since:
- 5.2
- See Also:
-
-
Method Details
-
isApplicable
-
upgrade
public void upgrade(TransportSecurityLayer tlsSession, NamedEndpoint endpoint, Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback) Description copied from interface:TlsStrategySecures current session layer with TLS.- Specified by:
upgradein interfaceTlsStrategy- Parameters:
tlsSession- the session layerendpoint- the name of the opposite endpoint when applicable ornullotherwise.attachment- arbitrary object passes to the TLS session initialization code.handshakeTimeout- the timeout to use while performing the TLS handshake; may benull.callback- Operation result callback.
-
upgrade
@Deprecated public boolean upgrade(TransportSecurityLayer tlsSession, HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, Timeout handshakeTimeout) Description copied from interface:TlsStrategySecures current session layer with TLS.- Specified by:
upgradein interfaceTlsStrategy- Parameters:
tlsSession- the session layerhost- the name of the opposite endpoint when given ornullotherwise.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 benull.- Returns:
trueif the session has been upgraded,falseotherwise.
-
ConscryptServerTlsStrategy(SSLContext)