Mercurial > hg > orthanc
diff Core/HttpClient.h @ 1534:95b3b0260240
Options to validate peers against CA certificates in HTTPS requests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 13 Aug 2015 12:42:32 +0200 |
parents | 0011cc99443c |
children | ba0226474e22 |
line wrap: on
line diff
--- a/Core/HttpClient.h Wed Aug 12 17:52:10 2015 +0200 +++ b/Core/HttpClient.h Thu Aug 13 12:42:32 2015 +0200 @@ -54,6 +54,8 @@ bool isVerbose_; long timeout_; std::string proxy_; + bool verifyPeers_; + std::string caCertificates_; void Setup(); @@ -140,8 +142,25 @@ proxy_ = proxy; } + void SetHttpsVerifyPeers(bool verify) + { + verifyPeers_ = verify; + } + + bool IsHttpsVerifyPeers() const + { + return verifyPeers_; + } + + void SetHttpsCACertificates(const std::string& certificates) + { + caCertificates_ = certificates; + } + + const std::string& GetHttpsCACertificates() const; + static void GlobalInitialize(bool httpsVerifyPeers, - const std::string& httpsVerifyCertificates); + const std::string& httpsCACertificates); static void GlobalFinalize(); };