OpenSSLContext (Apache Tomcat 8.5.57 API Documentation)

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` | `cctx`
    `protected long` | `ctx`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCertificate(SSLHostConfigCertificate certificate)`
    `SSLEngine` | `createSSLEngine()`
    `void` | `destroy()`
    `protected void` | `finalize()`
    `X509Certificate[]` | `getAcceptedIssuers()`
    `X509Certificate[]` | `getCertificateChain(String alias)`
    `String` | `getEnabledProtocol()`
    `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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cctx

          protected final long cctx

    - #### ctx

          protected final long ctx

  - ### Constructor Detail

    - #### OpenSSLContext

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

      Throws:
        `SSLException`

  - ### Method Detail

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

    - #### addCertificate

          public void addCertificate(SSLHostConfigCertificate certificate)
                              throws Exception

      Throws:
        `Exception`

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

    - #### getCertificateChain

          public X509Certificate[] getCertificateChain(String alias)

      Specified by:
        `getCertificateChain` in interface `SSLContext`

    - #### getAcceptedIssuers

          public X509Certificate[] getAcceptedIssuers()

      Specified by:
        `getAcceptedIssuers` in interface `SSLContext`

    - #### finalize

          protected void finalize()
                           throws Throwable

      Overrides:
        `finalize` in class `Object`
      Throws:
        `Throwable`

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