|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.net.Socket anon.tor.tinytls.TinyTLS
Nested Class Summary | |
(package private) class |
TinyTLS.TLSInputStream
|
(package private) class |
TinyTLS.TLSOutputStream
|
Fields inherited from class java.net.Socket |
|
Constructor Summary | |
TinyTLS(java.lang.String addr,
int port)
TinyTLS creates a TLS Connection to a server |
|
TinyTLS(java.lang.String addr,
int port,
ImmutableProxyInterface a_proxyInterface)
TinyTLS creates a TLS Connection to a server which may use a proxy |
Method Summary | |
void |
addCipherSuite(CipherSuite cs)
add a ciphersuites to TinyTLS |
void |
checkRootCertificate(boolean check)
check or check not the root certificate |
void |
close()
|
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
java.net.Socket |
getSocket()
|
void |
setClientCertificate(JAPCertificate[] certificates,
IMyPrivateKey key)
sets a client certificate chain |
void |
setClientCertificate(JAPCertificate cert,
IMyPrivateKey key)
sets the client certificate |
void |
setRootKey(IMyPublicKey rootKey)
sets the root key that is accepted |
void |
setSoTimeout(int i)
|
void |
startHandshake()
start the handshake |
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, 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 TinyTLS.TLSInputStream m_istream
private TinyTLS.TLSOutputStream m_ostream
private boolean m_handshakecompleted
private boolean m_serverhellodone
private boolean m_certificaterequested
private JAPCertificate m_servercertificate
private IMyPublicKey m_trustedRoot
private boolean m_checkTrustedRoot
private org.bouncycastle.crypto.params.DHParameters m_dhparams
private org.bouncycastle.crypto.params.DHPublicKeyParameters m_dhserverpub
private byte[] m_serverparams
private byte[] m_clientrandom
private byte[] m_serverrandom
private byte[] m_handshakemessages
private byte[] m_clientcertificatetypes
private IMyPrivateKey m_clientprivatekey
private JAPCertificate[] m_clientcertificates
private boolean m_certificateverify
private boolean m_encrypt
private ProxyConnection m_ProxyConnection
Constructor Detail |
public TinyTLS(java.lang.String addr, int port) throws java.net.UnknownHostException, java.io.IOException, java.lang.Exception
addr
- Server Addressport
- Server's TLS Portpublic TinyTLS(java.lang.String addr, int port, ImmutableProxyInterface a_proxyInterface) throws java.net.UnknownHostException, java.io.IOException, java.lang.Exception
addr
- Server Addressport
- Server's TLS Porta_proxyInterface
- Proxy SettingsMethod Detail |
public void addCipherSuite(CipherSuite cs)
cs
- ciphersuite you want to addpublic void startHandshake() throws java.io.IOException
java.io.IOException
CertificateException
java.lang.Exception
public void setRootKey(IMyPublicKey rootKey)
rootKey
- rootkeypublic void checkRootCertificate(boolean check)
check
- public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public void setSoTimeout(int i) throws java.net.SocketException
java.net.SocketException
public void setClientCertificate(JAPCertificate cert, IMyPrivateKey key) throws java.io.IOException
cert
- certificatekey
- private key
java.io.IOException
public void setClientCertificate(JAPCertificate[] certificates, IMyPrivateKey key) throws java.io.IOException
certificates
- certificate chain, where the previous certificate is signed with the followingkey
- private key
java.io.IOException
public void close()
public java.net.Socket getSocket()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |