Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

C2039 'tlsv12': is not a member of 'boost::asio::ssl::context' server_https.hpp #222

Open
imvishnu83 opened this issue Apr 24, 2018 · 8 comments

Comments

@imvishnu83
Copy link

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::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

  1. function "boost::asio::ssl::context::context(const boost::asio::ssl::context &)" (declared implicitly) cannot be referenced -- it is a deleted function server_https.hpp

  2. class "boost::asio::ssl::context" has no member "tlsv12" server_https.hpp

  3. 'tlsv12': is not a member of 'boost::asio::ssl::context' server_https.hpp

  4. 'tlsv12': undeclared identifier server_https.hpp

@eidheim
Copy link
Owner

eidheim commented Apr 24, 2018

What OS are you on, and what OpenSSL/Boost version are you using?

@imvishnu83
Copy link
Author

Hi

I am using openssl-1.0.1u-vs2008 and boost_1_53_0, in Windows 10

@eidheim
Copy link
Owner

eidheim commented Apr 24, 2018

I would try to upgrade both openssl and boost first, if you have that possibility?

@imvishnu83
Copy link
Author

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

@eidheim
Copy link
Owner

eidheim commented Apr 24, 2018

I guess the latest openssl and boost versions, as long as they compile on Windows, should be ok. Let me know how it goes:)

@imvishnu83
Copy link
Author

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

@eidheim
Copy link
Owner

eidheim commented Apr 24, 2018

Since I do not use Windows, I cannot help with compiling openssl/boost on Windows sorry.

@Hale-Lee
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants