aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenĂ© Meusel <[email protected]>2019-02-19 14:45:49 +0100
committerHannes Rantzsch <[email protected]>2019-04-16 10:47:42 +0200
commita87dbb8975ce0651b67adcd6ace5ece9d76b8661 (patch)
tree8d9949ade8e51db4c870e6a29633d01df9a04f45 /src
parent4eb350d8e9a284d9d051c6bab1358ed6d3d7e823 (diff)
add a dummy c'tor for asio::ssl::context
Diffstat (limited to 'src')
-rw-r--r--src/lib/asio/asio_stream.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/lib/asio/asio_stream.h b/src/lib/asio/asio_stream.h
index dc8c4561f..0235ba5ad 100644
--- a/src/lib/asio/asio_stream.h
+++ b/src/lib/asio/asio_stream.h
@@ -13,6 +13,14 @@
#include <thread>
#include <type_traits>
+namespace boost {
+namespace asio {
+namespace ssl {
+class context;
+}
+}
+}
+
namespace Botan {
/**
@@ -55,15 +63,32 @@ class Stream : public StreamBase<Channel>
public:
template <typename... Args>
- Stream(StreamLayer nextLayer, Args&& ... args)
+ Stream(StreamLayer&& nextLayer, Args&& ... args)
: StreamBase<Channel>(std::forward<Args>(args)...),
nextLayer_(std::forward<StreamLayer>(nextLayer)) {}
- Stream(Stream &&other) = default;
- Stream& operator=(Stream &&other) = default;
+ Stream(StreamLayer&& nextLayer, boost::asio::ssl::context&)
+ : StreamBase<Channel>(Botan::TLS::Session_Manager_Noop(), Botan::Credentials_Manager()),
+ nextLayer_(std::forward<StreamLayer>(nextLayer))
+ {
+ // Configuring a TLS stream via asio::ssl::context is not supported.
+ // The corresponding configuration objects for Botan are:
+ // * TLS::Session_Manager
+ // * Credentials_Manager
+ // * TLS::Policy
+ // * TLS::Server_Information
+ // It would be nice to have a masquarading wrapper that exposes an API
+ // compatible with asio::ssl::context for convenient drop-in replacement.
+ // For now, base your TLS configurations on the above mentioned classes.
+ throw Not_Implemented("cannot handle an asio::ssl::context");
+ }
+
+
+ Stream(Stream&& other) = default;
+ Stream& operator=(Stream&& other) = default;
- Stream(const Stream &other) = delete;
- Stream& operator=(const Stream &other) = delete;
+ Stream(const Stream& other) = delete;
+ Stream& operator=(const Stream& other) = delete;
//
// -- -- accessor methods