curl / Mailing Lists / curl-library / Single Mail

curl-library

Identifying secure transfers

From: Samuel Hurst <samuelh_at_rd.bbc.co.uk>
Date: Tue, 11 Apr 2017 13:49:56 +0100

Hi All,

Just a quick question, is there any nice way of discovering whether a
given libcurl transfer was done in a secure manner? I.e. one of the
curl_easy_getinfo() calls to tell me if TLS was used.

I could try parsing the URI for http:// or https://, and again parsing
any 300 series redirects for equivalent ones, but this is a lot of
string parsing and I'd like to avoid having to do it if there's a simple
way of discovering this from curl itself.

I've experimented with the CURLINFO_SSL_VERIFYRESULT but it seems to
give back a value of 0 for both cleartext and encrypted transfers,
likewise CURLINFO_TLS_SESSION/TLS_SSL_PTR.

Current version of libcurl I'm using is 7.52.1, although it's been
fairly consistent across versions I've tested.

Best Regards,
Sam

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html

Received on 2017-04-11