Interface TlsClient
- Namespace
- Org.BouncyCastle.Tls
- Assembly
- BouncyCastle.Cryptography.dll
public interface TlsClient : TlsPeer
- Inherited Members
Methods
GetAuthentication()
TlsAuthentication GetAuthentication()
Returns
Exceptions
GetClientExtensions()
IDictionary<int, byte[]> GetClientExtensions()
Returns
- IDictionary<int, byte[]>
(Int32 -> byte[])
Exceptions
GetClientSupplementalData()
IList<SupplementalDataEntry> GetClientSupplementalData()
Returns
- IList<SupplementalDataEntry>
(SupplementalDataEntry)
Exceptions
GetDHGroupVerifier()
TlsDHGroupVerifier GetDHGroupVerifier()
Returns
Exceptions
GetEarlyKeyShareGroups()
If this client is offering TLS 1.3 or higher, this method may be called to determine for which groups a key share should be included in the initial ClientHello.
IList<int> GetEarlyKeyShareGroups()
Returns
- IList<int>
an IList<T> of named group values, possibly empty or null.
Remarks
Groups that were not included in the supported_groups extension (by GetClientExtensions() will be ignored. The protocol will then add a suitable key_share extension to the ClientHello extensions.
GetExternalPsks()
Return the external PSKs to offer in the ClientHello.
IList<TlsPskExternal> GetExternalPsks()
Returns
- IList<TlsPskExternal>
an IList<T> of TlsPskExternal instances, or null if none should be offered.
Remarks
This will only be called when TLS 1.3 or higher is amongst the offered protocol versions.
GetPskIdentity()
TlsPskIdentity GetPskIdentity()
Returns
Exceptions
GetSessionToResume()
Return the session this client wants to resume, if any.
TlsSession GetSessionToResume()
Returns
- TlsSession
A TlsSession representing the resumable session to be used for this connection, or null to use a new session.
Remarks
Note that the peer's certificate chain for the session (if any) may need to be periodically revalidated.
- See Also
GetSrpConfigVerifier()
TlsSrpConfigVerifier GetSrpConfigVerifier()
Returns
Exceptions
GetSrpIdentity()
TlsSrpIdentity GetSrpIdentity()
Returns
Exceptions
Init(TlsClientContext)
void Init(TlsClientContext context)
Parameters
contextTlsClientContext
IsFallback()
bool IsFallback()
Returns
NotifyNewSessionTicket(NewSessionTicket)
RFC 5077 3.3. NewSessionTicket Handshake Message
void NotifyNewSessionTicket(NewSessionTicket newSessionTicket)
Parameters
newSessionTicketNewSessionTicketThe ticket.
Remarks
This method will be called (only) when a NewSessionTicket handshake message is received. The ticket is opaque to the client and clients MUST NOT examine the ticket under the assumption that it complies with e.g. RFC 5077 4. "Recommended Ticket Construction".
Exceptions
NotifySelectedCipherSuite(int)
void NotifySelectedCipherSuite(int selectedCipherSuite)
Parameters
selectedCipherSuiteint
NotifySelectedPsk(TlsPsk)
void NotifySelectedPsk(TlsPsk selectedPsk)
Parameters
selectedPskTlsPsk
Exceptions
NotifyServerVersion(ProtocolVersion)
void NotifyServerVersion(ProtocolVersion selectedVersion)
Parameters
selectedVersionProtocolVersion
Exceptions
NotifySessionID(byte[])
Notifies the client of the session_id sent in the ServerHello.
void NotifySessionID(byte[] sessionID)
Parameters
sessionIDbyte[]
- See Also
NotifySessionToResume(TlsSession)
Notifies the client of the session that will be offered in ClientHello for resumption, if any.
void NotifySessionToResume(TlsSession session)
Parameters
sessionTlsSessionThe TlsSession representing the resumable session to be offered for this connection, or null if there is none.
Remarks
This will be either the session returned from {@link #getSessionToResume()} or null if that session was unusable. NOTE: the actual negotiated session_id is notified by NotifySessionID(byte[]).
- See Also
ProcessServerExtensions(IDictionary<int, byte[]>)
The protocol implementation validates that any server extensions received correspond to client extensions sent.
void ProcessServerExtensions(IDictionary<int, byte[]> serverExtensions)
Parameters
serverExtensionsIDictionary<int, byte[]>(Int32 -> byte[])
Remarks
If further processing of the server extensions is needed, it can be done in this callback. NOTE: This is not called for session resumption handshakes.
Exceptions
ProcessServerSupplementalData(IList<SupplementalDataEntry>)
void ProcessServerSupplementalData(IList<SupplementalDataEntry> serverSupplementalData)
Parameters
serverSupplementalDataIList<SupplementalDataEntry>(SupplementalDataEntry)