public class TinyTLSServerSocket
extends java.net.Socket
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
PROTOCOLVERSION
SSL VERSION :
3.1 for TLS
|
| Constructor and Description |
|---|
TinyTLSServerSocket(java.net.Socket socket) |
TinyTLSServerSocket(java.net.Socket socket,
long a_forceCloseAfterMS)
TinyTLS creates a TLS Connection to a server
|
| Modifier and Type | Method and Description |
|---|---|
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() |
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
|
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, toStringpublic TinyTLSServerSocket(java.net.Socket socket)
throws java.io.IOException
java.io.IOExceptionpublic TinyTLSServerSocket(java.net.Socket socket,
long a_forceCloseAfterMS)
throws java.io.IOException
addr - Server Addressport - Server's TLS Portjava.io.IOExceptionpublic java.net.InetAddress getInetAddress()
getInetAddress in class java.net.Socketpublic void addCipherSuite(CipherSuite cs)
cs - ciphersuite you want to addpublic void startHandshake()
throws java.io.IOException
java.io.IOExceptionCertificateExceptionjava.lang.Exceptionpublic void setDSSParameters(JAPCertificate cert, MyDSAPrivateKey key)
cert - certificatekey - dsa private keypublic 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.Socketpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.net.Socketjava.io.IOExceptionpublic boolean isClosed()
isClosed in class java.net.Socketpublic void setSoTimeout(int ms)
throws java.net.SocketException
setSoTimeout in class java.net.Socketjava.net.SocketExceptionCopyright © 2023. All rights reserved.