1CURLOPT_SSL_SESSIONID_CACHE(3) libcurl CURLOPT_SSL_SESSIONID_CACHE(3)
2
3
4
6 CURLOPT_SSL_SESSIONID_CACHE - use the SSL session-ID cache
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_SESSIONID_CACHE,
12 long enabled);
13
15 Pass a long set to 0 to disable libcurl's use of SSL session-ID
16 caching. Set this to 1 to enable it. By default all transfers are done
17 using the cache enabled. While nothing ever should get hurt by attempt‐
18 ing to reuse SSL session-IDs, there seem to be or have been broken SSL
19 implementations in the wild that may require you to disable this in or‐
20 der for you to succeed.
21
23 1
24
26 All TLS-based
27
29 CURL *curl = curl_easy_init();
30 if(curl) {
31 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
32 /* switch off session-id use! */
33 curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
34 ret = curl_easy_perform(curl);
35 curl_easy_cleanup(curl);
36 }
37
39 Added in 7.16.0
40
42 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
43 if not.
44
46 CURLOPT_DNS_CACHE_TIMEOUT(3), CURLOPT_SSLVERSION(3),
47
48
49
50ibcurl 8.2.1 April 26, 2023 CURLOPT_SSL_SESSIONID_CACHE(3)