CURLINFO_PROXY_SSL_VERIFYRESULT.3 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .\" generated by cd2nroff 0.1 from CURLINFO_PROXY_SSL_VERIFYRESULT.md
  2. .TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verification
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_SSL_VERIFYRESULT,
  9. long *result);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a pointer to a long to receive the result of the certificate verification
  13. that was requested (using the \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP
  14. option. This is only used for HTTPS proxies.
  15. 0 is a positive result. Non\-zero is an error.
  16. .SH PROTOCOLS
  17. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  18. This option works only with the following TLS backends:
  19. GnuTLS and OpenSSL
  20. .SH EXAMPLE
  21. .nf
  22. int main(void)
  23. {
  24. CURL *curl = curl_easy_init();
  25. if(curl) {
  26. CURLcode res;
  27. long verifyresult;
  28. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  29. curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
  30. res = curl_easy_perform(curl);
  31. if(res) {
  32. printf("error: %s\\n", curl_easy_strerror(res));
  33. curl_easy_cleanup(curl);
  34. return 1;
  35. }
  36. res = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
  37. &verifyresult);
  38. if(!res) {
  39. printf("The peer verification said %s\\n",
  40. (verifyresult ? "bad" : "fine"));
  41. }
  42. curl_easy_cleanup(curl);
  43. }
  44. }
  45. .fi
  46. .SH AVAILABILITY
  47. Added in curl 7.52.0
  48. .SH RETURN VALUE
  49. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  50. .SH SEE ALSO
  51. .BR CURLINFO_SSL_VERIFYRESULT (3),
  52. .BR curl_easy_getinfo (3),
  53. .BR curl_easy_setopt (3)