Package 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 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 newTLSWrapperinstance.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 Description intbytesConsumed()voidclose()intgetAppBuffSize()CertCheckResultgetCertificateStatus(boolean revocationEnabled, SSLContextContainerIfc sslContextContainer)SSLEngineResult.HandshakeStatusgetHandshakeStatus()Certificate[]getLocalCertificates()intgetNetBuffSize()intgetPacketBuffSize()Certificate[]getPeerCertificates()TLSStatusgetStatus()byte[]getTlsUniqueBindingData()booleanisClientMode()booleanisNeedClientAuth()voidsetDebugId(String id)ByteBufferunwrap(ByteBuffer net, ByteBuffer app)booleanwantClientAuth()voidwrap(ByteBuffer app, ByteBuffer net)
-
-
-
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 newTLSWrapperinstance.- 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:
bytesConsumedin interfaceTLSWrapper
-
close
public void close() throws SSLException- Specified by:
closein interfaceTLSWrapper- Throws:
SSLException
-
getAppBuffSize
public int getAppBuffSize()
- Specified by:
getAppBuffSizein interfaceTLSWrapper
-
getCertificateStatus
public CertCheckResult getCertificateStatus(boolean revocationEnabled, SSLContextContainerIfc sslContextContainer)
- Specified by:
getCertificateStatusin interfaceTLSWrapper
-
getHandshakeStatus
public SSLEngineResult.HandshakeStatus getHandshakeStatus()
- Specified by:
getHandshakeStatusin interfaceTLSWrapper
-
getLocalCertificates
public Certificate[] getLocalCertificates()
- Specified by:
getLocalCertificatesin interfaceTLSWrapper
-
getNetBuffSize
public int getNetBuffSize()
- Specified by:
getNetBuffSizein interfaceTLSWrapper
-
getPacketBuffSize
public int getPacketBuffSize()
- Specified by:
getPacketBuffSizein interfaceTLSWrapper
-
getPeerCertificates
public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException
- Specified by:
getPeerCertificatesin interfaceTLSWrapper- Throws:
SSLPeerUnverifiedException
-
getStatus
public TLSStatus getStatus()
- Specified by:
getStatusin interfaceTLSWrapper
-
getTlsUniqueBindingData
public byte[] getTlsUniqueBindingData()
- Specified by:
getTlsUniqueBindingDatain interfaceTLSWrapper
-
isClientMode
public boolean isClientMode()
- Specified by:
isClientModein interfaceTLSWrapper
-
isNeedClientAuth
public boolean isNeedClientAuth()
- Specified by:
isNeedClientAuthin interfaceTLSWrapper
-
setDebugId
public void setDebugId(String id)
- Specified by:
setDebugIdin interfaceTLSWrapper
-
unwrap
public ByteBuffer unwrap(ByteBuffer net, ByteBuffer app) throws SSLException
- Specified by:
unwrapin interfaceTLSWrapper- Throws:
SSLException
-
wantClientAuth
public boolean wantClientAuth()
- Specified by:
wantClientAuthin interfaceTLSWrapper
-
wrap
public void wrap(ByteBuffer app, ByteBuffer net) throws SSLException
- Specified by:
wrapin interfaceTLSWrapper- Throws:
SSLException
-
-