Corrected ASIO_STANDALONE definition checks
This commit is contained in:
parent
84170850f3
commit
7c4f63cdad
3 changed files with 4 additions and 4 deletions
|
|
@ -27,12 +27,12 @@ namespace SimpleWeb {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace SimpleWeb {
|
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 io_context = asio::io_context;
|
||||||
using resolver_results = asio::ip::tcp::resolver::results_type;
|
using resolver_results = asio::ip::tcp::resolver::results_type;
|
||||||
using async_connect_endpoint = asio::ip::tcp::endpoint;
|
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<asio::any_io_executor>;
|
using strand = asio::strand<asio::any_io_executor>;
|
||||||
#else
|
#else
|
||||||
using strand = asio::strand<asio::executor>;
|
using strand = asio::strand<asio::executor>;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace SimpleWeb {
|
||||||
Client(const std::string &server_port_path, bool verify_certificate = true, const std::string &certification_file = std::string(),
|
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())
|
const std::string &private_key_file = std::string(), const std::string &verify_file = std::string())
|
||||||
: ClientBase<HTTPS>::ClientBase(server_port_path, 443),
|
: ClientBase<HTTPS>::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) {
|
context(asio::ssl::context::tls_client) {
|
||||||
// Disabling TLS 1.0 and 1.1 (see RFC 8996)
|
// Disabling TLS 1.0 and 1.1 (see RFC 8996)
|
||||||
context.set_options(asio::ssl::context::no_tlsv1);
|
context.set_options(asio::ssl::context::no_tlsv1);
|
||||||
|
|
|
||||||
|
|
@ -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())
|
Server(const std::string &certification_file, const std::string &private_key_file, const std::string &verify_file = std::string())
|
||||||
: ServerBase<HTTPS>::ServerBase(443),
|
: ServerBase<HTTPS>::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) {
|
context(asio::ssl::context::tls_server) {
|
||||||
// Disabling TLS 1.0 and 1.1 (see RFC 8996)
|
// Disabling TLS 1.0 and 1.1 (see RFC 8996)
|
||||||
context.set_options(asio::ssl::context::no_tlsv1);
|
context.set_options(asio::ssl::context::no_tlsv1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue