SNode.C
Loading...
Searching...
No Matches
net::config::ConfigTlsClient Class Reference

#include <ConfigTlsClient.h>

Inheritance diagram for net::config::ConfigTlsClient:
Collaboration diagram for net::config::ConfigTlsClient:

Public Member Functions

ConfigTlsClientsetSni (const std::string &sni)
std::string getSni () const
Public Member Functions inherited from net::config::ConfigTls
ConfigTlssetInitTimeout (const utils::Timeval &newInitTimeout)
utils::Timeval getInitTimeout () const
ConfigTlssetShutdownTimeout (const utils::Timeval &newShutdownTimeout)
utils::Timeval getShutdownTimeout () const
ConfigTlssetCert (const std::string &cert)
std::string getCert () const
ConfigTlssetCertKey (const std::string &certKey)
std::string getCertKey () const
ConfigTlssetCertKeyPassword (const std::string &certKeyPassword)
std::string getCertKeyPassword () const
ConfigTlssetCaCert (const std::string &caCert)
std::string getCaCert () const
ConfigTlssetCaCertDir (const std::string &caCertDir)
std::string getCaCertDir () const
ConfigTlssetCaCertUseDefaultDir (bool set=true)
bool getCaCertUseDefaultDir () const
ConfigTlssetCaCertAcceptUnknown (bool set=true)
bool getCaCertAcceptUnknown () const
ConfigTlssetCipherList (const std::string &cipherList)
std::string getCipherList () const
ConfigTlssetSslOptions (ssl_option_t sslOptions)
ssl_option_t getSslOptions () const
ConfigTlssetNoCloseNotifyIsEOF (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
ConfigSectionoperator= (const ConfigSection &)=delete
Public Member Functions inherited from utils::SubCommand
 SubCommand (const SubCommand &)=delete
 SubCommand (SubCommand &&)=delete
SubCommandoperator= (const SubCommand &)=delete
SubCommandoperator= (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
SubCommandgetParent () const
SubCommandallowExtras (bool allow=true)
SubCommandrequired (bool required=true, bool force=true)
SubCommandrequired (SubCommand *subCommand, bool required=true)
SubCommandrequired (CLI::Option *option, bool required=true)
bool getRequired () const
SubCommandneeds (SubCommand *subCommand, bool needs=true)
SubCommanddisabled (SubCommand *subCommand, bool disabled=true)
SubCommandsetRequireCallback (const std::function< void(void)> &callback)
SubCommandfinalCallback (const std::function< void()> &finalCallback)
std::string configToStr () const
std::string help (const CLI::App *helpApp, const CLI::AppFormatMode &mode) const
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

 ConfigTlsClient (ConfigInstance *instance)
 ~ConfigTlsClient () 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)
template<typename ConcretSubCommand>
 SubCommand (SubCommand *parent, ConcretSubCommand *concretSubCommand, const std::string &group, bool final=true)
void parse (int argc, char *argv[]) const
SubCommanddescription (const std::string &description)
SubCommandfooter (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

CLI::Option * sniOpt = 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 ()
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

Detailed Description

Definition at line 61 of file ConfigTlsClient.h.

Member Typedef Documentation

◆ Super

Definition at line 63 of file ConfigTlsClient.h.

Constructor & Destructor Documentation

◆ ConfigTlsClient()

net::config::ConfigTlsClient::ConfigTlsClient ( ConfigInstance * instance)
explicitprotected

Definition at line 56 of file ConfigTlsClient.cpp.

57 : ConfigTls(instance, this) {
58 sniOpt = addOption( //
59 "--sni",
60 "Server Name Indication",
61 "sni",
62 CLI::TypeValidator<std::string>());
63 }
ConfigTls(ConfigInstance *instance, ConcretConfigTls section)
Definition ConfigTls.hpp:52
CLI::Option * addOption(const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const

References utils::SubCommand::addOption(), net::config::ConfigTls::ConfigTls(), and sniOpt.

Here is the call graph for this function:

◆ ~ConfigTlsClient()

net::config::ConfigTlsClient::~ConfigTlsClient ( )
overrideprotected

Definition at line 65 of file ConfigTlsClient.cpp.

65 {
66 }

Member Function Documentation

◆ getSni()

std::string net::config::ConfigTlsClient::getSni ( ) const

Definition at line 74 of file ConfigTlsClient.cpp.

74 {
75 return sniOpt->as<std::string>();
76 }

References sniOpt.

◆ setSni()

ConfigTlsClient & net::config::ConfigTlsClient::setSni ( const std::string & sni)

Definition at line 68 of file ConfigTlsClient.cpp.

68 {
70
71 return *this;
72 }
CLI::Option * setDefaultValue(CLI::Option *option, const ValueTypeT &value, bool clear=true) const
Definition SubCommand.h:347

References utils::SubCommand::setDefaultValue(), and sniOpt.

Here is the call graph for this function:

Member Data Documentation

◆ sniOpt

CLI::Option* net::config::ConfigTlsClient::sniOpt = nullptr
private

Definition at line 75 of file ConfigTlsClient.h.

Referenced by ConfigTlsClient(), getSni(), and setSni().


The documentation for this class was generated from the following files: