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 18Added-in: 7.84.0 19--- 20 21# NAME 22 23CURLINFO_CAPATH - get the default built-in CA path string 24 25# SYNOPSIS 26 27~~~c 28#include <curl/curl.h> 29 30CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAPATH, char **path); 31~~~ 32 33# DESCRIPTION 34 35Pass a pointer to a char pointer to receive the pointer to a null-terminated 36string holding the default built-in path used for the CURLOPT_CAPATH(3) 37option unless set by the user. 38 39Note that in a situation where libcurl has been built to support multiple TLS 40libraries, this option might return a string even if the specific TLS library 41currently set to be used does not support CURLOPT_CAPATH(3). 42 43This is a path identifying a directory. 44 45The **path** pointer is set to NULL if there is no default path. 46 47# %PROTOCOLS% 48 49# EXAMPLE 50 51~~~c 52int main(void) 53{ 54 CURL *curl = curl_easy_init(); 55 if(curl) { 56 char *capath = NULL; 57 curl_easy_getinfo(curl, CURLINFO_CAPATH, &capath); 58 if(capath) { 59 printf("default ca path: %s\n", capath); 60 } 61 curl_easy_cleanup(curl); 62 } 63} 64~~~ 65 66# %AVAILABILITY% 67 68# RETURN VALUE 69 70Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 71