curlpp ssl callback function

130 views
Skip to first unread message

princeofporsche

unread,
Jul 15, 2011, 11:50:55 AM7/15/11
to curlpp
Hi All,

I am trying to write a curlpp ssl callback function on the client side
to do a custom verification of the server side certificate.
Here's a snippet.

m_sMyRequest.setOpt<cURLpp::Options::SslVerifyPeer>(true);
m_sMyRequest.setOpt<cURLpp::Options::SslVerifyHost>(2);
m_sMyRequest.setOpt<cURLpp::Options::SslCtxFunction>(sslctxfun);

What should the signature of the sslctxfun() callback function.

I came across sample C ssl callback function listed under libcurl
examples:
static CURLcode sslctxfun(CURL * curl, void * sslctx, void * parm);

But the same callback signature doesn't seem to work for curlpp. The
curlpp documentation lacks a proper C++ ssl example.

Any help is appreciated.

Thanks.

Aditya
Reply all
Reply to author
Forward
0 new messages