org.apache.hc.client5.http.ssl

## Class DefaultClientTlsStrategy

- java.lang.Object
- - org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy

All Implemented Interfaces:
  TlsStrategy

    @Contract(threading=STATELESS)
    public class DefaultClientTlsStrategy
    extends Object

TLS upgrade strategy for non-blocking client connections.

Since:
  5.0

### Constructor Summary

Constructors
Constructor and Description
`DefaultClientTlsStrategy(SSLContext sslContext)`
`DefaultClientTlsStrategy(SSLContext sslContext, HostnameVerifier hostnameVerifier)`
`DefaultClientTlsStrategy(SSLContext sslContext, String[] supportedProtocols, String[] supportedCipherSuites, SSLBufferMode sslBufferManagement, HostnameVerifier hostnameVerifier)`
`DefaultClientTlsStrategy(SSLContext sslContext, String[] supportedProtocols, String[] supportedCipherSuites, SSLBufferMode sslBufferManagement, HostnameVerifier hostnameVerifier, Factory<SSLEngine,TlsDetails> tlsDetailsFactory)` Deprecated. Use `DefaultClientTlsStrategy(SSLContext, String[], String[], SSLBufferMode, HostnameVerifier)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`static TlsStrategy` `getDefault()`
`static TlsStrategy` `getSystemDefault()`
`protected void` `initializeEngine(SSLEngine sslEngine)`
`boolean` `upgrade(TransportSecurityLayer tlsSession, HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, Timeout handshakeTimeout)` Deprecated. use `upgrade(TransportSecurityLayer, NamedEndpoint, Object, Timeout, FutureCallback)`
`void` `upgrade(TransportSecurityLayer tlsSession, NamedEndpoint endpoint, Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)`
`protected void` `verifySession(String hostname, SSLSession sslsession)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultClientTlsStrategy

    @Deprecated
    public DefaultClientTlsStrategy(SSLContext sslContext,
                                                String[] supportedProtocols,
                                                String[] supportedCipherSuites,
                                                SSLBufferMode sslBufferManagement,
                                                HostnameVerifier hostnameVerifier,
                                                Factory<SSLEngine,TlsDetails> tlsDetailsFactory)

Deprecated. Use `DefaultClientTlsStrategy(SSLContext, String[], String[], SSLBufferMode, HostnameVerifier)`

#### DefaultClientTlsStrategy

    public DefaultClientTlsStrategy(SSLContext sslContext,
                                    String[] supportedProtocols,
                                    String[] supportedCipherSuites,
                                    SSLBufferMode sslBufferManagement,
                                    HostnameVerifier hostnameVerifier)

#### DefaultClientTlsStrategy

    public DefaultClientTlsStrategy(SSLContext sslContext,
                                    HostnameVerifier hostnameVerifier)

#### DefaultClientTlsStrategy

    public DefaultClientTlsStrategy(SSLContext sslContext)

### Method Detail

#### getDefault

    public static TlsStrategy getDefault()

#### getSystemDefault

    public static TlsStrategy getSystemDefault()

#### upgrade

    @Deprecated
    public boolean upgrade(TransportSecurityLayer tlsSession,
                                       HttpHost host,
                                       SocketAddress localAddress,
                                       SocketAddress remoteAddress,
                                       Object attachment,
                                       Timeout handshakeTimeout)

Deprecated. use `upgrade(TransportSecurityLayer, NamedEndpoint, Object, Timeout, FutureCallback)`

Specified by:
  `upgrade` in interface `TlsStrategy`

#### upgrade

    public void upgrade(TransportSecurityLayer tlsSession,
                        NamedEndpoint endpoint,
                        Object attachment,
                        Timeout handshakeTimeout,
                        FutureCallback<TransportSecurityLayer> callback)

Specified by:
  `upgrade` in interface `TlsStrategy`

#### initializeEngine

    protected void initializeEngine(SSLEngine sslEngine)

#### verifySession

    protected void verifySession(String hostname,
                                 SSLSession sslsession)
                          throws SSLException

Throws:
  `SSLException`