tigase.io

## Class JcaTLSWrapper

- java.lang.Object
- - tigase.io.JcaTLSWrapper

- All Implemented Interfaces:
    TLSWrapper

      public class JcaTLSWrapper
      extends Object
      implements TLSWrapper

  Describe class TLSWrapper here.
  Created: Sat Mar 5 09:13:29 2005
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JcaTLSWrapper(SSLContext sslc, TLSEventHandler eventHandler, String hostname, int port, boolean clientMode, boolean wantClientAuth)`
    `JcaTLSWrapper(SSLContext sslc, TLSEventHandler eventHandler, String hostname, int port, boolean clientMode, boolean wantClientAuth, boolean needClientAuth)` Creates a new `TLSWrapper` instance.
    `JcaTLSWrapper(SSLContext sslc, TLSEventHandler eventHandler, String hostname, int port, boolean clientMode, boolean wantClientAuth, boolean needClientAuth, String[] enabledCiphers, String[] enabledProtocols)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `bytesConsumed()`
    `void` | `close()`
    `int` | `getAppBuffSize()`
    `CertCheckResult` | `getCertificateStatus(boolean revocationEnabled, SSLContextContainerIfc sslContextContainer)`
    `SSLEngineResult.HandshakeStatus` | `getHandshakeStatus()`
    `Certificate[]` | `getLocalCertificates()`
    `int` | `getNetBuffSize()`
    `int` | `getPacketBuffSize()`
    `Certificate[]` | `getPeerCertificates()`
    `TLSStatus` | `getStatus()`
    `byte[]` | `getTlsUniqueBindingData()`
    `boolean` | `isClientMode()`
    `boolean` | `isNeedClientAuth()`
    `void` | `setDebugId(String id)`
    `ByteBuffer` | `unwrap(ByteBuffer net, ByteBuffer app)`
    `boolean` | `wantClientAuth()`
    `void` | `wrap(ByteBuffer app, ByteBuffer net)`

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

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

- - ### Constructor Detail

    - #### JcaTLSWrapper

          public JcaTLSWrapper(SSLContext sslc,
                               TLSEventHandler eventHandler,
                               String hostname,
                               int port,
                               boolean clientMode,
                               boolean wantClientAuth)

    - #### JcaTLSWrapper

          public JcaTLSWrapper(SSLContext sslc,
                               TLSEventHandler eventHandler,
                               String hostname,
                               int port,
                               boolean clientMode,
                               boolean wantClientAuth,
                               boolean needClientAuth)

      Creates a new `TLSWrapper` instance.
      Parameters:
        `sslc` -
        `eventHandler` -
        `hostname` -
        `port` -
        `clientMode` -
        `wantClientAuth` -

    - #### JcaTLSWrapper

          public JcaTLSWrapper(SSLContext sslc,
                               TLSEventHandler eventHandler,
                               String hostname,
                               int port,
                               boolean clientMode,
                               boolean wantClientAuth,
                               boolean needClientAuth,
                               String[] enabledCiphers,
                               String[] enabledProtocols)

  - ### Method Detail

    - #### bytesConsumed

          public int bytesConsumed()

      Specified by:
        `bytesConsumed` in interface `TLSWrapper`

    - #### close

          public void close()
                     throws SSLException

      Specified by:
        `close` in interface `TLSWrapper`
      Throws:
        `SSLException`

    - #### getAppBuffSize

          public int getAppBuffSize()

      Specified by:
        `getAppBuffSize` in interface `TLSWrapper`

    - #### getCertificateStatus

          public CertCheckResult getCertificateStatus(boolean revocationEnabled,
                                                      SSLContextContainerIfc sslContextContainer)

      Specified by:
        `getCertificateStatus` in interface `TLSWrapper`

    - #### getHandshakeStatus

          public SSLEngineResult.HandshakeStatus getHandshakeStatus()

      Specified by:
        `getHandshakeStatus` in interface `TLSWrapper`

    - #### getLocalCertificates

          public Certificate[] getLocalCertificates()

      Specified by:
        `getLocalCertificates` in interface `TLSWrapper`

    - #### getNetBuffSize

          public int getNetBuffSize()

      Specified by:
        `getNetBuffSize` in interface `TLSWrapper`

    - #### getPacketBuffSize

          public int getPacketBuffSize()

      Specified by:
        `getPacketBuffSize` in interface `TLSWrapper`

    - #### getPeerCertificates

          public Certificate[] getPeerCertificates()
                                            throws SSLPeerUnverifiedException

      Specified by:
        `getPeerCertificates` in interface `TLSWrapper`
      Throws:
        `SSLPeerUnverifiedException`

    - #### getStatus

          public TLSStatus getStatus()

      Specified by:
        `getStatus` in interface `TLSWrapper`

    - #### getTlsUniqueBindingData

          public byte[] getTlsUniqueBindingData()

      Specified by:
        `getTlsUniqueBindingData` in interface `TLSWrapper`

    - #### isClientMode

          public boolean isClientMode()

      Specified by:
        `isClientMode` in interface `TLSWrapper`

    - #### isNeedClientAuth

          public boolean isNeedClientAuth()

      Specified by:
        `isNeedClientAuth` in interface `TLSWrapper`

    - #### setDebugId

          public void setDebugId(String id)

      Specified by:
        `setDebugId` in interface `TLSWrapper`

    - #### unwrap

          public ByteBuffer unwrap(ByteBuffer net,
                                   ByteBuffer app)
                            throws SSLException

      Specified by:
        `unwrap` in interface `TLSWrapper`
      Throws:
        `SSLException`

    - #### wantClientAuth

          public boolean wantClientAuth()

      Specified by:
        `wantClientAuth` in interface `TLSWrapper`

    - #### wrap

          public void wrap(ByteBuffer app,
                           ByteBuffer net)
                    throws SSLException

      Specified by:
        `wrap` in interface `TLSWrapper`
      Throws:
        `SSLException`

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.