- 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user