From dbc5571594eeacc4e3c7f2de3c78f8dd5c12f087 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Tue, 11 Nov 2014 16:26:44 -0600 Subject: [PATCH] FS-6983 wrap new curl TLS macro usage with ifdefs --- src/mod/applications/mod_httapi/mod_httapi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index 4dade0f959..420b7578d9 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -1625,10 +1625,14 @@ static switch_status_t httapi_sync(client_t *client) if (client->profile->ssl_version) { if (!strcasecmp(client->profile->ssl_version, "SSLv3")) { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); +#ifdef CURL_SSLVERSION_TLSv1_1 } else if (!strcasecmp(client->profile->ssl_version, "TLSv1.1")) { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); +#endif +#ifdef CURL_SSLVERSION_TLSv1_2 } else if (!strcasecmp(client->profile->ssl_version, "TLSv1.2")) { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); +#endif } } else { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); @@ -2533,10 +2537,14 @@ static switch_status_t fetch_cache_data(http_file_context_t *context, const char if (client->profile->ssl_version) { if (!strcasecmp(client->profile->ssl_version, "SSLv3")) { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); +#ifdef CURL_SSLVERSION_TLSv1_1 } else if (!strcasecmp(client->profile->ssl_version, "TLSv1.1")) { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); +#endif +#ifdef CURL_SSLVERSION_TLSv1_2 } else if (!strcasecmp(client->profile->ssl_version, "TLSv1.2")) { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); +#endif } } else { switch_curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);