vibe.d beta banner
get vibe.d
0.7.30

Interface TLSContext

Encapsulates the configuration for an TLS tunnel.

interface TLSContext;

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

Properties

Properties

NameTypeDescription
alpnCallback[get, set]string delegate(string[])Callback function invoked to choose alpn (client side)
kind[get]TLSContextKindThe kind of TLS context (client/server)
maxCertChainLength[get, set]intThe maximum length of an accepted certificate chain.
peerValidationCallback[get, set]bool delegate(scope TLSPeerValidationData)An optional user callback for peer validation.
peerValidationMode[get, set]TLSPeerValidationModeSpecifies the validation level of remote peers.
sniCallback[get, set]TLSContext delegate(string)The callback used to associcate host names with TLS certificates/contexts.

Methods

Methods

NameDescription
createStreamCreates a new stream associated to this context.
setCipherListSet the list of cipher specifications to use for TLS tunnels.
setClientALPNSetter method invoked to offer ALPN (server side)
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.
Authors

Sönke Ludwig

Copyright

© 2012-2014 RejectedSoftware e.K.

License

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