Class TlsClientProtocol
- Namespace
- Org.BouncyCastle.Tls
- Assembly
- BouncyCastle.Cryptography.dll
public class TlsClientProtocol : TlsProtocol, TlsCloseable
- Inheritance
-
TlsClientProtocol
- Implements
- Inherited Members
Constructors
TlsClientProtocol()
Constructor for non-blocking mode.
public TlsClientProtocol()
Remarks
When data is received, use OfferInput(byte[]) to provide the received ciphertext,
then use ReadInput(byte[], int, int) to read the corresponding cleartext.
Similarly, when data needs to be sent, use WriteApplicationData(byte[], int, int)
to provide the cleartext, then use ReadOutput(byte[], int, int) to get the
corresponding ciphertext.
TlsClientProtocol(Stream)
Constructor for blocking mode.
public TlsClientProtocol(Stream stream)
Parameters
TlsClientProtocol(Stream, Stream)
Constructor for blocking mode.
public TlsClientProtocol(Stream input, Stream output)
Parameters
Fields
m_authentication
protected TlsAuthentication m_authentication
Field Value
m_certificateRequest
protected CertificateRequest m_certificateRequest
Field Value
m_certificateStatus
protected CertificateStatus m_certificateStatus
Field Value
m_clientAgreements
protected IDictionary<int, TlsAgreement> m_clientAgreements
Field Value
m_clientHello
protected ClientHello m_clientHello
Field Value
m_keyExchange
protected TlsKeyExchange m_keyExchange
Field Value
m_tlsClient
protected TlsClient m_tlsClient
Field Value
Properties
Context
protected override TlsContext Context { get; }
Property Value
Peer
protected override TlsPeer Peer { get; }
Property Value
Methods
BeginHandshake()
protected override void BeginHandshake()
Exceptions
CleanupHandshake()
protected override void CleanupHandshake()
Connect(TlsClient)
Initiates a TLS handshake in the role of client.
public virtual void Connect(TlsClient tlsClient)
Parameters
Remarks
In blocking mode, this will not return until the handshake is complete. In non-blocking mode, use NotifyHandshakeComplete() to receive a callback when the handshake is complete.
Exceptions
- IOException
If in blocking mode and handshake was not successful.
Handle13HandshakeMessage(short, HandshakeMessageInput)
protected virtual void Handle13HandshakeMessage(short type, HandshakeMessageInput buf)
Parameters
typeshortbufHandshakeMessageInput
Exceptions
HandleHandshakeMessage(short, HandshakeMessageInput)
protected override void HandleHandshakeMessage(short type, HandshakeMessageInput buf)
Parameters
typeshortbufHandshakeMessageInput
Exceptions
HandleServerCertificate()
protected virtual void HandleServerCertificate()
Exceptions
HandleSupplementalData(IList<SupplementalDataEntry>)
protected virtual void HandleSupplementalData(IList<SupplementalDataEntry> serverSupplementalData)
Parameters
serverSupplementalDataIList<SupplementalDataEntry>
Exceptions
Process13HelloRetryRequest(ServerHello)
protected virtual void Process13HelloRetryRequest(ServerHello helloRetryRequest)
Parameters
helloRetryRequestServerHello
Exceptions
Process13ServerHello(ServerHello, bool)
protected virtual void Process13ServerHello(ServerHello serverHello, bool afterHelloRetryRequest)
Parameters
serverHelloServerHelloafterHelloRetryRequestbool
Exceptions
Process13ServerHelloCoda(ServerHello, bool)
protected virtual void Process13ServerHelloCoda(ServerHello serverHello, bool afterHelloRetryRequest)
Parameters
serverHelloServerHelloafterHelloRetryRequestbool
Exceptions
ProcessServerHello(ServerHello)
protected virtual void ProcessServerHello(ServerHello serverHello)
Parameters
serverHelloServerHello
Exceptions
Receive13CertificateRequest(MemoryStream, bool)
protected virtual void Receive13CertificateRequest(MemoryStream buf, bool postHandshakeAuth)
Parameters
bufMemoryStreampostHandshakeAuthbool
Exceptions
Receive13EncryptedExtensions(MemoryStream)
protected virtual void Receive13EncryptedExtensions(MemoryStream buf)
Parameters
bufMemoryStream
Exceptions
Receive13NewSessionTicket(MemoryStream)
protected virtual void Receive13NewSessionTicket(MemoryStream buf)
Parameters
bufMemoryStream
Exceptions
Receive13ServerCertificate(MemoryStream)
protected virtual void Receive13ServerCertificate(MemoryStream buf)
Parameters
bufMemoryStream
Exceptions
Receive13ServerCertificateVerify(MemoryStream)
protected virtual void Receive13ServerCertificateVerify(MemoryStream buf)
Parameters
bufMemoryStream
Exceptions
Receive13ServerFinished(MemoryStream)
protected virtual void Receive13ServerFinished(MemoryStream buf)
Parameters
bufMemoryStream
Exceptions
ReceiveCertificateRequest(MemoryStream)
protected virtual void ReceiveCertificateRequest(MemoryStream buf)
Parameters
bufMemoryStream
Exceptions
ReceiveNewSessionTicket(MemoryStream)
protected virtual void ReceiveNewSessionTicket(MemoryStream buf)
Parameters
bufMemoryStream
Exceptions
ReceiveServerHelloMessage(MemoryStream)
protected virtual ServerHello ReceiveServerHelloMessage(MemoryStream buf)
Parameters
bufMemoryStream
Returns
Exceptions
Send13ClientHelloRetry()
protected virtual void Send13ClientHelloRetry()
Exceptions
SendCertificateVerifyMessage(DigitallySigned)
protected virtual void SendCertificateVerifyMessage(DigitallySigned certificateVerify)
Parameters
certificateVerifyDigitallySigned
Exceptions
SendClientHello()
protected virtual void SendClientHello()
Exceptions
SendClientHelloMessage()
protected virtual void SendClientHelloMessage()
Exceptions
SendClientKeyExchange()
protected virtual void SendClientKeyExchange()
Exceptions
Skip13CertificateRequest()
protected virtual void Skip13CertificateRequest()
Exceptions
Skip13ServerCertificate()
protected virtual void Skip13ServerCertificate()