# HG changeset patch # User Alain Mazy # Date 1736166366 -3600 # Node ID b7524b8d306118941249de23de5ed808c015a1ba # Parent 089b8e5158d1c1b806ea8f2325489585f8ed0e55 fix build for older libcurl versions diff -r 089b8e5158d1 -r b7524b8d3061 OrthancFramework/Sources/HttpClient.cpp --- a/OrthancFramework/Sources/HttpClient.cpp Mon Jan 06 13:17:08 2025 +0100 +++ b/OrthancFramework/Sources/HttpClient.cpp Mon Jan 06 13:26:06 2025 +0100 @@ -860,12 +860,15 @@ if (verifyPeers_) { +#if defined(CURLSSLOPT_NATIVE_CA) // from curl v 8.2.0 if (caCertificates_.empty()) // use native CA store (equivalent to --ca-native) { CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA)); } - else // use provided CA file (equivalent to --cacert) + else +#endif { + // use provided CA file (equivalent to --cacert) CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_CAINFO, caCertificates_.c_str())); }