summaryrefslogtreecommitdiffhomepage
path: root/https.h
diff options
context:
space:
mode:
Diffstat (limited to 'https.h')
-rw-r--r--https.h15
1 files changed, 12 insertions, 3 deletions
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 <memory>
+#include <string>
+#include <unordered_map>
+
#include <boost/asio/dispatch.hpp>
#include <boost/asio/strand.hpp>
#include <boost/beast/ssl.hpp>
@@ -12,12 +16,17 @@ namespace ssl = boost::asio::ssl; // from <boost/asio/ssl.hpp>
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<std::string, std::shared_ptr<ssl::context>> 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: