OpenSSLEngine (Apache Tomcat 8.5.57 API Documentation)

org.apache.tomcat.util.net.openssl

## Class OpenSSLEngine

- java.lang.Object
- - javax.net.ssl.SSLEngine
  - - org.apache.tomcat.util.net.openssl.OpenSSLEngine

- All Implemented Interfaces:
    SSLUtil.ProtocolInfo

      public final class OpenSSLEngine
      extends SSLEngine
      implements SSLUtil.ProtocolInfo

  Implements a `SSLEngine` using OpenSSL BIO abstractions.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Set<String>` | `AVAILABLE_CIPHER_SUITES`
    `static Set<String>` | `IMPLEMENTED_PROTOCOLS_SET`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginHandshake()`
    `void` | `closeInbound()`
    `void` | `closeOutbound()`
    `protected void` | `finalize()`
    `Runnable` | `getDelegatedTask()`
    `String[]` | `getEnabledCipherSuites()`
    `String[]` | `getEnabledProtocols()`
    `boolean` | `getEnableSessionCreation()`
    `SSLEngineResult.HandshakeStatus` | `getHandshakeStatus()`
    `boolean` | `getNeedClientAuth()`
    `String` | `getNegotiatedProtocol()` ALPN information.
    `SSLSession` | `getSession()`
    `String[]` | `getSupportedCipherSuites()`
    `String[]` | `getSupportedProtocols()`
    `boolean` | `getUseClientMode()`
    `boolean` | `getWantClientAuth()`
    `boolean` | `isInboundDone()`
    `boolean` | `isOutboundDone()`
    `void` | `setEnabledCipherSuites(String[] cipherSuites)`
    `void` | `setEnabledProtocols(String[] protocols)`
    `void` | `setEnableSessionCreation(boolean b)`
    `void` | `setNeedClientAuth(boolean b)`
    `void` | `setUseClientMode(boolean clientMode)`
    `void` | `setWantClientAuth(boolean b)`
    `void` | `shutdown()` Destroys this engine.
    `SSLEngineResult` | `unwrap(ByteBuffer src, ByteBuffer[] dsts, int offset, int length)`
    `SSLEngineResult` | `wrap(ByteBuffer[] srcs, int offset, int length, ByteBuffer dst)`

    - ### Methods inherited from class javax.net.ssl.SSLEngine

      `getHandshakeSession, getPeerHost, getPeerPort, getSSLParameters, setSSLParameters, unwrap, unwrap, wrap, wrap`

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

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

- - ### Field Detail

    - #### AVAILABLE_CIPHER_SUITES

          public static final Set<String> AVAILABLE_CIPHER_SUITES

    - #### IMPLEMENTED_PROTOCOLS_SET

          public static final Set<String> IMPLEMENTED_PROTOCOLS_SET

  - ### Method Detail

    - #### getNegotiatedProtocol

          public String getNegotiatedProtocol()

      Description copied from interface: `SSLUtil.ProtocolInfo`
      ALPN information.
      Specified by:
        `getNegotiatedProtocol` in interface `SSLUtil.ProtocolInfo`
      Returns:
        the protocol selected using ALPN

    - #### shutdown

          public void shutdown()

      Destroys this engine.

    - #### wrap

          public SSLEngineResult wrap(ByteBuffer[] srcs,
                             int offset,
                             int length,
                             ByteBuffer dst)
                               throws SSLException

      Specified by:
        `wrap` in class `SSLEngine`
      Throws:
        `SSLException`

    - #### unwrap

          public SSLEngineResult unwrap(ByteBuffer src,
                               ByteBuffer[] dsts,
                               int offset,
                               int length)
                                 throws SSLException

      Specified by:
        `unwrap` in class `SSLEngine`
      Throws:
        `SSLException`

    - #### getDelegatedTask

          public Runnable getDelegatedTask()

      Specified by:
        `getDelegatedTask` in class `SSLEngine`

    - #### closeInbound

          public void closeInbound()
                            throws SSLException

      Specified by:
        `closeInbound` in class `SSLEngine`
      Throws:
        `SSLException`

    - #### isInboundDone

          public boolean isInboundDone()

      Specified by:
        `isInboundDone` in class `SSLEngine`

    - #### closeOutbound

          public void closeOutbound()

      Specified by:
        `closeOutbound` in class `SSLEngine`

    - #### isOutboundDone

          public boolean isOutboundDone()

      Specified by:
        `isOutboundDone` in class `SSLEngine`

    - #### getSupportedCipherSuites

          public String[] getSupportedCipherSuites()

      Specified by:
        `getSupportedCipherSuites` in class `SSLEngine`

    - #### getEnabledCipherSuites

          public String[] getEnabledCipherSuites()

      Specified by:
        `getEnabledCipherSuites` in class `SSLEngine`

    - #### setEnabledCipherSuites

          public void setEnabledCipherSuites(String[] cipherSuites)

      Specified by:
        `setEnabledCipherSuites` in class `SSLEngine`

    - #### getSupportedProtocols

          public String[] getSupportedProtocols()

      Specified by:
        `getSupportedProtocols` in class `SSLEngine`

    - #### getEnabledProtocols

          public String[] getEnabledProtocols()

      Specified by:
        `getEnabledProtocols` in class `SSLEngine`

    - #### setEnabledProtocols

          public void setEnabledProtocols(String[] protocols)

      Specified by:
        `setEnabledProtocols` in class `SSLEngine`

    - #### getSession

          public SSLSession getSession()

      Specified by:
        `getSession` in class `SSLEngine`

    - #### beginHandshake

          public void beginHandshake()
                              throws SSLException

      Specified by:
        `beginHandshake` in class `SSLEngine`
      Throws:
        `SSLException`

    - #### getHandshakeStatus

          public SSLEngineResult.HandshakeStatus getHandshakeStatus()

      Specified by:
        `getHandshakeStatus` in class `SSLEngine`

    - #### setUseClientMode

          public void setUseClientMode(boolean clientMode)

      Specified by:
        `setUseClientMode` in class `SSLEngine`

    - #### getUseClientMode

          public boolean getUseClientMode()

      Specified by:
        `getUseClientMode` in class `SSLEngine`

    - #### setNeedClientAuth

          public void setNeedClientAuth(boolean b)

      Specified by:
        `setNeedClientAuth` in class `SSLEngine`

    - #### getNeedClientAuth

          public boolean getNeedClientAuth()

      Specified by:
        `getNeedClientAuth` in class `SSLEngine`

    - #### setWantClientAuth

          public void setWantClientAuth(boolean b)

      Specified by:
        `setWantClientAuth` in class `SSLEngine`

    - #### getWantClientAuth

          public boolean getWantClientAuth()

      Specified by:
        `getWantClientAuth` in class `SSLEngine`

    - #### setEnableSessionCreation

          public void setEnableSessionCreation(boolean b)

      Specified by:
        `setEnableSessionCreation` in class `SSLEngine`

    - #### getEnableSessionCreation

          public boolean getEnableSessionCreation()

      Specified by:
        `getEnableSessionCreation` in class `SSLEngine`

    - #### finalize

          protected void finalize()
                           throws Throwable

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

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