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