* #26453: sip: use HAVE_TLS around all ssl dependent code

This fixes building after running ./configure --without-tls
This commit is contained in:
Tristan Matthews
2013-06-26 13:29:56 -04:00
parent 92d62cfc54
commit f6025f9d66
2 changed files with 8 additions and 0 deletions

View File

@ -631,12 +631,14 @@ void SIPAccount::registerVoIPLink()
if (hostname_.length() >= PJ_MAX_HOSTNAME)
return;
#if HAVE_TLS
// Init TLS settings if the user wants to use TLS
if (tlsEnable_ == TRUE_STR) {
DEBUG("TLS is enabled for account %s", accountID_.c_str());
transportType_ = PJSIP_TRANSPORT_TLS;
initTlsConfiguration();
}
#endif
// Init STUN settings for this account if the user selected it
if (stunEnabled_) {
@ -716,6 +718,7 @@ void SIPAccount::stopKeepAliveTimer()
}
}
#if HAVE_TLS
pjsip_ssl_method SIPAccount::sslMethodStringToPjEnum(const std::string& method)
{
if (method == "Default")
@ -775,6 +778,7 @@ void SIPAccount::initTlsConfiguration()
tlsSetting_.qos_type = PJ_QOS_TYPE_BEST_EFFORT;
tlsSetting_.qos_ignore_error = PJ_TRUE;
}
#endif
void SIPAccount::initStunConfiguration()
{
@ -803,10 +807,12 @@ void SIPAccount::loadConfig()
if (registrationExpire_ == 0)
registrationExpire_ = DEFAULT_REGISTRATION_TIME; /** Default expire value for registration */
#if HAVE_TLS
if (tlsEnable_ == TRUE_STR) {
initTlsConfiguration();
transportType_ = PJSIP_TRANSPORT_TLS;
} else
#endif
transportType_ = PJSIP_TRANSPORT_UDP;
}

View File

@ -528,6 +528,7 @@ class SIPAccount : public Account {
*/
std::vector< std::map<std::string, std::string > > credentials_;
#if HAVE_TLS
/**
* Maps a string description of the SSL method
* to the corresponding enum value in pjsip_ssl_method.
@ -545,6 +546,7 @@ class SIPAccount : public Account {
* Display the list of ciphers currently supported on the
*/
void displayCipherSuite();
#endif
/**
* Initializes STUN config from the config file