|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.net.Socket
anon.crypto.tinytls.TinyTLSServerSocket
public class TinyTLSServerSocket
| Nested Class Summary | |
|---|---|
(package private) class |
TinyTLSServerSocket.TLSInputStream
|
(package private) class |
TinyTLSServerSocket.TLSOutputStream
|
| Field Summary | |
|---|---|
private byte[] |
m_clientrandom
|
private JAPCertificate |
m_DSSCertificate
|
private MyDSAPrivateKey |
m_DSSKey
|
private boolean |
m_encrypt
|
private boolean |
m_handshakecompleted
|
private byte[] |
m_handshakemessages
|
private TinyTLSServerSocket.TLSInputStream |
m_istream
|
private TinyTLSServerSocket.TLSOutputStream |
m_ostream
|
private IMyPrivateKey |
m_privatekey
|
private JAPCertificate |
m_RSACertificate
|
private MyRSAPrivateKey |
m_RSAKey
|
private CipherSuite |
m_selectedciphersuite
|
private JAPCertificate |
m_servercertificate
|
private byte[] |
m_serverrandom
|
private java.net.Socket |
m_Socket
|
private java.util.Vector |
m_supportedciphersuites
|
private java.lang.Thread |
m_threadCloseGuard
|
static byte[] |
PROTOCOLVERSION
SSL VERSION : 3.1 for TLS |
private static int |
PROTOCOLVERSION_SHORT
|
private java.lang.Object |
SYNC_CLOSE
|
| Constructor Summary | |
|---|---|
TinyTLSServerSocket(java.net.Socket socket)
|
|
TinyTLSServerSocket(java.net.Socket socket,
long a_forceCloseAfterMS)
TinyTLS creates a TLS Connection to a server |
|
| Method Summary | |
|---|---|
void |
addCipherSuite(CipherSuite cs)
add a ciphersuites to TinyTLS |
void |
close()
|
java.net.InetAddress |
getInetAddress()
|
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
boolean |
isClosed()
|
private static boolean |
isClosed(java.net.Socket a_socket)
|
void |
setDSSParameters(JAPCertificate cert,
MyDSAPrivateKey key)
set the dss parameters if dss key exchange is used |
void |
setRSAParameters(JAPCertificate cert,
MyRSAPrivateKey key)
set the rsa parameters if rsa key exchange is used |
void |
setSoTimeout(int ms)
|
void |
startHandshake()
start the handshake |
| Methods inherited from class java.net.Socket |
|---|
bind, connect, connect, getChannel, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static byte[] PROTOCOLVERSION
private static int PROTOCOLVERSION_SHORT
private java.util.Vector m_supportedciphersuites
private CipherSuite m_selectedciphersuite
private java.lang.Thread m_threadCloseGuard
private java.lang.Object SYNC_CLOSE
private java.net.Socket m_Socket
private TinyTLSServerSocket.TLSInputStream m_istream
private TinyTLSServerSocket.TLSOutputStream m_ostream
private boolean m_handshakecompleted
private byte[] m_clientrandom
private byte[] m_serverrandom
private JAPCertificate m_servercertificate
private IMyPrivateKey m_privatekey
private MyDSAPrivateKey m_DSSKey
private MyRSAPrivateKey m_RSAKey
private JAPCertificate m_DSSCertificate
private JAPCertificate m_RSACertificate
private byte[] m_handshakemessages
private boolean m_encrypt
| Constructor Detail |
|---|
public TinyTLSServerSocket(java.net.Socket socket)
throws java.io.IOException
java.io.IOException
public TinyTLSServerSocket(java.net.Socket socket,
long a_forceCloseAfterMS)
throws java.io.IOException
addr - Server Addressport - Server's TLS Port
java.io.IOException| Method Detail |
|---|
public java.net.InetAddress getInetAddress()
getInetAddress in class java.net.Socketpublic void addCipherSuite(CipherSuite cs)
cs - ciphersuite you want to add
public void startHandshake()
throws java.io.IOException
java.io.IOException
CertificateException
java.lang.Exception
public void setDSSParameters(JAPCertificate cert,
MyDSAPrivateKey key)
cert - certificatekey - dsa private key
public void setRSAParameters(JAPCertificate cert,
MyRSAPrivateKey key)
cert - certificatekey - rsa private keypublic java.io.InputStream getInputStream()
getInputStream in class java.net.Socketpublic java.io.OutputStream getOutputStream()
getOutputStream in class java.net.Socket
public void close()
throws java.io.IOException
close in class java.net.Socketjava.io.IOExceptionprivate static boolean isClosed(java.net.Socket a_socket)
public boolean isClosed()
isClosed in class java.net.Socket
public void setSoTimeout(int ms)
throws java.net.SocketException
setSoTimeout in class java.net.Socketjava.net.SocketException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||