Skip to content
Snippets Groups Projects
Commit 53387b6a authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3931] Fix TLS, remove old boolean _tlsEnabled

parent d36d6b9e
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,7 @@ SIPAccount::SIPAccount (const AccountID& accountID) ...@@ -99,7 +99,7 @@ SIPAccount::SIPAccount (const AccountID& accountID)
, _authenticationUsername ("") , _authenticationUsername ("")
, _tlsSetting (NULL) , _tlsSetting (NULL)
, _dtmfType (OVERRTP) , _dtmfType (OVERRTP)
, _tlsEnable ("") , _tlsEnable ("false")
, _tlsPortStr (DEFAULT_SIP_TLS_PORT) , _tlsPortStr (DEFAULT_SIP_TLS_PORT)
, _tlsCaListFile ("") , _tlsCaListFile ("")
, _tlsCertificateFile ("") , _tlsCertificateFile ("")
...@@ -114,7 +114,6 @@ SIPAccount::SIPAccount (const AccountID& accountID) ...@@ -114,7 +114,6 @@ SIPAccount::SIPAccount (const AccountID& accountID)
, _tlsNegotiationTimeoutSec ("2") , _tlsNegotiationTimeoutSec ("2")
, _tlsNegotiationTimeoutMsec ("0") , _tlsNegotiationTimeoutMsec ("0")
, _stunServer (DFT_STUN_SERVER) , _stunServer (DFT_STUN_SERVER)
, _tlsEnabled (false)
, _stunEnabled (false) , _stunEnabled (false)
, _srtpEnabled (false) , _srtpEnabled (false)
, _srtpKeyExchange ("sdes") , _srtpKeyExchange ("sdes")
...@@ -1025,7 +1024,8 @@ int SIPAccount::registerVoIPLink() ...@@ -1025,7 +1024,8 @@ int SIPAccount::registerVoIPLink()
initCredential(); initCredential();
// Init TLS settings if the user wants to use TLS // Init TLS settings if the user wants to use TLS
if (_tlsEnabled) { if (_tlsEnable == "true") {
_debug ("Account: TLS is ennabled for accounr %s", getAccountID().c_str());
_transportType = PJSIP_TRANSPORT_TLS; _transportType = PJSIP_TRANSPORT_TLS;
initTlsConfiguration(); initTlsConfiguration();
} }
...@@ -1093,6 +1093,8 @@ pjsip_ssl_method SIPAccount::sslMethodStringToPjEnum (const std::string& method) ...@@ -1093,6 +1093,8 @@ pjsip_ssl_method SIPAccount::sslMethodStringToPjEnum (const std::string& method)
void SIPAccount::initTlsConfiguration (void) void SIPAccount::initTlsConfiguration (void)
{ {
_debug ("SipAccount: Init TLS configuration");
/* /*
* Initialize structure to zero * Initialize structure to zero
*/ */
...@@ -1156,7 +1158,7 @@ void SIPAccount::loadConfig() ...@@ -1156,7 +1158,7 @@ void SIPAccount::loadConfig()
if (_registrationExpire.empty()) if (_registrationExpire.empty())
_registrationExpire = DFT_EXPIRE_VALUE; _registrationExpire = DFT_EXPIRE_VALUE;
if (_tlsEnabled) { if (_tlsEnable == "true") {
initTlsConfiguration(); initTlsConfiguration();
_transportType = PJSIP_TRANSPORT_TLS; _transportType = PJSIP_TRANSPORT_TLS;
} else { } else {
......
...@@ -806,18 +806,8 @@ class SIPAccount : public Account ...@@ -806,18 +806,8 @@ class SIPAccount : public Account
std::string _tlsNegotiationTimeoutMsec; std::string _tlsNegotiationTimeoutMsec;
std::string _stunServer; std::string _stunServer;
bool _tlsEnabled;
bool _stunEnabled; bool _stunEnabled;
// std::string _routeset;
// std::string _realm;
// std::string _tlsListenerPort;
// std::string _routeSet;
// std::string _dtmfType;
bool _srtpEnabled; bool _srtpEnabled;
std::string _srtpKeyExchange; std::string _srtpKeyExchange;
bool _srtpFallback; bool _srtpFallback;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment