1CURLINFO_SSL_VERIFYRESULT(3)curl_easy_getinfo optionCsURLINFO_SSL_VERIFYRESULT(3)
2
3
4
6 CURLINFO_SSL_VERIFYRESULT - get the result of the certificate verifica‐
7 tion
8
10 #include <curl/curl.h>
11
12 CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_VERIFYRESULT,
13 long *result);
14
16 Pass a pointer to a long to receive the result of the server SSL cer‐
17 tificate verification that was requested (using the CURLOPT_SSL_VERI‐
18 FYPEER(3) option.
19
20 0 is a positive result. Non-zero is an error.
21
23 All using TLS
24
26 CURL *curl = curl_easy_init();
27 if(curl) {
28 CURLcode res;
29 long verifyresult;
30 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
31 res = curl_easy_perform(curl);
32 curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &verifyresult);
33 printf("The peer verification said %s\n", verifyresult?
34 "BAAAD":"fine");
35 curl_easy_cleanup(curl);
36 }
37
39 Added in 7.5. Only set by the OpenSSL/libressl/boringssl and NSS back‐
40 ends.
41
43 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
44 if not.
45
47 curl_easy_getinfo(3), curl_easy_setopt(3),
48
49
50
51libcurl 7.69.1 March 21, 2018 CURLINFO_SSL_VERIFYRESULT(3)