1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLINFO_CAPATH 5Section: 3 6Source: libcurl 7See-also: 8 - CURLINFO_CAINFO (3) 9 - curl_easy_getinfo (3) 10 - curl_easy_setopt (3) 11Protocol: 12 - TLS 13TLS-backend: 14 - OpenSSL 15 - GnuTLS 16 - mbedTLS 17 - wolfSSL 18--- 19 20# NAME 21 22CURLINFO_CAPATH - get the default built-in CA path string 23 24# SYNOPSIS 25 26~~~c 27#include <curl/curl.h> 28 29CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAPATH, char **path); 30~~~ 31 32# DESCRIPTION 33 34Pass a pointer to a char pointer to receive the pointer to a null-terminated 35string holding the default built-in path used for the CURLOPT_CAPATH(3) 36option unless set by the user. 37 38Note that in a situation where libcurl has been built to support multiple TLS 39libraries, this option might return a string even if the specific TLS library 40currently set to be used does not support CURLOPT_CAPATH(3). 41 42This is a path identifying a directory. 43 44The **path** pointer is set to NULL if there is no default path. 45 46# EXAMPLE 47 48~~~c 49int main(void) 50{ 51 CURL *curl = curl_easy_init(); 52 if(curl) { 53 char *capath = NULL; 54 curl_easy_getinfo(curl, CURLINFO_CAPATH, &capath); 55 if(capath) { 56 printf("default ca path: %s\n", capath); 57 } 58 curl_easy_cleanup(curl); 59 } 60} 61~~~ 62 63# AVAILABILITY 64 65Added in 7.84.0 66 67# RETURN VALUE 68 69Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 70