vibe.stream.tls

TLS stream implementation

TLSStream can be used to implement TLS communication on top of a TCP connection. The TLSContextKind of an TLSStream determines if the TLS tunnel is established actively (client) or passively (server).

Members

Aliases

TLSALPNCallback
alias TLSALPNCallback = string delegate(string[] alpn_choices)
Undocumented in source.
TLSPeerValidationCallback
alias TLSPeerValidationCallback = bool delegate(scope TLSPeerValidationData data)
Undocumented in source.
TLSServerNameCallback
alias TLSServerNameCallback = TLSContext delegate(string hostname)
Undocumented in source.

Enums

TLSContextKind
enum TLSContextKind
Undocumented in source.
TLSPeerValidationMode
enum TLSPeerValidationMode

Specifies how rigorously TLS peer certificates are validated.

TLSStreamState
enum TLSStreamState
Undocumented in source.
TLSVersion
enum TLSVersion
Undocumented in source.

Functions

createTLSContext
TLSContext createTLSContext(TLSContextKind kind, TLSVersion ver)

Creates a new context of the given kind.

createTLSStream
TLSStream createTLSStream(Stream underlying, TLSContext ctx, string peer_name, NetworkAddress peer_address)

Constructs a new TLS tunnel and infers the stream state from the TLSContextKind.

createTLSStream
TLSStream createTLSStream(Stream underlying, TLSContext ctx, TLSStreamState state, string peer_name, NetworkAddress peer_address)

Constructs a new TLS tunnel, allowing to override the stream state.

createTLSStreamFL
auto createTLSStreamFL(Stream underlying, TLSContext ctx, TLSStreamState state, string peer_name, NetworkAddress peer_address)

Constructs a new TLS stream using manual memory allocator.

setTLSContextFactory
void setTLSContextFactory(TLSContext function(TLSContextKind, TLSVersion) @(safe) factory)
Undocumented in source. Be warned that the author may not have intended to support it.

Interfaces

TLSContext
interface TLSContext

Encapsulates the configuration for an TLS tunnel.

TLSStream
interface TLSStream

Creates an TLS tunnel within an existing stream.

Structs

TLSCertificateInformation
struct TLSCertificateInformation

Certificate information

TLSPeerValidationData
struct TLSPeerValidationData
Undocumented in source.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.

Authors

Sönke Ludwig