quickjs-tart

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

CURLOPT_SSL_EC_CURVES.md (1524B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_SSL_EC_CURVES
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_SSL_CIPHER_LIST (3)
      9   - CURLOPT_SSL_OPTIONS (3)
     10   - CURLOPT_TLS13_CIPHERS (3)
     11 Protocol:
     12   - TLS
     13 TLS-backend:
     14   - OpenSSL
     15   - wolfSSL
     16 Added-in: 7.73.0
     17 ---
     18 
     19 # NAME
     20 
     21 CURLOPT_SSL_EC_CURVES - key exchange curves
     22 
     23 # SYNOPSIS
     24 
     25 ~~~c
     26 #include <curl/curl.h>
     27 
     28 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_EC_CURVES, char *list);
     29 ~~~
     30 
     31 # DESCRIPTION
     32 
     33 Pass a string as parameter with a colon delimited list of Elliptic curve (EC)
     34 algorithms. This option defines the client's key exchange algorithms in the
     35 SSL handshake (if the SSL backend libcurl is built to use supports it).
     36 
     37 The application does not have to keep the string around after setting this
     38 option.
     39 
     40 Using this option multiple times makes the last set string override the
     41 previous ones. Set it to NULL to restore back to internal default.
     42 
     43 # DEFAULT
     44 
     45 "", embedded in SSL backend
     46 
     47 # %PROTOCOLS%
     48 
     49 # EXAMPLE
     50 
     51 ~~~c
     52 int main(void)
     53 {
     54   CURL *curl = curl_easy_init();
     55   if(curl) {
     56     CURLcode res;
     57     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     58     curl_easy_setopt(curl, CURLOPT_SSL_EC_CURVES, "X25519:P-521");
     59     res = curl_easy_perform(curl);
     60     curl_easy_cleanup(curl);
     61   }
     62 }
     63 ~~~
     64 
     65 # %AVAILABILITY%
     66 
     67 # RETURN VALUE
     68 
     69 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     70 
     71 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     72 libcurl-errors(3).