diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-04-10 19:35:06 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-04-10 19:35:06 +0200 |
commit | 07f01d1ab5e68fc042356fd90fa07c199791b29c (patch) | |
tree | 89860e4e85ee49931b4193255de0a2032d94392e /https.h | |
parent | da2666726e48a3dc00f05589cdf4947f22deb3c3 (diff) |
Ported to Debian 10
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 { |