curl / Mailing Lists / curl-library / Single Mail


Order of certificates in curl_certinfo

From: Martin Galvan via curl-library <>
Date: Thu, 25 Oct 2018 16:20:49 -0300

Hi all,

When using the CURLINFO_CERTINFO, the documentation says that a struct
curl_certinfo gets populated with the peer's certificate chain, and
the certs are accessible through the 'certinfo' member, which is an
array. I'm wondering whether this array is "ordered", in that
certinfo[num_of_certs -1] would return the top cert in the chain (be
it the root cert or the last intermediate). If not, what would be a
good way to detect which cert is the top, other than sorting them by

Received on 2018-10-25