1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-17 17:25:32 +00:00

fix: omit curlopt options if curl is old (#4675)

This commit is contained in:
Charles Kerr 2023-01-26 12:52:32 -06:00 committed by GitHub
parent aabf1b7e0a
commit b1744d513e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -516,8 +516,10 @@ public:
if (!curl_ssl_verify) if (!curl_ssl_verify)
{ {
#if LIBCURL_VERSION_NUM >= 0x073400 /* 7.52.0 */
(void)curl_easy_setopt(e, CURLOPT_SSL_VERIFYHOST, 0L); (void)curl_easy_setopt(e, CURLOPT_SSL_VERIFYHOST, 0L);
(void)curl_easy_setopt(e, CURLOPT_SSL_VERIFYPEER, 0L); (void)curl_easy_setopt(e, CURLOPT_SSL_VERIFYPEER, 0L);
#endif
} }
else if (!std::empty(curl_ca_bundle)) else if (!std::empty(curl_ca_bundle))
{ {
@ -539,7 +541,9 @@ public:
} }
else if (!std::empty(curl_ca_bundle)) else if (!std::empty(curl_ca_bundle))
{ {
#if LIBCURL_VERSION_NUM >= 0x073400 /* 7.52.0 */
(void)curl_easy_setopt(e, CURLOPT_PROXY_CAINFO, curl_ca_bundle.c_str()); (void)curl_easy_setopt(e, CURLOPT_PROXY_CAINFO, curl_ca_bundle.c_str());
#endif
} }
if (auto const& ua = user_agent; !std::empty(ua)) if (auto const& ua = user_agent; !std::empty(ua))