From e234229ae80da0fa9967b797f7b5f4f381cba4b4 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 5 Apr 2020 14:22:31 +0200 Subject: All certificates configurable per site --- https.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'https.h') diff --git a/https.h b/https.h index 13a67a7..e009b78 100644 --- a/https.h +++ b/https.h @@ -1,5 +1,9 @@ #pragma once +#include +#include +#include + #include #include #include @@ -12,12 +16,17 @@ namespace ssl = boost::asio::ssl; // from namespace HTTPS { +static const ssl::context_base::method tls_method {ssl::context::tlsv13}; + class Server: public ::Server { - // The SSL context is required, and holds certificates public: - ssl::context m_ctx{ssl::context::tlsv13}; - ssl::context m_ctx2{ssl::context::tlsv13}; + typedef std::unordered_map> ctx_type; + +private: + ctx_type m_ctx; + ssl::context m_ctx_dummy{tls_method}; // Initial use, will be replaced by host specific context (with specific certificate) + const Socket& m_socket; public: -- cgit v1.2.3