org.apache.hc.client5.http.ssl

## Class H2TlsStrategy

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

All Implemented Interfaces:
  org.apache.hc.core5.http.nio.ssl.TlsStrategy

    public class H2TlsStrategy
    extends Object
    implements org.apache.hc.core5.http.nio.ssl.TlsStrategy

Default SSL upgrade strategy for non-blocking connections.

Since:
  5.0

### Constructor Summary

Constructors
Constructor and Description
`H2TlsStrategy(SSLContext sslcontext)`
`H2TlsStrategy(SSLContext sslcontext, HostnameVerifier hostnameVerifier)`
`H2TlsStrategy(SSLContext sslContext, String[] supportedProtocols, String[] supportedCipherSuites, org.apache.hc.core5.reactor.ssl.SSLBufferManagement sslBufferManagement, HostnameVerifier hostnameVerifier)`

### Method Summary

Methods
`protected org.apache.hc.core5.reactor.ssl.TlsDetails` `createTlsDetails(SSLEngine sslEngine)`
`static org.apache.hc.core5.http.nio.ssl.TlsStrategy` `getDefault()`
`static HostnameVerifier` `getDefaultHostnameVerifier()`
`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)`
`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

#### H2TlsStrategy

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

#### H2TlsStrategy

    public H2TlsStrategy(SSLContext sslcontext,
                 HostnameVerifier hostnameVerifier)

#### H2TlsStrategy

    public H2TlsStrategy(SSLContext sslcontext)

### Method Detail

#### getDefaultHostnameVerifier

    public static HostnameVerifier getDefaultHostnameVerifier()

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

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

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`

#### createTlsDetails

    protected org.apache.hc.core5.reactor.ssl.TlsDetails createTlsDetails(SSLEngine sslEngine)