quickjs-tart

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

CURLOPT_SSL_VERIFYSTATUS.md (1414B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_SSL_VERIFYSTATUS
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_CAINFO (3)
      9   - CURLOPT_SSL_VERIFYHOST (3)
     10   - CURLOPT_SSL_VERIFYPEER (3)
     11 Protocol:
     12   - TLS
     13 TLS-backend:
     14   - OpenSSL
     15   - GnuTLS
     16 Added-in: 7.41.0
     17 ---
     18 
     19 # NAME
     20 
     21 CURLOPT_SSL_VERIFYSTATUS - verify the certificate's status
     22 
     23 # SYNOPSIS
     24 
     25 ~~~c
     26 #include <curl/curl.h>
     27 
     28 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify);
     29 ~~~
     30 
     31 # DESCRIPTION
     32 
     33 Pass a long as parameter set to 1 to enable or 0 to disable.
     34 
     35 This option determines whether libcurl verifies the status of the server cert
     36 using the "Certificate Status Request" TLS extension (aka. OCSP stapling).
     37 
     38 Note that if this option is enabled but the server does not support the TLS
     39 extension, the verification fails.
     40 
     41 # DEFAULT
     42 
     43 0
     44 
     45 # %PROTOCOLS%
     46 
     47 # EXAMPLE
     48 
     49 ~~~c
     50 int main(void)
     51 {
     52   CURL *curl = curl_easy_init();
     53   if(curl) {
     54     CURLcode res;
     55     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     56     /* ask for OCSP stapling */
     57     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
     58     res = curl_easy_perform(curl);
     59     curl_easy_cleanup(curl);
     60   }
     61 }
     62 ~~~
     63 
     64 # %AVAILABILITY%
     65 
     66 # RETURN VALUE
     67 
     68 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     69 
     70 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     71 libcurl-errors(3).