1CURLINFO_CAINFO(3)         curl_easy_getinfo options        CURLINFO_CAINFO(3)
2
3
4

NAME

6       CURLINFO_CAINFO - get the default built-in CA certificate path
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAINFO, char **path);
12

DESCRIPTION

14       Pass  a pointer to a char pointer to receive the pointer to a null-ter‐
15       minated string holding the default built-in  path  used  for  the  CUR‐
16       LOPT_CAINFO(3) option unless set by the user.
17
18       Note that in a situation where libcurl has been built to support multi‐
19       ple TLS libraries, this option might return a string even if  the  spe‐
20       cific  TLS  library  currently  set  to  be  used does not support CUR‐
21       LOPT_CAINFO(3).
22
23       This is a path identifying a single file containing CA certificates.
24
25       The path pointer will be NULL if there is no default path.
26

PROTOCOLS

28       All
29

EXAMPLE

31       CURL *curl = curl_easy_init();
32       if(curl) {
33         CURLcode res;
34         char *cainfo = NULL;
35         curl_easy_getinfo(curl, CURLINFO_CAINFO, &cainfo);
36         if(cainfo)
37             printf("default ca info path: %s\n", cainfo);
38         }
39         curl_easy_cleanup(curl);
40       }
41

AVAILABILITY

43       Added in 7.84.0
44

RETURN VALUE

46       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
47       if not.
48

SEE ALSO

50       CURLINFO_CAPATH(3), curl_easy_getinfo(3), curl_easy_setopt(3),
51
52
53
54libcurl 8.0.1                  January 02, 2023             CURLINFO_CAINFO(3)
Impressum