1CURLINFO_CAPATH(3) curl_easy_getinfo options CURLINFO_CAPATH(3)
2
3
4
6 CURLINFO_CAPATH - get the default built-in CAPATH string
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAPATH, char **path);
12
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_CAPATH(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 CURLOPT_CA‐
21 PATH(3).
22
23 This is a path identifying a directory.
24
25 The path pointer will be NULL if there is no default path.
26
28 All
29
31 CURL *curl = curl_easy_init();
32 if(curl) {
33 CURLcode res;
34 char *capath = NULL;
35 curl_easy_getinfo(curl, CURLINFO_CAPATH, &capath);
36 if(capath)
37 printf("default ca path: %s\n", capath);
38 }
39 curl_easy_cleanup(curl);
40 }
41
43 Added in 7.84.0
44
46 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
47 if not.
48
50 CURLINFO_CAINFO(3), curl_easy_getinfo(3), curl_easy_setopt(3),
51
52
53
54libcurl 7.85.0 June 13, 2022 CURLINFO_CAPATH(3)