org.apache.tomcat.util.net.openssl

## Class OpenSSLContext

- java.lang.Object
- - org.apache.tomcat.util.net.openssl.OpenSSLContext

- All Implemented Interfaces:
    SSLContext

      public class OpenSSLContext
      extends Object
      implements SSLContext

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected long` | `ctx`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OpenSSLContext(SSLHostConfigCertificate certificate, List<String> negotiableProtocols)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SSLEngine` | `createSSLEngine()`
    `void` | `destroy()`
    `String` | `getEnabledProtocol()`
    `List<String>` | `getJsseCipherNames()`
    `SSLSessionContext` | `getServerSessionContext()`
    `SSLServerSocketFactory` | `getServerSocketFactory()`
    `SSLParameters` | `getSupportedSSLParameters()`
    `void` | `init(KeyManager[] kms, TrustManager[] tms, SecureRandom sr)` Setup the SSL_CTX.
    `void` | `setEnabledProtocol(String protocol)`

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

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

- - ### Field Detail

    - #### ctx

          protected final long ctx

  - ### Constructor Detail

    - #### OpenSSLContext

          public OpenSSLContext(SSLHostConfigCertificate certificate,
                        List<String> negotiableProtocols)
                         throws SSLException

      Throws:
        `SSLException`

  - ### Method Detail

    - #### getJsseCipherNames

          public List<String> getJsseCipherNames()

    - #### getEnabledProtocol

          public String getEnabledProtocol()

    - #### setEnabledProtocol

          public void setEnabledProtocol(String protocol)

    - #### destroy

          public void destroy()

      Specified by:
        `destroy` in interface `SSLContext`

    - #### init

          public void init(KeyManager[] kms,
                  TrustManager[] tms,
                  SecureRandom sr)

      Setup the SSL_CTX.
      Specified by:
        `init` in interface `SSLContext`
      Parameters:
        `kms` - Must contain a KeyManager of the type `OpenSSLKeyManager`
        `tms` - Must contain a TrustManager of the type `X509TrustManager`
        `sr` - Is not used for this implementation.

    - #### getServerSessionContext

          public SSLSessionContext getServerSessionContext()

      Specified by:
        `getServerSessionContext` in interface `SSLContext`

    - #### createSSLEngine

          public SSLEngine createSSLEngine()

      Specified by:
        `createSSLEngine` in interface `SSLContext`

    - #### getServerSocketFactory

          public SSLServerSocketFactory getServerSocketFactory()

      Specified by:
        `getServerSocketFactory` in interface `SSLContext`

    - #### getSupportedSSLParameters

          public SSLParameters getSupportedSSLParameters()

      Specified by:
        `getSupportedSSLParameters` in interface `SSLContext`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.