c++ - Handshake failed: certificate verify failed (Boost ASIO) -


hello i'm trying connect server:

    argv[1] = "demo.demo.com"; // or httpbin.com     argv[2] = "39473"; // or 80 

with similar code:

http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/example/ssl/client.cpp

the problem getting this:

handshake failed: certificate verify failed 

i have tried this:

boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23); ctx.set_verify_mode(boost::asio::ssl::verify_none); //ctx.set_default_verify_paths(); 

is there way connect without verifying certificate.

you add verification callback returns true:

socket_.set_verify_callback(     boost::bind(&client::verify_certificate, this, _1, _2)); 

where

  bool verify_certificate(bool preverified,       boost::asio::ssl::verify_context& ctx)   {       return true;   } 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -