1CURLINFO_SSL_VERIFYRESULT(3)curl_easy_getinfo optionCsURLINFO_SSL_VERIFYRESULT(3)
2
3
4

NAME

6       CURLINFO_SSL_VERIFYRESULT - get the result of the certificate verifica‐
7       tion
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode  curl_easy_getinfo(CURL  *handle,   CURLINFO_SSL_VERIFYRESULT,
13       long *result);
14

DESCRIPTION

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

PROTOCOLS

23       All using TLS
24

EXAMPLE

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

AVAILABILITY

39       Added  in  7.5.  Only  set  by  the OpenSSL/libressl/boringssl, NSS and
40       GnuTLS backends.
41

RETURN VALUE

43       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
44       if not.
45

SEE ALSO

47       curl_easy_getinfo(3), curl_easy_setopt(3),
48
49
50
51libcurl 7.71.1                   May 02, 2020     CURLINFO_SSL_VERIFYRESULT(3)
Impressum