diff options
Diffstat (limited to 'https.h')
-rw-r--r-- | https.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,12 +1,21 @@ #pragma once +#include <boost/beast/version.hpp> + +// Support both boost in Debian unstable (BOOST_LATEST) and in stable (boost 1.67) +#if BOOST_VERSION >= 107100 +#define BOOST_LATEST +#endif + #include <memory> #include <string> #include <unordered_map> #include <boost/asio/dispatch.hpp> #include <boost/asio/strand.hpp> +#ifdef BOOST_LATEST #include <boost/beast/ssl.hpp> +#endif #include <boost/asio/ssl.hpp> #include "config.h" @@ -16,7 +25,11 @@ namespace ssl = boost::asio::ssl; // from <boost/asio/ssl.hpp> namespace HTTPS { +#ifdef BOOST_LATEST static const ssl::context_base::method tls_method {ssl::context::tlsv13}; +#else +static const ssl::context_base::method tls_method {ssl::context::tlsv12}; +#endif class Server: public ::Server { |