public class TlsClientProtocol extends TlsProtocol
| Modifier and Type | Field and Description |
|---|---|
protected TlsAuthentication |
authentication |
protected CertificateRequest |
certificateRequest |
protected CertificateStatus |
certificateStatus |
protected TlsKeyExchange |
keyExchange |
protected byte[] |
selectedSessionID |
protected TlsClient |
tlsClient |
protected org.bouncycastle.crypto.tls.TlsClientContextImpl |
tlsClientContext |
allowCertificateStatus, clientExtensions, connection_state, CS_CERTIFICATE_REQUEST, CS_CERTIFICATE_STATUS, CS_CERTIFICATE_VERIFY, CS_CLIENT_CERTIFICATE, CS_CLIENT_FINISHED, CS_CLIENT_HELLO, CS_CLIENT_KEY_EXCHANGE, CS_CLIENT_SUPPLEMENTAL_DATA, CS_END, CS_SERVER_CERTIFICATE, CS_SERVER_FINISHED, CS_SERVER_HELLO, CS_SERVER_HELLO_DONE, CS_SERVER_KEY_EXCHANGE, CS_SERVER_SESSION_TICKET, CS_SERVER_SUPPLEMENTAL_DATA, CS_START, expectSessionTicket, EXT_RenegotiationInfo, EXT_SessionTicket, offeredCipherSuites, offeredCompressionMethods, peerCertificate, receivedChangeCipherSpec, recordStream, resumedSession, secure_renegotiation, secureRandom, securityParameters, serverExtensions, sessionParameters, tlsSession| Constructor and Description |
|---|
TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output)
Deprecated.
use alternate constructor taking an explicit
SecureRandom |
TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output,
java.security.SecureRandom secureRandom) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupHandshake() |
void |
connect(TlsClient tlsClient)
Initiates a TLS handshake in the role of client
|
protected org.bouncycastle.crypto.tls.AbstractTlsContext |
getContext() |
protected TlsPeer |
getPeer() |
protected void |
handleHandshakeMessage(short type,
byte[] data) |
protected void |
handleSupplementalData(java.util.Vector serverSupplementalData) |
protected void |
receiveNewSessionTicketMessage(java.io.ByteArrayInputStream buf) |
protected void |
receiveServerHelloMessage(java.io.ByteArrayInputStream buf) |
protected void |
sendCertificateVerifyMessage(DigitallySigned certificateVerify) |
protected void |
sendClientHelloMessage() |
protected void |
sendClientKeyExchangeMessage() |
applicationDataAvailable, assertEmpty, close, completeHandshake, createRandomBlock, createRenegotiationInfo, createVerifyData, establishMasterSecret, failWithError, flush, getCurrentPRFHash, getInputStream, getOutputStream, getPRFAlgorithm, handleChangeCipherSpecMessage, handleClose, handleWarningMessage, invalidateSession, processFinishedMessage, processMaxFragmentLengthExtension, processRecord, raiseAlert, raiseWarning, readApplicationData, readExtensions, readSupplementalDataMessage, safeReadRecord, safeWriteRecord, sendCertificateMessage, sendChangeCipherSpecMessage, sendFinishedMessage, sendSupplementalDataMessage, writeData, writeExtensions, writeHandshakeMessage, writeSupplementalDataprotected TlsClient tlsClient
protected org.bouncycastle.crypto.tls.TlsClientContextImpl tlsClientContext
protected byte[] selectedSessionID
protected TlsKeyExchange keyExchange
protected TlsAuthentication authentication
protected CertificateStatus certificateStatus
protected CertificateRequest certificateRequest
public TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output)
SecureRandompublic TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output,
java.security.SecureRandom secureRandom)
public void connect(TlsClient tlsClient) throws java.io.IOException
tlsClient - The TlsClient to use for the handshake.java.io.IOException - If handshake was not successful.protected void cleanupHandshake()
cleanupHandshake in class TlsProtocolprotected org.bouncycastle.crypto.tls.AbstractTlsContext getContext()
getContext in class TlsProtocolprotected TlsPeer getPeer()
getPeer in class TlsProtocolprotected void handleHandshakeMessage(short type,
byte[] data)
throws java.io.IOException
handleHandshakeMessage in class TlsProtocoljava.io.IOExceptionprotected void handleSupplementalData(java.util.Vector serverSupplementalData)
throws java.io.IOException
java.io.IOExceptionprotected void receiveNewSessionTicketMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
java.io.IOExceptionprotected void receiveServerHelloMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
java.io.IOExceptionprotected void sendCertificateVerifyMessage(DigitallySigned certificateVerify) throws java.io.IOException
java.io.IOExceptionprotected void sendClientHelloMessage()
throws java.io.IOException
java.io.IOExceptionprotected void sendClientKeyExchangeMessage()
throws java.io.IOException
java.io.IOException