diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-09-05 14:29:21 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-09-05 14:29:21 +0000 |
commit | 4c9768565ec3a9baf26ac8a547bca6e42cc64fa5 (patch) | |
tree | 9713affdba06e0ff43abe1f1bdb01bdc3b4cf5a7 /lib/getinfo.c | |
parent | 873e734c3971fd620c09bdc31c2e7e4cfc4a0a67 (diff) | |
download | curl-4c9768565ec3a9baf26ac8a547bca6e42cc64fa5.tar.gz |
- Introducing CURLOPT_CERTINFO and the corresponding CURLINFO_CERTINFO. By
enabling this feature with CURLOPT_CERTINFO for a request using SSL (HTTPS
or FTPS), libcurl will gather lots of server certificate info and that info
can then get extracted by a client after the request has completed with
curl_easy_getinfo()'s CURLINFO_CERTINFO option. Linus Nielsen Feltzing
helped me test and smoothen out this feature.
Unfortunately, this feature currently only works with libcurl built to use
OpenSSL.
This feature was sponsored by networking4all.com - thanks!
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r-- | lib/getinfo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c index 2b7b08aee..6f8ebb87e 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -217,6 +217,11 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) /* Return the ip address of the most recent (primary) connection */ *param_charp = data->info.ip; break; + case CURLINFO_CERTINFO: + /* Return the a pointer to the certinfo struct. Not really an slist + pointer but we can pretend it is here */ + *param_slistp = (struct curl_slist *)&data->info.certs; + break; default: return CURLE_BAD_FUNCTION_ARGUMENT; } |