CURLOPT_ECH.3 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .\" generated by cd2nroff 0.1 from CURLOPT_ECH.md
  2. .TH CURLOPT_ECH 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_ECH \- configuration for Encrypted Client Hello
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ECH, char *config);
  9. .fi
  10. .SH DESCRIPTION
  11. ECH is only compatible with TLSv1.3.
  12. This experimental feature requires a special build of OpenSSL, as ECH is not
  13. yet supported in OpenSSL releases. In contrast ECH is supported by the latest
  14. BoringSSL and wolfSSL releases.
  15. There is also a known issue with using wolfSSL which does not support ECH when
  16. the HelloRetryRequest mechanism is used.
  17. Pass a string that specifies configuration details for ECH. In all cases, if
  18. ECH is attempted, it may fail for various reasons. The keywords supported are:
  19. .IP false
  20. Turns off ECH.
  21. .IP grease
  22. Instructs client to emit a GREASE ECH extension. (The connection fails if ECH
  23. is attempted but fails.)
  24. .IP true
  25. Instructs client to attempt ECH, if possible, but to not fail if attempting
  26. ECH is not possible.
  27. .IP hard
  28. Instructs client to attempt ECH and fail if attempting ECH is not possible.
  29. .IP ecl:\<base64-value\>
  30. If the string starts with \fIecl:\fP then the remainder of the string should be a
  31. base64\-encoded ECHConfigList that is used for ECH rather than attempting to
  32. download such a value from the DNS.
  33. .IP pn:\<name\>
  34. If the string starts with \fIpn:\fP then the remainder of the string should be a
  35. DNS/hostname that is used to over\-ride the public_name field of the
  36. ECHConfigList that is used for ECH.
  37. .SH DEFAULT
  38. NULL, meaning ECH is disabled.
  39. .SH PROTOCOLS
  40. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  41. This option works only with the following TLS backends:
  42. OpenSSL and wolfSSL
  43. .SH EXAMPLE
  44. .nf
  45. CURL *curl = curl_easy_init();
  46. const char *config ="ecl:AED+DQA87wAgACB/RuzUCsW3uBbSFI7mzD63TUXpI8sGDTnFTbFCDpa+CAAEAAEAAQANY292ZXIuZGVmby5pZQAA";
  47. if(curl) {
  48. curl_easy_setopt(curl, CURLOPT_ECH, config);
  49. curl_easy_perform(curl);
  50. }
  51. .fi
  52. .SH AVAILABILITY
  53. Added in curl 8.8.0
  54. .SH RETURN VALUE
  55. Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient
  56. heap space.
  57. .SH SEE ALSO
  58. .BR CURLOPT_DOH_URL (3)