Boost logo

Boost Users :

Subject: Re: [Boost-users] newbie: asio ssl help
From: Roland Bock (rbock_at_[hidden])
Date: 2008-12-30 05:16:33


Ben,

I am on a similar track, only I started from the HTTP client example and
added HTTPS (just started, not finished, yet).

To my understanding, you should replace

ctx.set_verify_mode(ssl::context::verify_peer);
ctx.load_verify_file("ca.pem");

by

ctx.set_verify_mode(ssl::context::verify_none);

It might also make sense (it did for me), to replace

     boost::asio::ssl::context ctx(io_service,
boost::asio::ssl::context::sslv23);

by

     boost::asio::ssl::context ctx(io_service,
boost::asio::ssl::context::sslv23_client);

HTH

Regards,

Roland

Seiryuu Kami wrote:
> Hello,
>
> I'm a 21 year old dutch student currently working with the ASIO library.
> I have a basic knowledge of C++ and I know not much of SSL.
> That is the part of the ASIO lib I'm having trouble with.
> I'm looking for anyone who can help me.
>
> I have pretty much copy-pasted the boost example on SSL clients.
> (http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/example/ssl/client.cpp)
>
> My intention is to open a connection to a website that uses HTTPS,
> login.deviantart.com <http://login.deviantart.com> to be exact.
> I need to obtain a cookie from there.
>
> I have no PEM file to use a certificate, and I doubt I need one.
> But the thing is, I keep receiving: "Handshake failed: asio:1".
> I've tried everything I could think of to make it work. But I'm just a
> student.
> So, can anyone help me?
>
> Kind regards, Ben
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net