On Sat, Mar 26, 2011 at 10:09 AM, Dean Michael Berris
<mik...@gm...> wrote:
> On Fri, Mar 25, 2011 at 11:34 PM, Benjamin Weibel <we...@tr...> wrote:
>>
>> I've already had a look at the source code and saw that the method
>> "https_sync_connection" takes a string-argument "certificate_filename",
>> but I saw no way to pass such a filename at the high-level-api.
>> Is this parameter solely used to load system-default CA-certificates?
>> If not, could you please explain to me how I can load a certificate from
>> file or memory?
>>
>
> Oops, that filename should actually be a list of filenames; also there
> should be a way in the server's constructor to pass the parameter
> properly into the connection objects. That has still yet to be done,
> but can actually be patched easily.
>
And because I thought it was worth the effort, I made changes in the
0.9-devel branch that makes this possible. Documentation about using
the new constructor parameters (_openssl_certificate and
_openssl_verify_path) pending, but the idea is simple:
using namespace boost::network::http;
client c(_openssl_certificate="/tmp/my-cert");
client::request req("https://some.server.com/");
client::response res = c.get(req);
I've just pushed this to 0.9-devel so you should be able to start
using this in your application.
HTH!
--
Dean Michael Berris
http://about.me/deanberris
|