Commit 2377c0f8 authored by Adrien Béraud's avatar Adrien Béraud

sipaccount: cleanup unused code

Issue: #78262
Change-Id: Ic4cc4d72b37965614d3a64ebd8449d31fe7f97bd
parent c36d68f6
......@@ -1700,50 +1700,6 @@ SIPAccount::getTlsSettings() const
};
}
static void
set_opt(const std::map<std::string, std::string> &details, const char *key, std::string &val)
{
std::map<std::string, std::string>::const_iterator it = details.find(key);
if (it != details.end())
val = it->second;
}
static void
set_opt(const std::map<std::string, std::string> &details, const char *key, bool &val)
{
std::map<std::string, std::string>::const_iterator it = details.find(key);
if (it != details.end())
val = it->second == TRUE_STR;
}
static void
set_opt(const std::map<std::string, std::string> &details, const char *key, pj_uint16_t &val)
{
std::map<std::string, std::string>::const_iterator it = details.find(key);
if (it != details.end())
val = atoi(it->second.c_str());
}
void SIPAccount::setTlsSettings(const std::map<std::string, std::string>& details)
{
assert(isIP2IP());
set_opt(details, Conf::CONFIG_TLS_LISTENER_PORT, tlsListenerPort_);
set_opt(details, Conf::CONFIG_TLS_ENABLE, tlsEnable_);
set_opt(details, Conf::CONFIG_TLS_CA_LIST_FILE, tlsCaListFile_);
set_opt(details, Conf::CONFIG_TLS_CERTIFICATE_FILE, tlsCertificateFile_);
set_opt(details, Conf::CONFIG_TLS_PRIVATE_KEY_FILE, tlsPrivateKeyFile_);
set_opt(details, Conf::CONFIG_TLS_PASSWORD, tlsPassword_);
set_opt(details, Conf::CONFIG_TLS_METHOD, tlsMethod_);
set_opt(details, Conf::CONFIG_TLS_CIPHERS, tlsCiphers_);
set_opt(details, Conf::CONFIG_TLS_SERVER_NAME, tlsServerName_);
set_opt(details, Conf::CONFIG_TLS_VERIFY_CLIENT, tlsVerifyClient_);
set_opt(details, Conf::CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE, tlsRequireClientCertificate_);
set_opt(details, Conf::CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC, tlsNegotiationTimeoutSec_);
}
bool SIPAccount::isIP2IP() const
{
return accountID_ == IP2IP_PROFILE;
......
......@@ -154,11 +154,6 @@ class SIPAccount : public SIPAccountBase {
*/
std::map<std::string, std::string> getTlsSettings() const;
/**
* Manage the TLS settings from a client application
*/
void setTlsSettings(const std::map<std::string, std::string>& details);
/**
* Actually useless, since config loading is done in init()
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment