]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples/https.c: use CURLOPT_CA_CACHE_TIMEOUT
authorDaniel Stenberg <daniel@haxx.se>
Fri, 9 Jun 2023 17:37:31 +0000 (19:37 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 10 Jun 2023 22:17:41 +0000 (00:17 +0200)
for demonstration purposes

Closes #11290

docs/examples/https.c

index 26e72085b07cb1e608d54f4adc582c32e83d4328..2a34e37d83e5c3a35dc76a23eb7ae3048661155f 100644 (file)
@@ -63,6 +63,9 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
 #endif
 
+    /* cache the CA cert bundle in memory for a week */
+    curl_easy_setopt(curl, CURLOPT_CA_CACHE_TIMEOUT, 604800L);
+
     /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
     /* Check for errors */