quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

CURLOPT_SSL_SESSIONID_CACHE.md (1518B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_SSL_SESSIONID_CACHE
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_DNS_CACHE_TIMEOUT (3)
      9   - CURLOPT_MAXAGE_CONN (3)
     10   - CURLOPT_MAXLIFETIME_CONN (3)
     11   - CURLOPT_SSLVERSION (3)
     12 Protocol:
     13   - TLS
     14 TLS-backend:
     15   - All
     16 Added-in: 7.16.0
     17 ---
     18 
     19 # NAME
     20 
     21 CURLOPT_SSL_SESSIONID_CACHE - use the SSL session-ID cache
     22 
     23 # SYNOPSIS
     24 
     25 ~~~c
     26 #include <curl/curl.h>
     27 
     28 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_SESSIONID_CACHE,
     29                          long enabled);
     30 ~~~
     31 
     32 # DESCRIPTION
     33 
     34 Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set
     35 this to 1 to enable it. By default all transfers are done using the cache
     36 enabled. While nothing ever should get hurt by attempting to reuse SSL
     37 session-IDs, there seem to be or have been broken SSL implementations in the
     38 wild that may require you to disable this in order for you to succeed.
     39 
     40 # DEFAULT
     41 
     42 1
     43 
     44 # %PROTOCOLS%
     45 
     46 # EXAMPLE
     47 
     48 ~~~c
     49 int main(void)
     50 {
     51   CURL *curl = curl_easy_init();
     52   if(curl) {
     53     CURLcode res;
     54     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     55     /* switch off session-id use */
     56     curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
     57     res = curl_easy_perform(curl);
     58     curl_easy_cleanup(curl);
     59   }
     60 }
     61 ~~~
     62 
     63 # %AVAILABILITY%
     64 
     65 # RETURN VALUE
     66 
     67 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     68 
     69 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     70 libcurl-errors(3).