Boost logo

Boost Users :

Subject: [Boost-users] [asio] sslv3 handshake
From: Jim Gallogly (gallogly_at_[hidden])
Date: 2017-03-30 12:19:07


I want to do a simple C++ web get similar to what is done by this curl
command. I must use boost 1.49

> curl https://mysite.dev/api/v1/search?q=test -k --cert
> C:\work\testCert.pem

The server is requiring the client certificate.

I started by using this as an example
http://www.boost.org/doc/libs/1_49_0/doc/html/boost_asio/example/ssl/client.cpp

and I added modifications by adding calls to the context like

    ctx.set_options(boost::asio::ssl::context::default_workarounds);
    ctx.use_certificate_file("C:\\work\\testCert.pem",
boost::asio::ssl::context_base::pem);

My Request Looks like this:

> GET /api/v1/search?q=test HTTP/1.0<br>
> Host: mysite.dev <br>
> Accept: \*/*

but I keep getting messages like this

> Error: sslv3 alert handshake failure

Does any one know what other steps I need to do? Is this possible in boost
1.49?

Thanks,
Jim



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