CURLINFO_CAPATH.3 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .\" generated by cd2nroff 0.1 from CURLINFO_CAPATH.md
  2. .TH CURLINFO_CAPATH 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLINFO_CAPATH \- get the default built\-in CA path string
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAPATH, char **path);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a pointer to a char pointer to receive the pointer to a null\-terminated
  12. string holding the default built\-in path used for the \fICURLOPT_CAPATH(3)\fP
  13. option unless set by the user.
  14. Note that in a situation where libcurl has been built to support multiple TLS
  15. libraries, this option might return a string even if the specific TLS library
  16. currently set to be used does not support \fICURLOPT_CAPATH(3)\fP.
  17. This is a path identifying a directory.
  18. The \fBpath\fP pointer is set to NULL if there is no default path.
  19. .SH PROTOCOLS
  20. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  21. This option works only with the following TLS backends:
  22. GnuTLS, OpenSSL, mbedTLS and wolfSSL
  23. .SH EXAMPLE
  24. .nf
  25. int main(void)
  26. {
  27. CURL *curl = curl_easy_init();
  28. if(curl) {
  29. char *capath = NULL;
  30. curl_easy_getinfo(curl, CURLINFO_CAPATH, &capath);
  31. if(capath) {
  32. printf("default ca path: %s\\n", capath);
  33. }
  34. curl_easy_cleanup(curl);
  35. }
  36. }
  37. .fi
  38. .SH AVAILABILITY
  39. Added in curl 7.84.0
  40. .SH RETURN VALUE
  41. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  42. .SH SEE ALSO
  43. .BR CURLINFO_CAINFO (3),
  44. .BR curl_easy_getinfo (3),
  45. .BR curl_easy_setopt (3)