From 736b2221132d1095ff734599968f9b1dec5e1906 Mon Sep 17 00:00:00 2001 From: Yannis Rivard-Mulrooney Date: Tue, 17 May 2022 15:02:11 -0400 Subject: [PATCH] Drop dependency to recent boost version --- .github/workflows/tests.yml | 2 +- src/connection.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e0c9d50..13094bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,7 @@ jobs: uses: actions/cache@v2 with: path: .cache - key: vcpkg-${{ matrix.key }} + key: vcpkg-${{ matrix.key }}-${{ hashFiles('**/vcpkg.json', '**/vcpkg-configuration.json') }} - name: Install apt dependencies if: matrix.os == 'ubuntu-20.04' run: | diff --git a/src/connection.cpp b/src/connection.cpp index 478183a..71ca63d 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -153,10 +153,11 @@ Connection::Connection(std::string host, std::uint16_t port, bool use_ssl, bool { if (use_ssl) { ssl::context ssl_context(ssl::context::tls); - ssl_context.set_options(ssl::context::no_tlsv1 | ssl::context::no_tlsv1_1); + ssl_context.set_options(ssl::context::default_workarounds | ssl::context::no_tlsv1 | ssl::context::no_tlsv1_1); if (verify_host) { + ssl_context.set_default_verify_paths(); ssl_context.set_verify_mode(ssl::verify_peer); - ssl_context.set_verify_callback(ssl::host_name_verification(m_host)); + ssl_context.set_verify_callback(ssl::rfc2818_verification(m_host)); } m_ssl_stream = std::make_unique(m_socket, ssl_context); }