diff options
Diffstat (limited to 'server/src/http_client.cppm')
| -rw-r--r-- | server/src/http_client.cppm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/http_client.cppm b/server/src/http_client.cppm index bea5384..13dd60a 100644 --- a/server/src/http_client.cppm +++ b/server/src/http_client.cppm | |||
| @@ -27,12 +27,12 @@ public: | |||
| 27 | { | 27 | { |
| 28 | sslc_.set_default_verify_paths(); | 28 | sslc_.set_default_verify_paths(); |
| 29 | sslc_.set_verify_mode( | 29 | sslc_.set_verify_mode( |
| 30 | net::ssl::verify_peer | net::ssl::verify_fail_if_no_peer_cert); | 30 | net::ssl::verify_peer | net::ssl::verify_fail_if_no_peer_cert); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | template <class ReqBody> | 33 | template <class ReqBody> |
| 34 | auto do_request(bhttp::request<ReqBody>& req) | 34 | auto do_request(bhttp::request<ReqBody>& req) |
| 35 | -> bhttp::response<bhttp::dynamic_body> | 35 | -> bhttp::response<bhttp::dynamic_body> |
| 36 | { | 36 | { |
| 37 | auto stream = ssl::stream<beast::tcp_stream>{ioc_, sslc_}; | 37 | auto stream = ssl::stream<beast::tcp_stream>{ioc_, sslc_}; |
| 38 | 38 | ||
| @@ -40,7 +40,7 @@ public: | |||
| 40 | if (!SSL_set_tlsext_host_name(stream.native_handle(), host.c_str())) | 40 | if (!SSL_set_tlsext_host_name(stream.native_handle(), host.c_str())) |
| 41 | { | 41 | { |
| 42 | throw beast::system_error( | 42 | throw beast::system_error( |
| 43 | static_cast<int>(::ERR_get_error()), net::error::get_ssl_category()); | 43 | static_cast<int>(::ERR_get_error()), net::error::get_ssl_category()); |
| 44 | } | 44 | } |
| 45 | stream.set_verify_callback(ssl::host_name_verification(host)); | 45 | stream.set_verify_callback(ssl::host_name_verification(host)); |
| 46 | auto const results = resolver_.resolve(host, "443"); | 46 | auto const results = resolver_.resolve(host, "443"); |