#include <ConfigTlsServer.h>
Public Member Functions | |
| ConfigTlsServer * | setForceSni (bool forceSni=true) |
| bool | getForceSni () const |
| ConfigTlsServer * | addSniCerts (const std::map< std::string, std::map< std::string, std::variant< std::string, bool, ssl_option_t > > > &sniCerts) |
| ConfigTlsServer * | addSniCert (const std::string &domain, const std::map< std::string, std::variant< std::string, bool, ssl_option_t > > &sniCert) |
| const std::map< std::string, std::map< std::string, std::variant< std::string, bool, ssl_option_t > > > & | getSniCerts () const |
| Public Member Functions inherited from net::config::ConfigTls | |
| ConfigTls * | setInitTimeout (const utils::Timeval &newInitTimeout) |
| utils::Timeval | getInitTimeout () const |
| ConfigTls * | setShutdownTimeout (const utils::Timeval &newShutdownTimeout) |
| utils::Timeval | getShutdownTimeout () const |
| ConfigTls * | setCert (const std::string &cert) |
| std::string | getCert () const |
| ConfigTls * | setCertKey (const std::string &certKey) |
| std::string | getCertKey () const |
| ConfigTls * | setCertKeyPassword (const std::string &certKeyPassword) |
| std::string | getCertKeyPassword () const |
| ConfigTls * | setCaCert (const std::string &caCert) |
| std::string | getCaCert () const |
| ConfigTls * | setCaCertDir (const std::string &caCertDir) |
| std::string | getCaCertDir () const |
| ConfigTls * | setCaCertUseDefaultDir (bool set=true) |
| bool | getCaCertUseDefaultDir () const |
| ConfigTls * | setCaCertAcceptUnknown (bool set=true) |
| bool | getCaCertAcceptUnknown () const |
| ConfigTls * | setCipherList (const std::string &cipherList) |
| std::string | getCipherList () const |
| ConfigTls * | setSslOptions (ssl_option_t sslOptions) |
| ssl_option_t | getSslOptions () const |
| ConfigTls * | setNoCloseNotifyIsEOF (bool noCloseNotifyIsEOF=true) |
| bool | getNoCloseNotifyIsEOF () const |
| Public Member Functions inherited from net::config::ConfigSection | |
| template<typename T> | |
| ConfigSection (ConfigInstance *instance, T *sectionPtr, const std::string &group="Sections") | |
| ~ConfigSection () override | |
| ConfigSection (const ConfigSection &)=delete | |
| ConfigSection (ConfigSection &&)=delete | |
| ConfigSection & | operator= (const ConfigSection &)=delete |
| Public Member Functions inherited from utils::SubCommand | |
| SubCommand (const SubCommand &)=delete | |
| SubCommand (SubCommand &&)=delete | |
| SubCommand & | operator= (const SubCommand &)=delete |
| SubCommand & | operator= (SubCommand &&)=delete |
| virtual | ~SubCommand () |
| std::string | getName () const |
| std::string | version () const |
| CLI::Option * | setConfig (const std::string &defaultConfigFile) const |
| CLI::Option * | setLogFile (const std::string &defaultLogFile) const |
| CLI::Option * | setVersionFlag (const std::string &version) const |
| bool | hasParent () const |
| SubCommand * | getParent () const |
| SubCommand * | allowExtras (bool allow=true) |
| SubCommand * | required (bool required=true, bool force=true) |
| SubCommand * | required (SubCommand *subCommand, bool required=true) |
| SubCommand * | required (CLI::Option *option, bool required=true) |
| bool | getRequired () const |
| SubCommand * | needs (SubCommand *subCommand, bool needs=true) |
| SubCommand * | disabled (SubCommand *subCommand, bool disabled=true) |
| SubCommand * | setRequireCallback (const std::function< void(void)> &callback) |
| SubCommand * | finalCallback (const std::function< void()> &finalCallback) |
| std::string | configToStr () const |
| std::string | help (const CLI::App *helpApp, const CLI::AppFormatMode &mode) const |
| void | addSubCommandApp (std::shared_ptr< utils::AppWithPtr > subCommand) |
| template<typename NewSubCommand, typename... Args> | |
| NewSubCommand * | newSubCommand (Args &&... args) |
| template<typename RequestedSubCommand> | |
| RequestedSubCommand * | getSubCommand () |
| template<typename RequestedSubCommand> | |
| RequestedSubCommand * | getSubCommand () const |
| CLI::Option * | getOption (const std::string &name) const |
| CLI::Option * | addOption (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOption (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOptionVariable (const std::string &name, ValueTypeT &variable, const std::string &description, const std::string &typeName, const CLI::Validator &additionalValidator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOptionVariable (const std::string &name, ValueTypeT &variable, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &additionalValidator) const |
| CLI::Option * | addOptionFunction (const std::string &name, const std::function< void(const std::string &)> &callback, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOptionFunction (const std::string &name, const std::function< void(const std::string &)> &callback, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const |
| CLI::Option * | addFlag (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addFlag (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const |
| CLI::Option * | addFlagFunction (const std::string &name, const std::function< void()> &callback, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const |
| CLI::Option * | addFlagFunction (const std::string &name, const std::function< void()> &callback, const std::string &description, const std::string &typeName, const std::string &defaultValue, const CLI::Validator &validator) const |
Protected Member Functions | |
| ConfigTlsServer (ConfigInstance *instance) | |
| ~ConfigTlsServer () override | |
| Protected Member Functions inherited from net::config::ConfigTls | |
| template<typename ConcretConfigTls> | |
| ConfigTls (ConfigInstance *instance, ConcretConfigTls section) | |
| ~ConfigTls () override | |
| Protected Member Functions inherited from utils::SubCommand | |
| SubCommand (SubCommand *parent, std::shared_ptr< utils::AppWithPtr > appWithPtr, const std::string &group, bool final=false) | |
| template<typename ConcretSubCommand> | |
| SubCommand (SubCommand *parent, ConcretSubCommand *concretSubCommand, const std::string &group, bool final=false) | |
| void | parse (int argc, char *argv[]) const |
| SubCommand * | description (const std::string &description) |
| SubCommand * | footer (const std::string &footer) |
| void | removeSubCommand () |
| template<typename ValueTypeT> | |
| CLI::Option * | setDefaultValue (CLI::Option *option, const ValueTypeT &value, bool clear=true) const |
| CLI::Option * | setConfigurable (CLI::Option *option, bool configurable) const |
Private Types | |
| using | Super = ConfigTls |
Private Attributes | |
| std::map< std::string, std::map< std::string, std::variant< std::string, bool, ssl_option_t > > > | defaultSniCerts |
| std::map< std::string, std::map< std::string, std::variant< std::string, bool, ssl_option_t > > > | configuredSniCerts |
| CLI::Option * | sniCertsOpt = nullptr |
| CLI::Option * | forceSniOpt = nullptr |
Additional Inherited Members | |
| Static Public Attributes inherited from net::config::ConfigTls | |
| static constexpr std::string_view | NAME {"tls"} |
| static constexpr std::string_view | DESCRIPTION {"Configuration of SSL/TLS behavior"} |
| Static Protected Member Functions inherited from utils::SubCommand | |
| static CLI::App * | getHelpTriggerApp () |
| static CLI::App * | getShowConfigTriggerApp () |
| static CLI::App * | getCommandlineTriggerApp () |
| Protected Attributes inherited from utils::SubCommand | |
| CLI::Option * | helpOpt = nullptr |
| Static Protected Attributes inherited from utils::SubCommand | |
| static std::shared_ptr< CLI::Formatter > | sectionFormatter = makeSectionFormatter() |
| static std::map< std::string, std::string > | aliases |
| static CLI::App * | helpTriggerApp = nullptr |
| static CLI::App * | showConfigTriggerApp = nullptr |
| static CLI::App * | commandlineTriggerApp = nullptr |
Definition at line 63 of file ConfigTlsServer.h.
|
private |
Definition at line 65 of file ConfigTlsServer.h.
|
explicitprotected |
Definition at line 58 of file ConfigTlsServer.cpp.
References utils::SubCommand::addFlag(), utils::SubCommand::addOptionVariable(), net::config::ConfigTls::ConfigTls(), configuredSniCerts, defaultSniCerts, utils::SubCommand::finalCallback(), forceSniOpt, utils::SubCommand::getName(), utils::SubCommand::getParent(), and sniCertsOpt.
|
overrideprotected |
Definition at line 143 of file ConfigTlsServer.cpp.
| ConfigTlsServer * net::config::ConfigTlsServer::addSniCert | ( | const std::string & | domain, |
| const std::map< std::string, std::variant< std::string, bool, ssl_option_t > > & | sniCert ) |
Definition at line 164 of file ConfigTlsServer.cpp.
References defaultSniCerts, and sniCertsOpt.
| ConfigTlsServer * net::config::ConfigTlsServer::addSniCerts | ( | const std::map< std::string, std::map< std::string, std::variant< std::string, bool, ssl_option_t > > > & | sniCerts | ) |
Definition at line 156 of file ConfigTlsServer.cpp.
References defaultSniCerts, and sniCertsOpt.
| bool net::config::ConfigTlsServer::getForceSni | ( | ) | const |
Definition at line 152 of file ConfigTlsServer.cpp.
References forceSniOpt.
| const std::map< std::string, std::map< std::string, std::variant< std::string, bool, ssl_option_t > > > & net::config::ConfigTlsServer::getSniCerts | ( | ) | const |
Definition at line 173 of file ConfigTlsServer.cpp.
References configuredSniCerts, and defaultSniCerts.
Referenced by net::config::stream::tls::ConfigSocketServer< ConfigSocketServerBaseT >::getSslCtx().
| ConfigTlsServer * net::config::ConfigTlsServer::setForceSni | ( | bool | forceSni = true | ) |
Definition at line 146 of file ConfigTlsServer.cpp.
References forceSniOpt, and utils::SubCommand::setDefaultValue().
|
private |
Definition at line 84 of file ConfigTlsServer.h.
Referenced by ConfigTlsServer(), and getSniCerts().
|
private |
Definition at line 83 of file ConfigTlsServer.h.
Referenced by addSniCert(), addSniCerts(), ConfigTlsServer(), and getSniCerts().
|
private |
Definition at line 87 of file ConfigTlsServer.h.
Referenced by ConfigTlsServer(), getForceSni(), and setForceSni().
|
private |
Definition at line 86 of file ConfigTlsServer.h.
Referenced by addSniCert(), addSniCerts(), and ConfigTlsServer().