vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Interface SSLContext

Encapsulates the configuration for an SSL tunnel.

interface SSLContext ;

Note that when creating an SSLContext with SSLContextKind.client, the peerValidationMode will be set to SSLPeerValidationMode.trustedCert, but no trusted certificate authorities are added by default. Use useTrustedCertificateFile to add those.


kind[get]SSLContextKindThe kind of SSL context (client/server)
maxCertChainLength[get, set]intThe maximum length of an accepted certificate chain.
peerValidationCallback[get, set]bool delegate(scope SSLPeerValidationData)An optional user callback for peer validation.
peerValidationMode[get, set]SSLPeerValidationModeSpecifies the validation level of remote peers.
sniCallback[get, set]SSLContext delegate(string)The callback used to associcate host names with SSL certificates/contexts.


createStreamCreates a new stream associated to this context.
setCipherListSet the list of cipher specifications to use for SSL/TLS tunnels.
setDHParamsSet params to use for DH cipher.
setECDHCurveSet the elliptic curve to use for ECDH cipher.
useCertificateChainFileSets a certificate file to use for authenticating to the remote peer
usePrivateKeyFileSets the private key to use for authenticating to the remote peer based
useTrustedCertificateFileSets the list of trusted certificates for verifying peer certificates.

Sönke Ludwig


© 2012-2014 RejectedSoftware e.K.


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