From 7c4f63cdad1ae0cc514538e83ffa0b677b69d6a7 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 25 Apr 2023 09:35:39 +0200 Subject: [PATCH] Corrected ASIO_STANDALONE definition checks --- asio_compatibility.hpp | 4 ++-- client_https.hpp | 2 +- server_https.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asio_compatibility.hpp b/asio_compatibility.hpp index dc08653..aa43451 100644 --- a/asio_compatibility.hpp +++ b/asio_compatibility.hpp @@ -27,12 +27,12 @@ namespace SimpleWeb { #endif namespace SimpleWeb { -#if(ASIO_STANDALONE && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300 +#if(defined(ASIO_STANDALONE) && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300 using io_context = asio::io_context; using resolver_results = asio::ip::tcp::resolver::results_type; using async_connect_endpoint = asio::ip::tcp::endpoint; -#if(ASIO_STANDALONE && ASIO_VERSION >= 101800) || BOOST_ASIO_VERSION >= 101800 +#if(defined(ASIO_STANDALONE) && ASIO_VERSION >= 101800) || BOOST_ASIO_VERSION >= 101800 using strand = asio::strand; #else using strand = asio::strand; diff --git a/client_https.hpp b/client_https.hpp index 9458723..86c042c 100644 --- a/client_https.hpp +++ b/client_https.hpp @@ -27,7 +27,7 @@ namespace SimpleWeb { Client(const std::string &server_port_path, bool verify_certificate = true, const std::string &certification_file = std::string(), const std::string &private_key_file = std::string(), const std::string &verify_file = std::string()) : ClientBase::ClientBase(server_port_path, 443), -#if(ASIO_STANDALONE && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300 +#if(defined(ASIO_STANDALONE) && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300 context(asio::ssl::context::tls_client) { // Disabling TLS 1.0 and 1.1 (see RFC 8996) context.set_options(asio::ssl::context::no_tlsv1); diff --git a/server_https.hpp b/server_https.hpp index 67b8491..9b77fdc 100644 --- a/server_https.hpp +++ b/server_https.hpp @@ -29,7 +29,7 @@ namespace SimpleWeb { */ Server(const std::string &certification_file, const std::string &private_key_file, const std::string &verify_file = std::string()) : ServerBase::ServerBase(443), -#if(ASIO_STANDALONE && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300 +#if(defined(ASIO_STANDALONE) && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300 context(asio::ssl::context::tls_server) { // Disabling TLS 1.0 and 1.1 (see RFC 8996) context.set_options(asio::ssl::context::no_tlsv1);