Class BotanTLSContext
class BotanTLSContext
;
Constructors
Name | Description |
---|---|
this
(kind, credentials, policy, session_manager, is_datagram)
|
Fields
Name | Type | Description |
---|---|---|
m_certChecked
|
bool | |
m_clientOffers
|
Vector!string | |
m_credentials
|
TLSCredentialsManager | |
m_is_datagram
|
bool | |
m_kind
|
TLSContextKind | |
m_offer_version
|
TLSProtocolVersion | |
m_policy
|
TLSPolicy | |
m_rng
|
AutoSeededRNG | |
m_serverCb
|
TLSALPNCallback | |
m_sessionManager
|
TLSSessionManager | |
m_sniCallback
|
TLSServerNameCallback |
Properties
Name | Type | Description |
---|---|---|
alpnCallback [set]
|
TLSALPNCallback | Callback function invoked by server to choose alpn |
alpnCallback [get]
|
TLSALPNCallback | Get the current ALPN callback function |
defaultProtocolOffer [get, set]
|
TLSProtocolVersion | Used by clients to indicate protocol preference, use TLSPolicy to restrict the protocol versions |
kind [get]
|
TLSContextKind | The kind of TLS context (client/server) |
maxCertChainLength [get, set]
|
int | The maximum length of an accepted certificate chain. |
peerValidationCallback [get, set]
|
TLSPeerValidationCallback | An optional user callback for peer validation. |
peerValidationMode [get, set]
|
TLSPeerValidationMode | Specifies the validation level of remote peers. |
setClientALPN [set]
|
string[] | Invoked by client to offer alpn, all strings are copied on the GC |
sniCallback [set]
|
TLSServerNameCallback | |
sniCallback [get]
|
inout(TLSServerNameCallback) |
Methods
Name | Description |
---|---|
checkCert
()
|
|
createStream
(underlying, state, peer_name, peer_address)
|
Creates a new stream associated to this context. |
nextProtocolHandler
(offers)
|
|
onSNI
(hostname)
|
|
setCipherList
(list)
|
|
setDHParams
(pem_file)
|
Set params to use for DH cipher. |
setECDHCurve
(curve)
|
Set the elliptic curve to use for ECDH cipher. |
sniHandler
(hostname)
|
|
useCertificateChainFile
(path)
|
Sets a certificate file to use for authenticating to the remote peer |
usePrivateKeyFile
(path)
|
Sets the private key to use for authenticating to the remote peer based on the configured certificate chain file. |
useTrustedCertificateFile
(path)
|
Sets the list of trusted certificates for verifying peer certificates. |