createTlsContext

fnTlsContext createTlsContext(TlsBackend backend = TlsBackend.AUTO)

Creates a native TLS context using pure D cryptographic primitives.

This is the primary factory function for creating TLS connections. The returned context can be configured and used to create multiple client and server streams.

Parameters

backendThe TLS backend to use. Only TlsBackend.AUTO and TlsBackend.NATIVE are supported by this package.

Returns

A configured TLS context.

Throws

TlsException if the requested backend is not available.