CURLOPT_PROXY_TLSAUTH_USERNAME.3 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_TLSAUTH_USERNAME.md
  2. .TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_TLSAUTH_USERNAME \- username to use for proxy TLS authentication
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_USERNAME,
  9. char *user);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a char pointer as parameter, which should point to the null\-terminated
  13. username to use for the HTTPS proxy TLS authentication method specified with
  14. the \fICURLOPT_PROXY_TLSAUTH_TYPE(3)\fP option. Requires that the
  15. \fICURLOPT_PROXY_TLSAUTH_PASSWORD(3)\fP option also be set.
  16. The application does not have to keep the string around after setting this
  17. option.
  18. .SH DEFAULT
  19. NULL
  20. .SH PROTOCOLS
  21. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  22. This option works only with the following TLS backends:
  23. GnuTLS and OpenSSL
  24. .SH EXAMPLE
  25. .nf
  26. int main(void)
  27. {
  28. CURL *curl = curl_easy_init();
  29. if(curl) {
  30. CURLcode res;
  31. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  32. curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
  33. curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
  34. curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
  35. curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
  36. res = curl_easy_perform(curl);
  37. curl_easy_cleanup(curl);
  38. }
  39. }
  40. .fi
  41. .SH AVAILABILITY
  42. Added in curl 7.52.0
  43. .SH RETURN VALUE
  44. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  45. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  46. .SH SEE ALSO
  47. .BR CURLOPT_PROXY_TLSAUTH_PASSWORD (3),
  48. .BR CURLOPT_PROXY_TLSAUTH_TYPE (3),
  49. .BR CURLOPT_TLSAUTH_PASSWORD (3),
  50. .BR CURLOPT_TLSAUTH_TYPE (3)