|
Bouncy Castle Cryptography Library 1.46 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.crypto.tls.TlsProtocolHandler
public class TlsProtocolHandler
An implementation of all high level protocols in TLS 1.0.
| Constructor Summary | |
|---|---|
TlsProtocolHandler(java.io.InputStream is,
java.io.OutputStream os)
|
|
TlsProtocolHandler(java.io.InputStream is,
java.io.OutputStream os,
java.security.SecureRandom sr)
|
|
| Method Summary | |
|---|---|
protected void |
assertEmpty(java.io.ByteArrayInputStream is)
Make sure the InputStream is now empty. |
void |
close()
Closes this connection. |
void |
connect(CertificateVerifyer verifyer)
Deprecated. use version taking TlsClient |
void |
connect(TlsClient tlsClient)
Connects to the remote system using client authentication |
protected void |
flush()
|
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
protected void |
processData(short protocol,
byte[] buf,
int offset,
int len)
|
protected int |
readApplicationData(byte[] buf,
int offset,
int len)
Read data from the network. |
protected void |
writeData(byte[] buf,
int offset,
int len)
Send some application data to the remote system. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TlsProtocolHandler(java.io.InputStream is,
java.io.OutputStream os)
public TlsProtocolHandler(java.io.InputStream is,
java.io.OutputStream os,
java.security.SecureRandom sr)
| Method Detail |
|---|
protected void processData(short protocol,
byte[] buf,
int offset,
int len)
throws java.io.IOException
java.io.IOException
public void connect(CertificateVerifyer verifyer)
throws java.io.IOException
verifyer - Will be used when a certificate is received to verify that this
certificate is accepted by the client.
java.io.IOException - If handshake was not successful.
public void connect(TlsClient tlsClient)
throws java.io.IOException
tlsClient -
java.io.IOException - If handshake was not successful.
protected int readApplicationData(byte[] buf,
int offset,
int len)
throws java.io.IOException
buf - The buffer where the data will be copied to.offset - The position where the data will be placed in the buffer.len - The maximum number of bytes to read.
java.io.IOException - If something goes wrong during reading data.
protected void writeData(byte[] buf,
int offset,
int len)
throws java.io.IOException
buf - The buffer with the data.offset - The position in the buffer where the data is placed.len - The length of the data.
java.io.IOException - If something goes wrong during sending.public java.io.OutputStream getOutputStream()
public java.io.InputStream getInputStream()
public void close()
throws java.io.IOException
java.io.IOException - If something goes wrong during closing.
protected void assertEmpty(java.io.ByteArrayInputStream is)
throws java.io.IOException
is - The InputStream to check.
java.io.IOException - If is is not empty.
protected void flush()
throws java.io.IOException
java.io.IOException
|
Bouncy Castle Cryptography Library 1.46 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||