quickjs-tart

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

CURLINFO_CAPATH.md (1517B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLINFO_CAPATH
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLINFO_CAINFO (3)
      9   - curl_easy_getinfo (3)
     10   - curl_easy_setopt (3)
     11 Protocol:
     12   - TLS
     13 TLS-backend:
     14   - OpenSSL
     15   - GnuTLS
     16   - mbedTLS
     17   - wolfSSL
     18 Added-in: 7.84.0
     19 ---
     20 
     21 # NAME
     22 
     23 CURLINFO_CAPATH - get the default built-in CA path string
     24 
     25 # SYNOPSIS
     26 
     27 ~~~c
     28 #include <curl/curl.h>
     29 
     30 CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAPATH, char **path);
     31 ~~~
     32 
     33 # DESCRIPTION
     34 
     35 Pass a pointer to a char pointer to receive the pointer to a null-terminated
     36 string holding the default built-in path used for the CURLOPT_CAPATH(3)
     37 option unless set by the user.
     38 
     39 Note that in a situation where libcurl has been built to support multiple TLS
     40 libraries, this option might return a string even if the specific TLS library
     41 currently set to be used does not support CURLOPT_CAPATH(3).
     42 
     43 This is a path identifying a directory.
     44 
     45 The **path** pointer is set to NULL if there is no default path.
     46 
     47 # %PROTOCOLS%
     48 
     49 # EXAMPLE
     50 
     51 ~~~c
     52 int main(void)
     53 {
     54   CURL *curl = curl_easy_init();
     55   if(curl) {
     56     char *capath = NULL;
     57     curl_easy_getinfo(curl, CURLINFO_CAPATH, &capath);
     58     if(capath) {
     59       printf("default ca path: %s\n", capath);
     60     }
     61     curl_easy_cleanup(curl);
     62   }
     63 }
     64 ~~~
     65 
     66 # %AVAILABILITY%
     67 
     68 # RETURN VALUE
     69 
     70 curl_easy_getinfo(3) returns a CURLcode indicating success or error.
     71 
     72 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     73 libcurl-errors(3).