mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:03:32 +03:00
- 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!
This commit is contained in:
parent
873e734c39
commit
4c9768565e
15 changed files with 542 additions and 41 deletions
12
lib/sslgen.c
12
lib/sslgen.c
|
|
@ -465,3 +465,15 @@ bool Curl_ssl_data_pending(const struct connectdata *conn,
|
|||
}
|
||||
#endif /* USE_SSL */
|
||||
|
||||
void Curl_ssl_free_certinfo(struct SessionHandle *data)
|
||||
{
|
||||
int i;
|
||||
struct curl_certinfo *ci = &data->info.certs;
|
||||
if(ci->num_of_certs) {
|
||||
/* free all individual lists used */
|
||||
for(i=0; i<ci->num_of_certs; i++)
|
||||
curl_slist_free_all(ci->certinfo[i]);
|
||||
free(ci->certinfo); /* free the actual array too */
|
||||
ci->num_of_certs = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue