Package tigase.io
Class JcaTLSWrapper
- java.lang.Object
-
- tigase.io.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 Summary
Constructors Constructor Description JcaTLSWrapper(javax.net.ssl.SSLContext sslc, TLSEventHandler eventHandler, java.lang.String hostname, int port, boolean clientMode, boolean wantClientAuth)
JcaTLSWrapper(javax.net.ssl.SSLContext sslc, TLSEventHandler eventHandler, java.lang.String hostname, int port, boolean clientMode, boolean wantClientAuth, boolean needClientAuth)
Creates a newTLSWrapper
instance.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bytesConsumed()
void
close()
int
getAppBuffSize()
CertCheckResult
getCertificateStatus(boolean revocationEnabled, SSLContextContainerIfc sslContextContainer)
javax.net.ssl.SSLEngineResult.HandshakeStatus
getHandshakeStatus()
java.security.cert.Certificate[]
getLocalCertificates()
int
getNetBuffSize()
int
getPacketBuffSize()
java.security.cert.Certificate[]
getPeerCertificates()
TLSStatus
getStatus()
byte[]
getTlsUniqueBindingData()
boolean
isClientMode()
boolean
isNeedClientAuth()
void
notifyIfHandshakeFinished()
void
setDebugId(java.lang.String id)
protected void
tlsEngineHandshakeCompleted()
java.lang.String
toString()
java.nio.ByteBuffer
unwrap(java.nio.ByteBuffer net, java.nio.ByteBuffer app)
boolean
wantClientAuth()
void
wrap(java.nio.ByteBuffer app, java.nio.ByteBuffer net)
-
-
-
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 newTLSWrapper
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
-
tlsEngineHandshakeCompleted
protected void tlsEngineHandshakeCompleted()
-
notifyIfHandshakeFinished
public void notifyIfHandshakeFinished()
- Specified by:
notifyIfHandshakeFinished
in interfaceTLSWrapper
-
bytesConsumed
public int bytesConsumed()
- Specified by:
bytesConsumed
in interfaceTLSWrapper
-
close
public void close() throws javax.net.ssl.SSLException
- Specified by:
close
in interfaceTLSWrapper
- Throws:
javax.net.ssl.SSLException
-
getAppBuffSize
public int getAppBuffSize()
- Specified by:
getAppBuffSize
in interfaceTLSWrapper
-
getCertificateStatus
public CertCheckResult getCertificateStatus(boolean revocationEnabled, SSLContextContainerIfc sslContextContainer)
- Specified by:
getCertificateStatus
in interfaceTLSWrapper
-
getHandshakeStatus
public javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus()
- Specified by:
getHandshakeStatus
in interfaceTLSWrapper
-
getLocalCertificates
public java.security.cert.Certificate[] getLocalCertificates()
- Specified by:
getLocalCertificates
in interfaceTLSWrapper
-
getNetBuffSize
public int getNetBuffSize()
- Specified by:
getNetBuffSize
in interfaceTLSWrapper
-
getPacketBuffSize
public int getPacketBuffSize()
- Specified by:
getPacketBuffSize
in interfaceTLSWrapper
-
getPeerCertificates
public java.security.cert.Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException
- Specified by:
getPeerCertificates
in interfaceTLSWrapper
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getStatus
public TLSStatus getStatus()
- Specified by:
getStatus
in interfaceTLSWrapper
-
getTlsUniqueBindingData
public byte[] getTlsUniqueBindingData()
- Specified by:
getTlsUniqueBindingData
in interfaceTLSWrapper
-
isClientMode
public boolean isClientMode()
- Specified by:
isClientMode
in interfaceTLSWrapper
-
isNeedClientAuth
public boolean isNeedClientAuth()
- Specified by:
isNeedClientAuth
in interfaceTLSWrapper
-
setDebugId
public void setDebugId(java.lang.String id)
- Specified by:
setDebugId
in interfaceTLSWrapper
-
unwrap
public java.nio.ByteBuffer unwrap(java.nio.ByteBuffer net, java.nio.ByteBuffer app) throws javax.net.ssl.SSLException
- Specified by:
unwrap
in interfaceTLSWrapper
- Throws:
javax.net.ssl.SSLException
-
wantClientAuth
public boolean wantClientAuth()
- Specified by:
wantClientAuth
in interfaceTLSWrapper
-
wrap
public void wrap(java.nio.ByteBuffer app, java.nio.ByteBuffer net) throws javax.net.ssl.SSLException
- Specified by:
wrap
in interfaceTLSWrapper
- Throws:
javax.net.ssl.SSLException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-