cURL / Mailing Lists / curl-library / Single Mail

curl-library

How to use hardcoded SSL certificates

From: Michael Georgoulopoulos <mgeorgoulopoulos_at_gmail.com>
Date: Sun, 15 Mar 2009 09:54:47 -0600

Hello and thank you for the nice and easy library!

I would like to use libcurl in va shareware program, which unlocks to
the full version by asking my web serer if the registered user has paid
for it. In order to do this somehow securely, I decided to use https
instead of http, and test against my server's certificate. The only way
I have found to supply libcurl with such a certificate is by setting
CURLOPT_SSLCERT with curl_easy_setopt() , but I would really like to
provide the full certificate in a buffer, instead of the certificate's
filename, for two reasons:

1 - It would be very easy for a user to substitute the certificate file
with another.
2 - I don't want libcurl performing any local filesystem I/O.

Can anyone tell me if there is a way to do this with libcurl?

Thanks in advance

Michael Georgoulopoulos
Received on 2009-03-15