CURLOPT_PROXY_ISSUERCERT.3 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_ISSUERCERT.md
  2. .TH CURLOPT_PROXY_ISSUERCERT 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_ISSUERCERT \- proxy issuer SSL certificate filename
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_ISSUERCERT, char *file);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a char pointer to a null\-terminated string naming a \fIfile\fP holding a CA
  12. certificate in PEM format. If the option is set, an additional check against
  13. the peer certificate is performed to verify the issuer of the HTTPS proxy is
  14. indeed the one associated with the certificate provided by the option. This
  15. additional check is useful in multi\-level PKI where one needs to enforce that
  16. the peer certificate is from a specific branch of the tree.
  17. This option makes sense only when used in combination with the
  18. \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP option. Otherwise, the result of the
  19. check is not considered as failure.
  20. A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option,
  21. which is returned if the setup of the SSL/TLS session has failed due to a
  22. mismatch with the issuer of peer certificate
  23. (\fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP has to be set too for the check to
  24. fail).
  25. The application does not have to keep the string around after setting this
  26. option.
  27. .SH DEFAULT
  28. NULL
  29. .SH PROTOCOLS
  30. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  31. This option works only with the following TLS backends:
  32. GnuTLS and OpenSSL
  33. .SH EXAMPLE
  34. .nf
  35. int main(void)
  36. {
  37. CURL *curl = curl_easy_init();
  38. if(curl) {
  39. CURLcode res;
  40. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  41. /* using an HTTPS proxy */
  42. curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  43. curl_easy_setopt(curl, CURLOPT_PROXY_ISSUERCERT, "/etc/certs/cacert.pem");
  44. res = curl_easy_perform(curl);
  45. curl_easy_cleanup(curl);
  46. }
  47. }
  48. .fi
  49. .SH AVAILABILITY
  50. Added in curl 7.71.0
  51. .SH RETURN VALUE
  52. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  53. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  54. .SH SEE ALSO
  55. .BR CURLOPT_ISSUERCERT (3),
  56. .BR CURLOPT_PROXY_SSL_VERIFYHOST (3),
  57. .BR CURLOPT_PROXY_SSL_VERIFYPEER (3),
  58. .BR CURLOPT_SSL_VERIFYHOST (3),
  59. .BR CURLOPT_SSL_VERIFYPEER (3)