org.bouncycastle.crypto.tls
Class TlsClientProtocol
java.lang.Object
org.bouncycastle.crypto.tls.TlsProtocol
org.bouncycastle.crypto.tls.TlsClientProtocol
- Direct Known Subclasses:
- TlsProtocolHandler
public class TlsClientProtocol
- extends TlsProtocol
Fields inherited from class org.bouncycastle.crypto.tls.TlsProtocol |
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 Summary |
TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output)
|
TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output,
java.security.SecureRandom secureRandom)
|
Methods inherited from class org.bouncycastle.crypto.tls.TlsProtocol |
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, writeSupplementalData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tlsClient
protected TlsClient tlsClient
tlsClientContext
protected org.bouncycastle.crypto.tls.TlsClientContextImpl tlsClientContext
selectedSessionID
protected byte[] selectedSessionID
keyExchange
protected TlsKeyExchange keyExchange
authentication
protected TlsAuthentication authentication
certificateStatus
protected CertificateStatus certificateStatus
certificateRequest
protected CertificateRequest certificateRequest
TlsClientProtocol
public TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output)
TlsClientProtocol
public TlsClientProtocol(java.io.InputStream input,
java.io.OutputStream output,
java.security.SecureRandom secureRandom)
connect
public void connect(TlsClient tlsClient)
throws java.io.IOException
- Initiates a TLS handshake in the role of client
- Parameters:
tlsClient
- The TlsClient
to use for the handshake.
- Throws:
java.io.IOException
- If handshake was not successful.
cleanupHandshake
protected void cleanupHandshake()
- Overrides:
cleanupHandshake
in class TlsProtocol
getContext
protected org.bouncycastle.crypto.tls.AbstractTlsContext getContext()
- Specified by:
getContext
in class TlsProtocol
getPeer
protected TlsPeer getPeer()
- Specified by:
getPeer
in class TlsProtocol
handleHandshakeMessage
protected void handleHandshakeMessage(short type,
byte[] data)
throws java.io.IOException
- Specified by:
handleHandshakeMessage
in class TlsProtocol
- Throws:
java.io.IOException
handleSupplementalData
protected void handleSupplementalData(java.util.Vector serverSupplementalData)
throws java.io.IOException
- Throws:
java.io.IOException
receiveNewSessionTicketMessage
protected void receiveNewSessionTicketMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
- Throws:
java.io.IOException
receiveServerHelloMessage
protected void receiveServerHelloMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
- Throws:
java.io.IOException
sendCertificateVerifyMessage
protected void sendCertificateVerifyMessage(DigitallySigned certificateVerify)
throws java.io.IOException
- Throws:
java.io.IOException
sendClientHelloMessage
protected void sendClientHelloMessage()
throws java.io.IOException
- Throws:
java.io.IOException
sendClientKeyExchangeMessage
protected void sendClientKeyExchangeMessage()
throws java.io.IOException
- Throws:
java.io.IOException