CURLOPT_SSL_SESSIONID_CACHE.3 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .\" generated by cd2nroff 0.1 from CURLOPT_SSL_SESSIONID_CACHE.md
  2. .TH CURLOPT_SSL_SESSIONID_CACHE 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_SSL_SESSIONID_CACHE \- use the SSL session\-ID cache
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_SESSIONID_CACHE,
  9. long enabled);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a long set to 0 to disable libcurl\(aqs use of SSL session\-ID caching. Set
  13. this to 1 to enable it. By default all transfers are done using the cache
  14. enabled. While nothing ever should get hurt by attempting to reuse SSL
  15. session\-IDs, there seem to be or have been broken SSL implementations in the
  16. wild that may require you to disable this in order for you to succeed.
  17. .SH DEFAULT
  18. 1
  19. .SH PROTOCOLS
  20. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  21. All TLS backends support this option.
  22. .SH EXAMPLE
  23. .nf
  24. int main(void)
  25. {
  26. CURL *curl = curl_easy_init();
  27. if(curl) {
  28. CURLcode res;
  29. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  30. /* switch off session-id use! */
  31. curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
  32. res = curl_easy_perform(curl);
  33. curl_easy_cleanup(curl);
  34. }
  35. }
  36. .fi
  37. .SH AVAILABILITY
  38. Added in curl 7.16.0
  39. .SH RETURN VALUE
  40. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  41. .SH SEE ALSO
  42. .BR CURLOPT_DNS_CACHE_TIMEOUT (3),
  43. .BR CURLOPT_MAXAGE_CONN (3),
  44. .BR CURLOPT_MAXLIFETIME_CONN (3),
  45. .BR CURLOPT_SSLVERSION (3)