annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
60
77aec9be0a51 renaming of cppclient
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1288
6e7e5ed91c2d upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1273
diff changeset
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
6e7e5ed91c2d upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1273
diff changeset
4 * Department, University Hospital of Liege, Belgium
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
493
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
6 * This program is free software: you can redistribute it and/or
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
7 * modify it under the terms of the GNU General Public License as
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
9 * License, or (at your option) any later version.
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
493
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
11 * In addition, as a special exception, the copyright holders of this
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
12 * program give permission to link the code of its release with the
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
14 * that use the same license as the "OpenSSL" library), and distribute
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
15 * the linked executables. You must obey the GNU General Public License
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
16 * in all respects for all of the code used other than "OpenSSL". If you
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
17 * modify file(s) with this exception, you may extend this exception to
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
18 * your version of the file(s), but you are not obligated to do so. If
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
19 * you do not wish to do so, delete this exception statement from your
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
20 * version. If you delete this exception statement from all source files
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
21 * in the program, then also delete it here.
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
22 *
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
23 * This program is distributed in the hope that it will be useful, but
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
26 * General Public License for more details.
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 *
493
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
28 * You should have received a copy of the GNU General Public License
ff34c51cd3dd fix licensing terms
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 476
diff changeset
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 **/
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #pragma once
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
1404
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
35 #include "Enumerations.h"
474
a9693dc7089c move tostring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 473
diff changeset
36
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include <string>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 #include <boost/shared_ptr.hpp>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #include <json/json.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
60
77aec9be0a51 renaming of cppclient
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
41 namespace Orthanc
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 class HttpClient
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 private:
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 struct PImpl;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 boost::shared_ptr<PImpl> pimpl_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 std::string url_;
469
a6fe16a31615 transmitting credentials by copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 468
diff changeset
50 std::string credentials_;
473
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 469
diff changeset
51 HttpMethod method_;
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 469
diff changeset
52 HttpStatus lastStatus_;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 std::string postData_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 bool isVerbose_;
1186
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
55 long timeout_;
1273
88010d8e12cf Support of HTTP proxy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1186
diff changeset
56 std::string proxy_;
1534
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
57 bool verifyPeers_;
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
58 std::string caCertificates_;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
469
a6fe16a31615 transmitting credentials by copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 468
diff changeset
60 void Setup();
a6fe16a31615 transmitting credentials by copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 468
diff changeset
61
a6fe16a31615 transmitting credentials by copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 468
diff changeset
62 void operator= (const HttpClient&); // Forbidden
a6fe16a31615 transmitting credentials by copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 468
diff changeset
63
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 public:
469
a6fe16a31615 transmitting credentials by copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 468
diff changeset
65 HttpClient(const HttpClient& base);
a6fe16a31615 transmitting credentials by copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 468
diff changeset
66
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 HttpClient();
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 ~HttpClient();
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 void SetUrl(const char* url)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 url_ = std::string(url);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 void SetUrl(const std::string& url)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 url_ = url;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 const std::string& GetUrl() const
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 return url_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85
473
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 469
diff changeset
86 void SetMethod(HttpMethod method)
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 method_ = method;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
473
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 469
diff changeset
91 HttpMethod GetMethod() const
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 return method_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95
1186
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
96 void SetTimeout(long seconds)
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
97 {
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
98 timeout_ = seconds;
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
99 }
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
100
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
101 long GetTimeout() const
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
102 {
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
103 return timeout_;
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
104 }
b17b6bd59747 timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1052
diff changeset
105
1052
cc4ff680e2a0 http requests in lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 707
diff changeset
106 void SetPostData(const std::string& data)
cc4ff680e2a0 http requests in lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 707
diff changeset
107 {
cc4ff680e2a0 http requests in lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 707
diff changeset
108 postData_ = data;
cc4ff680e2a0 http requests in lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 707
diff changeset
109 }
cc4ff680e2a0 http requests in lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 707
diff changeset
110
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 std::string& AccessPostData()
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 return postData_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 const std::string& AccessPostData() const
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 return postData_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 void SetVerbose(bool isVerbose);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 bool IsVerbose() const
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 return isVerbose_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 bool Apply(std::string& answer);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 bool Apply(Json::Value& answer);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
473
c9a5d72f8481 changing the namespace of HTTP enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 469
diff changeset
132 HttpStatus GetLastStatus() const
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 return lastStatus_;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
468
456b9d2e9af4 rename methods for clarity
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 457
diff changeset
137 void SetCredentials(const char* username,
456b9d2e9af4 rename methods for clarity
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 457
diff changeset
138 const char* password);
457
997282a61ff8 cleaner names
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 400
diff changeset
139
1273
88010d8e12cf Support of HTTP proxy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1186
diff changeset
140 void SetProxy(const std::string& proxy)
88010d8e12cf Support of HTTP proxy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1186
diff changeset
141 {
88010d8e12cf Support of HTTP proxy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1186
diff changeset
142 proxy_ = proxy;
88010d8e12cf Support of HTTP proxy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1186
diff changeset
143 }
88010d8e12cf Support of HTTP proxy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1186
diff changeset
144
1534
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
145 void SetHttpsVerifyPeers(bool verify)
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
146 {
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
147 verifyPeers_ = verify;
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
148 }
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
149
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
150 bool IsHttpsVerifyPeers() const
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
151 {
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
152 return verifyPeers_;
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
153 }
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
154
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
155 void SetHttpsCACertificates(const std::string& certificates)
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
156 {
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
157 caCertificates_ = certificates;
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
158 }
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
159
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
160 const std::string& GetHttpsCACertificates() const;
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
161
1533
0011cc99443c improving HTTPS support
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1404
diff changeset
162 static void GlobalInitialize(bool httpsVerifyPeers,
1534
95b3b0260240 Options to validate peers against CA certificates in HTTPS requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1533
diff changeset
163 const std::string& httpsCACertificates);
457
997282a61ff8 cleaner names
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 400
diff changeset
164
997282a61ff8 cleaner names
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 400
diff changeset
165 static void GlobalFinalize();
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 };
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 }