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
1 changed files with 4 additions and 0 deletions

View File

@ -516,8 +516,10 @@ public:
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_VERIFYPEER, 0L);
#endif
}
else if (!std::empty(curl_ca_bundle))
{
@ -539,7 +541,9 @@ public:
}
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());
#endif
}
if (auto const& ua = user_agent; !std::empty(ua))