anon.tor.tinytls
Class TinyTLSServerSocket
java.lang.Object
java.net.Socket
anon.tor.tinytls.TinyTLSServerSocket
- public class TinyTLSServerSocket
- extends java.net.Socket
- Author:
- stefan
TinyTLS
Fields inherited from class java.net.Socket |
|
Constructor Summary |
TinyTLSServerSocket(java.net.Socket socket)
TinyTLS creates a TLS Connection to a server |
Methods inherited from class java.net.Socket |
bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PROTOCOLVERSION
public static byte[] PROTOCOLVERSION
- SSL VERSION :
3.1 for TLS
PROTOCOLVERSION_SHORT
private static int PROTOCOLVERSION_SHORT
m_supportedciphersuites
private java.util.Vector m_supportedciphersuites
m_selectedciphersuite
private CipherSuite m_selectedciphersuite
socket
private java.net.Socket socket
m_istream
private TinyTLSServerSocket.TLSInputStream m_istream
m_ostream
private TinyTLSServerSocket.TLSOutputStream m_ostream
m_handshakecompleted
private boolean m_handshakecompleted
m_clientrandom
private byte[] m_clientrandom
m_serverrandom
private byte[] m_serverrandom
m_servercertificate
private JAPCertificate m_servercertificate
m_privatekey
private IMyPrivateKey m_privatekey
m_DSSKey
private MyDSAPrivateKey m_DSSKey
m_RSAKey
private MyRSAPrivateKey m_RSAKey
m_DSSCertificate
private JAPCertificate m_DSSCertificate
m_RSACertificate
private JAPCertificate m_RSACertificate
m_handshakemessages
private byte[] m_handshakemessages
m_encrypt
private boolean m_encrypt
TinyTLSServerSocket
public TinyTLSServerSocket(java.net.Socket socket)
throws java.io.IOException
- TinyTLS creates a TLS Connection to a server
addCipherSuite
public void addCipherSuite(CipherSuite cs)
- add a ciphersuites to TinyTLS
- Parameters:
cs
- ciphersuite you want to add
startHandshake
public void startHandshake()
throws java.io.IOException
- start the handshake
- Throws:
java.io.IOException
CertificateException
java.lang.Exception
setDSSParameters
public void setDSSParameters(JAPCertificate cert,
MyDSAPrivateKey key)
- set the dss parameters if dss key exchange is used
- Parameters:
cert
- certificatekey
- dsa private key
setRSAParameters
public void setRSAParameters(JAPCertificate cert,
MyRSAPrivateKey key)
- set the rsa parameters if rsa key exchange is used
- Parameters:
cert
- certificatekey
- rsa private key
getInputStream
public java.io.InputStream getInputStream()
getOutputStream
public java.io.OutputStream getOutputStream()
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException