org.apache.hc.client5.http.ssl

## Class DefaultClientTlsStrategy

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

- All Implemented Interfaces:
    org.apache.hc.core5.http.nio.ssl.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, org.apache.hc.core5.reactor.ssl.SSLBufferMode sslBufferManagement, HostnameVerifier hostnameVerifier)`
    `DefaultClientTlsStrategy(SSLContext sslContext, String[] supportedProtocols, String[] supportedCipherSuites, org.apache.hc.core5.reactor.ssl.SSLBufferMode sslBufferManagement, HostnameVerifier hostnameVerifier, org.apache.hc.core5.function.Factory<SSLEngine,org.apache.hc.core5.reactor.ssl.TlsDetails> tlsDetailsFactory)` Deprecated. Use `DefaultClientTlsStrategy(SSLContext, String[], String[], SSLBufferMode, HostnameVerifier)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.apache.hc.core5.http.nio.ssl.TlsStrategy` | `getDefault()`
    `static org.apache.hc.core5.http.nio.ssl.TlsStrategy` | `getSystemDefault()`
    `protected void` | `initializeEngine(SSLEngine sslEngine)`
    `boolean` | `upgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession, org.apache.hc.core5.http.HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, org.apache.hc.core5.util.Timeout handshakeTimeout)` Deprecated. use `upgrade(TransportSecurityLayer, NamedEndpoint, Object, Timeout, FutureCallback)`
    `void` | `upgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession, org.apache.hc.core5.net.NamedEndpoint endpoint, Object attachment, org.apache.hc.core5.util.Timeout handshakeTimeout, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ssl.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,
                                                      org.apache.hc.core5.reactor.ssl.SSLBufferMode sslBufferManagement,
                                                      HostnameVerifier hostnameVerifier,
                                                      org.apache.hc.core5.function.Factory<SSLEngine,org.apache.hc.core5.reactor.ssl.TlsDetails> tlsDetailsFactory)

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

    - #### DefaultClientTlsStrategy

          public DefaultClientTlsStrategy(SSLContext sslContext,
                                          String[] supportedProtocols,
                                          String[] supportedCipherSuites,
                                          org.apache.hc.core5.reactor.ssl.SSLBufferMode sslBufferManagement,
                                          HostnameVerifier hostnameVerifier)

    - #### DefaultClientTlsStrategy

          public DefaultClientTlsStrategy(SSLContext sslcontext,
                                          HostnameVerifier hostnameVerifier)

    - #### DefaultClientTlsStrategy

          public DefaultClientTlsStrategy(SSLContext sslcontext)

  - ### Method Detail

    - #### getDefault

          public static org.apache.hc.core5.http.nio.ssl.TlsStrategy getDefault()

    - #### getSystemDefault

          public static org.apache.hc.core5.http.nio.ssl.TlsStrategy getSystemDefault()

    - #### upgrade

          @Deprecated
          public boolean upgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession,
                                             org.apache.hc.core5.http.HttpHost host,
                                             SocketAddress localAddress,
                                             SocketAddress remoteAddress,
                                             Object attachment,
                                             org.apache.hc.core5.util.Timeout handshakeTimeout)

      Deprecated. use `upgrade(TransportSecurityLayer, NamedEndpoint, Object, Timeout, FutureCallback)`
      Specified by:
        `upgrade` in interface `org.apache.hc.core5.http.nio.ssl.TlsStrategy`

    - #### upgrade

          public void upgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession,
                              org.apache.hc.core5.net.NamedEndpoint endpoint,
                              Object attachment,
                              org.apache.hc.core5.util.Timeout handshakeTimeout,
                              org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ssl.TransportSecurityLayer> callback)

      Specified by:
        `upgrade` in interface `org.apache.hc.core5.http.nio.ssl.TlsStrategy`

    - #### initializeEngine

          protected void initializeEngine(SSLEngine sslEngine)

    - #### verifySession

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

      Throws:
        `SSLException`

Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.