OpenSSLEngine (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.tomcat.util.net.openssl, class: OpenSSLEngine

# 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
  Description
  `static final Set<String>`
  `AVAILABLE_CIPHER_SUITES`
  Set of available cipher suites.
  `static final Set<String>`
  `IMPLEMENTED_PROTOCOLS_SET`
  Set of implemented protocols.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `beginHandshake()`
  `void`
  `closeInbound()`
  `void`
  `closeOutbound()`
  `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 SSLEngine

  `getApplicationProtocol, getHandshakeApplicationProtocol, getHandshakeApplicationProtocolSelector, getHandshakeSession, getPeerHost, getPeerPort, getSSLParameters, setHandshakeApplicationProtocolSelector, setSSLParameters, unwrap, unwrap, wrap, wrap`

  ### Methods inherited from class Object

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

- ## Field Details

  - ### AVAILABLE_CIPHER_SUITES

    public static final Set<String> AVAILABLE_CIPHER_SUITES
    Set of available cipher suites.

  - ### IMPLEMENTED_PROTOCOLS_SET

    public static final Set<String> IMPLEMENTED_PROTOCOLS_SET
    Set of implemented protocols.

- ## Method Details

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