Fixed deprecated calls
This commit is contained in:
parent
4abe349158
commit
26215025c8
5 changed files with 16 additions and 6 deletions
|
|
@ -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<HTTPS>::ClientBase(server_port_path, 443),
|
||||
#if(defined(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);
|
||||
|
|
@ -41,7 +41,11 @@ namespace SimpleWeb {
|
|||
}
|
||||
|
||||
if(verify_certificate)
|
||||
#if (defined(ASIO_STANDALONE) && ASIO_VERSION >= 103300) || BOOST_ASIO_VERSION >= 103300
|
||||
context.set_verify_callback(asio::ssl::host_name_verification(host));
|
||||
#else
|
||||
context.set_verify_callback(asio::ssl::rfc2818_verification(host));
|
||||
#endif
|
||||
|
||||
if(verify_file.size() > 0)
|
||||
context.load_verify_file(verify_file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue