Mercurial > hg > orthanc-stone
diff Framework/Orthanc/Core/HttpClient.cpp @ 12:9220cf4a63d5
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Nov 2016 14:14:34 +0100 |
parents | 4b7e0244881f |
children | da2cf3ace87a |
line wrap: on
line diff
--- a/Framework/Orthanc/Core/HttpClient.cpp Wed Oct 26 12:14:03 2016 +0200 +++ b/Framework/Orthanc/Core/HttpClient.cpp Wed Nov 09 14:14:34 2016 +0100 @@ -44,7 +44,7 @@ #include <boost/thread/mutex.hpp> -#if ORTHANC_SSL_ENABLED == 1 +#if ORTHANC_ENABLE_SSL == 1 // For OpenSSL initialization and finalization # include <openssl/conf.h> # include <openssl/engine.h> @@ -54,7 +54,7 @@ #endif -#if ORTHANC_PKCS11_ENABLED == 1 +#if ORTHANC_ENABLE_PKCS11 == 1 # include "Pkcs11.h" #endif @@ -161,7 +161,7 @@ return timeout_; } -#if ORTHANC_PKCS11_ENABLED == 1 +#if ORTHANC_ENABLE_PKCS11 == 1 bool IsPkcs11Initialized() { boost::mutex::scoped_lock lock(mutex_); @@ -435,7 +435,7 @@ CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_HEADERDATA, &headerParameters)); } -#if ORTHANC_SSL_ENABLED == 1 +#if ORTHANC_ENABLE_SSL == 1 // Setup HTTPS-related options if (verifyPeers_) @@ -461,7 +461,7 @@ if (pkcs11Enabled_) { -#if ORTHANC_PKCS11_ENABLED == 1 +#if ORTHANC_ENABLE_PKCS11 == 1 if (GlobalParameters::GetInstance().IsPkcs11Initialized()) { CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_SSLENGINE, Pkcs11::GetEngineIdentifier())); @@ -480,7 +480,7 @@ } else if (!clientCertificateFile_.empty()) { -#if ORTHANC_SSL_ENABLED == 1 +#if ORTHANC_ENABLE_SSL == 1 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_SSLCERTTYPE, "PEM")); CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_SSLCERT, clientCertificateFile_.c_str())); @@ -671,7 +671,7 @@ void HttpClient::ConfigureSsl(bool httpsVerifyPeers, const std::string& httpsVerifyCertificates) { -#if ORTHANC_SSL_ENABLED == 1 +#if ORTHANC_ENABLE_SSL == 1 if (httpsVerifyPeers) { if (httpsVerifyCertificates.empty()) @@ -696,7 +696,7 @@ void HttpClient::GlobalInitialize() { -#if ORTHANC_SSL_ENABLED == 1 +#if ORTHANC_ENABLE_SSL == 1 CheckCode(curl_global_init(CURL_GLOBAL_ALL)); #else CheckCode(curl_global_init(CURL_GLOBAL_ALL & ~CURL_GLOBAL_SSL)); @@ -708,7 +708,7 @@ { curl_global_cleanup(); -#if ORTHANC_PKCS11_ENABLED == 1 +#if ORTHANC_ENABLE_PKCS11 == 1 Pkcs11::Finalize(); #endif } @@ -796,7 +796,7 @@ const std::string& pin, bool verbose) { -#if ORTHANC_PKCS11_ENABLED == 1 +#if ORTHANC_ENABLE_PKCS11 == 1 LOG(INFO) << "Initializing PKCS#11 using " << module << (pin.empty() ? " (no PIN provided)" : " (PIN is provided)"); GlobalParameters::GetInstance().InitializePkcs11(module, pin, verbose); @@ -809,7 +809,7 @@ void HttpClient::InitializeOpenSsl() { -#if ORTHANC_SSL_ENABLED == 1 +#if ORTHANC_ENABLE_SSL == 1 // https://wiki.openssl.org/index.php/Library_Initialization SSL_library_init(); SSL_load_error_strings(); @@ -821,7 +821,7 @@ void HttpClient::FinalizeOpenSsl() { - #if ORTHANC_SSL_ENABLED == 1 + #if ORTHANC_ENABLE_SSL == 1 // Finalize OpenSSL // https://wiki.openssl.org/index.php/Library_Initialization#Cleanup FIPS_mode_set(0);