BotanTLSContext

Undocumented in source.

Constructors

this
this(TLSContextKind kind, TLSCredentialsManager credentials, TLSPolicy policy, TLSSessionManager session_manager, bool is_datagram)
Undocumented in source.

Members

Functions

createStream
TLSStream createStream(InterfaceProxy!Stream underlying, TLSStreamState state, string peer_name, NetworkAddress peer_address)

Creates a new stream associated to this context.

setCipherList
void setCipherList(string list)
Undocumented in source. Be warned that the author may not have intended to support it.
setDHParams
void setDHParams(string pem_file)

Set params to use for DH cipher.

setECDHCurve
void setECDHCurve(string curve)

Set the elliptic curve to use for ECDH cipher.

useCertificateChainFile
void useCertificateChainFile(string path)

Sets a certificate file to use for authenticating to the remote peer

usePrivateKeyFile
void usePrivateKeyFile(string path)

Sets the private key to use for authenticating to the remote peer based on the configured certificate chain file. todo: Use passphrase?

useTrustedCertificateFile
void useTrustedCertificateFile(string path)

Sets the list of trusted certificates for verifying peer certificates.

Properties

alpnCallback
TLSALPNCallback alpnCallback [@property setter]

Callback function invoked by server to choose alpn

alpnCallback
TLSALPNCallback alpnCallback [@property getter]

Get the current ALPN callback function

defaultProtocolOffer
TLSProtocolVersion defaultProtocolOffer [@property setter]
TLSProtocolVersion defaultProtocolOffer [@property getter]

Used by clients to indicate protocol preference, use TLSPolicy to restrict the protocol versions

kind
TLSContextKind kind [@property getter]

The kind of TLS context (client/server)

maxCertChainLength
int maxCertChainLength [@property setter]
int maxCertChainLength [@property getter]

The maximum length of an accepted certificate chain.

peerValidationCallback
TLSPeerValidationCallback peerValidationCallback [@property setter]
inout(TLSPeerValidationCallback) peerValidationCallback [@property getter]

An optional user callback for peer validation.

peerValidationMode
TLSPeerValidationMode peerValidationMode [@property setter]
TLSPeerValidationMode peerValidationMode [@property getter]

Specifies the validation level of remote peers.

setClientALPN
string[] setClientALPN [@property setter]

Invoked by client to offer alpn, all strings are copied on the GC

sniCallback
TLSServerNameCallback sniCallback [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
sniCallback
inout(TLSServerNameCallback) sniCallback [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From TLSContext

kind
TLSContextKind kind [@property getter]

The kind of TLS context (client/server)

peerValidationMode
TLSPeerValidationMode peerValidationMode [@property setter]
TLSPeerValidationMode peerValidationMode [@property getter]

Specifies the validation level of remote peers.

maxCertChainLength
int maxCertChainLength [@property setter]
int maxCertChainLength [@property getter]

The maximum length of an accepted certificate chain.

peerValidationCallback
TLSPeerValidationCallback peerValidationCallback [@property setter]
inout(TLSPeerValidationCallback) peerValidationCallback [@property getter]

An optional user callback for peer validation.

sniCallback
TLSServerNameCallback sniCallback [@property setter]
inout(TLSServerNameCallback) sniCallback [@property getter]

The callback used to associcate host names with TLS certificates/contexts.

alpnCallback
TLSALPNCallback alpnCallback [@property setter]
TLSALPNCallback alpnCallback [@property getter]

Callback function invoked to choose alpn (client side)

setClientALPN
void setClientALPN(string[] alpn)

Setter method invoked to offer ALPN (server side)

createStream
TLSStream createStream(InterfaceProxy!Stream underlying, TLSStreamState state, string peer_name, NetworkAddress peer_address)

Creates a new stream associated to this context.

setCipherList
void setCipherList(string list)

Set the list of cipher specifications to use for TLS tunnels.

setDHParams
void setDHParams(string pem_file)

Set params to use for DH cipher.

setECDHCurve
void setECDHCurve(string curve)

Set the elliptic curve to use for ECDH cipher.

useCertificateChainFile
void useCertificateChainFile(string path)
void useCertificateChainFile(NativePath path)

Sets a certificate file to use for authenticating to the remote peer

usePrivateKeyFile
void usePrivateKeyFile(string path)
void usePrivateKeyFile(NativePath path)

Sets the private key to use for authenticating to the remote peer based on the configured certificate chain file.

useTrustedCertificateFile
void useTrustedCertificateFile(string path)

Sets the list of trusted certificates for verifying peer certificates.

Meta