comparison Core/HttpClient.h @ 2022:fefbe71c2272

Possibility to use PKCS#11 authentication for hardware security modules with Orthanc peers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 17 Jun 2016 17:09:50 +0200
parents a0bd8cd55da7
children 7fe860db9664
comparison
equal deleted inserted replaced
2021:bd143a77eb7a 2022:fefbe71c2272
60 bool verifyPeers_; 60 bool verifyPeers_;
61 std::string caCertificates_; 61 std::string caCertificates_;
62 std::string clientCertificateFile_; 62 std::string clientCertificateFile_;
63 std::string clientCertificateKeyFile_; 63 std::string clientCertificateKeyFile_;
64 std::string clientCertificateKeyPassword_; 64 std::string clientCertificateKeyPassword_;
65 bool pkcs11Enabled_;
65 66
66 void Setup(); 67 void Setup();
67 68
68 void operator= (const HttpClient&); // Assignment forbidden 69 void operator= (const HttpClient&); // Assignment forbidden
69 HttpClient(const HttpClient& base); // Copy forbidden 70 HttpClient(const HttpClient& base); // Copy forbidden
177 178
178 void SetClientCertificate(const std::string& certificateFile, 179 void SetClientCertificate(const std::string& certificateFile,
179 const std::string& certificateKeyFile, 180 const std::string& certificateKeyFile,
180 const std::string& certificateKeyPassword); 181 const std::string& certificateKeyPassword);
181 182
183 void SetPkcs11Enabled(bool enabled)
184 {
185 pkcs11Enabled_ = enabled;
186 }
187
188 bool IsPkcs11Enabled() const
189 {
190 return pkcs11Enabled_;
191 }
192
182 const std::string& GetClientCertificateFile() const 193 const std::string& GetClientCertificateFile() const
183 { 194 {
184 return clientCertificateFile_; 195 return clientCertificateFile_;
185 } 196 }
186 197
196 207
197 static void GlobalInitialize(); 208 static void GlobalInitialize();
198 209
199 static void GlobalFinalize(); 210 static void GlobalFinalize();
200 211
212 static void InitializePkcs11(const std::string& module,
213 const std::string& pin,
214 bool verbose);
215
201 static void ConfigureSsl(bool httpsVerifyPeers, 216 static void ConfigureSsl(bool httpsVerifyPeers,
202 const std::string& httpsCACertificates); 217 const std::string& httpsCACertificates);
203 218
204 static void SetDefaultProxy(const std::string& proxy); 219 static void SetDefaultProxy(const std::string& proxy);
205 220