Mercurial > hg > orthanc
changeset 5946:b7524b8d3061
fix build for older libcurl versions
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 06 Jan 2025 13:26:06 +0100 |
parents | 089b8e5158d1 |
children | ccf431b40a3a |
files | OrthancFramework/Sources/HttpClient.cpp |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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())); }