cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: read Self signed certs in curl with ssl

From: Oscar Koeroo <okoeroo_at_nikhef.nl>
Date: Mon, 06 May 2013 09:02:39 +0200

On 06-05-13 06:19, Indtiny s wrote:
> Hi,
>
> I have compiled libcurl with openssl for enabling https . Now I need to
> validate the Server certificates .
>
> When server sends a selfsiged certificate in Server hello , Client should
> detect and reject the certificate if the certificate is self signed
> certificate . Now How to read issuer name and subject filed of the
> certificate in the curl client ?

Did you toggle the CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST
options? If not, it should give you an error by default on this matter.

        Oscar

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2013-05-06