<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.0" />

TlsContext

public interface TlsContext
Base interface for a TLS context implementation.

TlsCrypto Crypto { get; }

bool IsServer { get; }

Return true if this context is for a server, false otherwise.

Used to get the resumable session, if any, used by this connection.

Used to get the session information for this connection.

object UserObject { get; set; }

byte[] ExportChannelBinding(int channelBinding)

Export the value of the specified channel binding.

byte[] ExportEarlyKeyingMaterial(string asciiLabel, byte[] context_value, int length)

Export (early data) keying material according to RFC 5705: "Keying Material Exporters for TLS", as updated for TLS 1.3 (RFC 8446).

byte[] ExportKeyingMaterial(string asciiLabel, byte[] context_value, int length)

Export keying material according to RFC 5705: "Keying Material Exporters for TLS", as updated for TLS 1.3 (RFC 8446) when negotiated.