|
| TLSPolicy & | setConfCmds (const std::vector< std::pair< std::string, std::string > > &sslConfCmds) |
| | set the ssl configuration commands. The commands will be passed to the ssl library. The commands are in the form of {{key, value}}. for example, {"SSL_OP_NO_SSLv2", "1"}. Not all TLS providers support this feature AND the meaning of the commands may vary between TLS providers.
|
|
TLSPolicy & | setHostname (const std::string &hostname) |
| | set the hostname to be used for SNI and certificate validation.
|
|
TLSPolicy & | setCertPath (const std::string &certPath) |
| | set the path to the certificate file. The file must be in PEM format.
|
|
TLSPolicy & | setKeyPath (const std::string &keyPath) |
| | set the path to the private key file. The file must be in PEM format.
|
|
TLSPolicy & | setCaPath (const std::string &caPath) |
| | set the path to the CA file or directory. The file must be in PEM format.
|
|
TLSPolicy & | setUseOldTLS (bool useOldTLS) |
| | enables the use of the old TLS protocol (old meaning < TLS 1.2). TLS providers may not support old protocols even if this option is set
|
| TLSPolicy & | setAlpnProtocols (const std::vector< std::string > &alpnProtocols) |
| | set the list of protocols to be used for ALPN.
|
|
TLSPolicy & | setAlpnProtocols (std::vector< std::string > &&alpnProtocols) |
| TLSPolicy & | setUseSystemCertStore (bool useSystemCertStore) |
| | Weather to use the system's certificate store.
|
|
TLSPolicy & | setValidate (bool enable) |
| | Enable certificate validation.
|
| TLSPolicy & | setAllowBrokenChain (bool allow) |
| | Allow broken chain (self-signed certificate, root CA not in allowed list, etc..) but still validate the domain name and date. This option has no effect if validate is false.
|
|
const std::vector< std::pair< std::string, std::string > > & | getConfCmds () const |
|
const std::string & | getHostname () const |
|
const std::string & | getCertPath () const |
|
const std::string & | getKeyPath () const |
|
const std::string & | getCaPath () const |
|
bool | getUseOldTLS () const |
|
bool | getValidate () const |
|
bool | getAllowBrokenChain () const |
|
const std::vector< std::string > & | getAlpnProtocols () const |
|
const std::vector< std::string > & | getAlpnProtocols () |
|
bool | getUseSystemCertStore () const |
| TLSPolicy & trantor::TLSPolicy::setConfCmds |
( |
const std::vector< std::pair< std::string, std::string > > & | sslConfCmds | ) |
|
|
inline |
set the ssl configuration commands. The commands will be passed to the ssl library. The commands are in the form of {{key, value}}. for example, {"SSL_OP_NO_SSLv2", "1"}. Not all TLS providers support this feature AND the meaning of the commands may vary between TLS providers.
As of 2023-03 Only OpenSSL supports this feature. LibreSSL does not nor Botan.