From c7f8561472244ec360b97d2190408f8d54803a24 Mon Sep 17 00:00:00 2001 From: PolloLoco Date: Wed, 18 Sep 2019 15:10:15 +0200 Subject: [PATCH] Added ssl_context member function to SSLClient in order to allow access to the SSL_CTX struct, for example to load the windows cert store --- httplib.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/httplib.h b/httplib.h index 726c768..97481f5 100644 --- a/httplib.h +++ b/httplib.h @@ -706,6 +706,8 @@ public: long get_openssl_verify_result() const; + SSL_CTX* ssl_context() const noexcept; + private: virtual bool process_and_close_socket( socket_t sock, size_t request_count, @@ -3482,6 +3484,10 @@ inline long SSLClient::get_openssl_verify_result() const { return verify_result_; } +inline SSL_CTX* SSLClient::ssl_context() const noexcept { + return ctx_; +} + inline bool SSLClient::process_and_close_socket( socket_t sock, size_t request_count, std::function