Package tigase.io

Class JcaTLSWrapper

  • All Implemented Interfaces:
    TLSWrapper

    public class JcaTLSWrapper
    extends java.lang.Object
    implements TLSWrapper
    Describe class TLSWrapper here.
    Created: Sat Mar 5 09:13:29 2005
    Author:
    Artur Hefczyc
    • Constructor Detail

      • JcaTLSWrapper

        public JcaTLSWrapper​(javax.net.ssl.SSLContext sslc,
                             TLSEventHandler eventHandler,
                             java.lang.String hostname,
                             int port,
                             boolean clientMode,
                             boolean wantClientAuth)
      • JcaTLSWrapper

        public JcaTLSWrapper​(javax.net.ssl.SSLContext sslc,
                             TLSEventHandler eventHandler,
                             java.lang.String hostname,
                             int port,
                             boolean clientMode,
                             boolean wantClientAuth,
                             boolean needClientAuth)
        Creates a new TLSWrapper instance.
      • JcaTLSWrapper

        public JcaTLSWrapper​(javax.net.ssl.SSLContext sslc,
                             TLSEventHandler eventHandler,
                             java.lang.String remote_hostname,
                             int port,
                             boolean clientMode,
                             boolean wantClientAuth,
                             boolean needClientAuth,
                             java.lang.String[] enabledCiphers,
                             java.lang.String[] enabledProtocols)
    • Method Detail

      • close

        public void close()
                   throws javax.net.ssl.SSLException
        Specified by:
        close in interface TLSWrapper
        Throws:
        javax.net.ssl.SSLException
      • getHandshakeStatus

        public javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus()
        Specified by:
        getHandshakeStatus in interface TLSWrapper
      • getPeerCertificates

        public java.security.cert.Certificate[] getPeerCertificates()
                                                             throws javax.net.ssl.SSLPeerUnverifiedException
        Specified by:
        getPeerCertificates in interface TLSWrapper
        Throws:
        javax.net.ssl.SSLPeerUnverifiedException
      • setDebugId

        public void setDebugId​(java.lang.String id)
        Specified by:
        setDebugId in interface TLSWrapper
      • unwrap

        public java.nio.ByteBuffer unwrap​(java.nio.ByteBuffer net,
                                          java.nio.ByteBuffer app)
                                   throws javax.net.ssl.SSLException
        Specified by:
        unwrap in interface TLSWrapper
        Throws:
        javax.net.ssl.SSLException
      • wrap

        public void wrap​(java.nio.ByteBuffer app,
                         java.nio.ByteBuffer net)
                  throws javax.net.ssl.SSLException
        Specified by:
        wrap in interface TLSWrapper
        Throws:
        javax.net.ssl.SSLException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object