class TinyTLS.TLSInputStream extends java.io.InputStream implements TinyTLS.ITLSConstants
Modifier and Type | Field and Description |
---|---|
private int |
m_aktPendLen |
private int |
m_aktPendOffset |
private TLSPlaintextRecord |
m_aktTLSRecord |
private int |
m_ReadRecordState |
private java.io.DataInputStream |
m_stream |
STATE_LENGTH, STATE_PAYLOAD, STATE_START, STATE_VERSION
Constructor and Description |
---|
TLSInputStream(java.io.InputStream istream)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
private void |
gotCertificate(TLSHandshakeRecord msg)
process server certificate
|
private void |
gotCertificateRequest(TLSHandshakeRecord msg)
Handles a Certificate Request Message, containing certificate types
the Server can verify.
|
private void |
gotServerHello(TLSHandshakeRecord msg)
process server hello
|
private void |
gotServerHelloDone()
Acknowledges a Hello Done message by the Server.
|
private void |
gotServerKeyExchange(TLSHandshakeRecord msg)
process server key exchange message
|
private void |
handleAlert()
Handles received Alert messages.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
private void |
readRecord()
Reads one record if we need more data...
|
protected void |
readServerFinished()
Waits for the Server to respond with Change Cipher Spec message and
the following Finished message, signaling the changed cipher
attributes.
|
protected void |
readServerHandshakes()
Reads Handshake Record messages continuously until a Hello Done
message is received.
|
private java.io.DataInputStream m_stream
private int m_aktPendOffset
private int m_aktPendLen
private TLSPlaintextRecord m_aktTLSRecord
private int m_ReadRecordState
public TLSInputStream(java.io.InputStream istream)
istream
- inputstreamprivate void readRecord() throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int available()
available
in class java.io.InputStream
private void gotServerHello(TLSHandshakeRecord msg) throws java.io.IOException
bytes
- server hello messagejava.io.IOException
private void gotCertificate(TLSHandshakeRecord msg) throws java.io.IOException
bytes
- server certificate messagejava.io.IOException
private void gotServerKeyExchange(TLSHandshakeRecord msg) throws java.io.IOException
bytes
- server key exchange messagejava.io.IOException
java.lang.Exception
private void gotCertificateRequest(TLSHandshakeRecord msg)
msg
- TLS Handshake Record containing the request.private void gotServerHelloDone()
private void handleAlert() throws TLSException
TLSException
protected void readServerHandshakes() throws java.io.IOException
java.io.IOException
CertificateException
java.lang.Exception
protected void readServerFinished() throws java.io.IOException
java.io.IOException
Copyright © 2023. All rights reserved.