Search
j0ke.net Open Build Service
>
Projects
>
server:http
:
nginx
:
suse
>
nginx-1.13
> modsecurity-2.9.1_curl-lower_7.34.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File modsecurity-2.9.1_curl-lower_7.34.patch of Package nginx-1.13
--- mlogc/mlogc.c.orig 2016-06-02 09:15:03.283648355 +0200 +++ mlogc/mlogc.c 2016-06-02 10:59:44.378377602 +0200 @@ -1270,33 +1270,36 @@ } - /* Seems like CURL_SSLVERSION_TLSv1_2 is not supported on libcurl - * < v7.34.0 - * - * version_num is a 24 bit number created like this: - * <8 bits major number> | <8 bits minor number> | <8 bits patch number>. - */ - switch (tlsprotocol) { - case 0: - curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_0); - break; - case 1: - curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); - break; - case 2: - curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); - break; - default: - curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); - break; - } cmaj = curlversion->version_num >> 16; cmin = (curlversion->version_num & 0x00ff00) >> 8; cpat = (curlversion->version_num & 0x0000ff); /* If cURL version < v7.34.0, use TLS v1.x */ if (cmaj <= 7 && cmin < 34) { curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); - } +#ifdef CURL_SSLVERSION_TLSv1_0 + } else { + /* Seems like CURL_SSLVERSION_TLSv1_2 is not supported on libcurl + * < v7.34.0 + * + * version_num is a 24 bit number created like this: + * <8 bits major number> | <8 bits minor number> | <8 bits patch number>. + */ + switch (tlsprotocol) { + case 0: + curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_0); + break; + case 1: + curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); + break; + case 2: + curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); + break; + default: + curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); + break; + } +#endif + } curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15); curl_easy_setopt(curl, CURLOPT_NOSIGNAL, TRUE);