cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How can I get SSL server certificate info from libcurl when a handshake fails?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 28 Dec 2013 23:04:09 +0100 (CET)

On Sun, 22 Dec 2013, Ray Satiro wrote:

> How can I get SSL server certificate info from libcurl when a handshake
> fails?

I believe it should work like this:

1. Allow the handshake by either providing the proper CA cert or by disabling
the CA check.

2. Use CURLINFO_CERTINFO - provided that your libcurl version supports it.

Alternatively, you can use the CTX callback if your libcurl is built with
OpenSSL, or if you use a spanking new libcurl you can explore
CURLINFO_TLS_SESSION.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-28