cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLINFO_CERTINFO only filled in if connection successful?

From: Rich Bramante <rich.bramante_at_gmail.com>
Date: Tue, 29 Oct 2013 18:00:14 -0400

Using libcurl 7.24.0 bundled on OSX 10.8.5

CURLOPT_SSL_VERIFYPEER 1
CURLOPT_SSL_VERIFYHOST 2
CURLOPT_CERTINFO 1

When a connection fails with CURLE_SSL_CACERT I attempt to get the
certificate information via CURLINFO_CERTINFO and then present those
details to the user. Unfortunately, curl_certinfo num_of_certs is
always 0 in this case. If I am able to connect either due to a valid
cert or disabling the verification checks I can then fetch this
information. I was able to reproduce this behavior with the certinfo.c
example.

Is this expected behavior?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-10-29