C2039 'tlsv12': is not a member of 'boost::asio::ssl::context' server_https.hpp
We get an error in
Server(const std::string& cert_file, const std::string& private_key_file, const std::string& verify_file=std::string()): ServerBase<HTTPS>::ServerBase(443), context(boost::asio::ssl::context::tlsv12) { context.use_certificate_chain_file(cert_file); context.use_private_key_file(private_key_file, boost::asio::ssl::context::pem);
if(verify_file.size()>0) {
context.load_verify_file(verify_file);
context.set_verify_mode(boost::asio::ssl::verify_peer | boost::asio::ssl::verify_fail_if_no_peer_cert |
boost::asio::ssl::verify_client_once);
set_session_id_context=true;
}
}
we get four error
-
function "boost::asio::ssl::context::context(const boost::asio::ssl::context &)" (declared implicitly) cannot be referenced -- it is a deleted function server_https.hpp
-
class "boost::asio::ssl::context" has no member "tlsv12" server_https.hpp
-
'tlsv12': is not a member of 'boost::asio::ssl::context' server_https.hpp
-
'tlsv12': undeclared identifier server_https.hpp
What OS are you on, and what OpenSSL/Boost version are you using?
Hi
I am using openssl-1.0.1u-vs2008 and boost_1_53_0, in Windows 10
I would try to upgrade both openssl and boost first, if you have that possibility?
i will try many possiblity, please tell us which version perfectly working for both , so that we can download those version, we had try latest version OpenSSL 1.1.1 pre5, Boost 1.67 also
I guess the latest openssl and boost versions, as long as they compile on Windows, should be ok. Let me know how it goes:)
its gives errors: Severity Code Description Project File Line Suppression State Error C2825 'Str': must be a class or namespace when followed by '::' c:\boost\property_tree\detail\xml_parser_writer_settings.hpp Project File Line Suppression State Error C2825 'Str': must be a class or namespace when followed by '::' c:\boost\property_tree\detail\xml_parser_writer_settings.hpp
around 13 error in xml_parser_writer_settings.hpp
Since I do not use Windows, I cannot help with compiling openssl/boost on Windows sorry.
what kind's of openssl version you need, I compiled with same error . My OS is centos 7.0, openssl version is OpenSSL 1.0.2o 27 Mar 2018