• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_SSL_EC_CURVES
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_SSL_CIPHER_LIST (3)
9  - CURLOPT_SSL_OPTIONS (3)
10  - CURLOPT_TLS13_CIPHERS (3)
11Protocol:
12  - TLS
13TLS-backend:
14  - OpenSSL
15  - wolfSSL
16Added-in: 7.73.0
17---
18
19# NAME
20
21CURLOPT_SSL_EC_CURVES - key exchange curves
22
23# SYNOPSIS
24
25~~~c
26#include <curl/curl.h>
27
28CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_EC_CURVES, char *list);
29~~~
30
31# DESCRIPTION
32
33Pass a string as parameter with a colon delimited list of Elliptic curve (EC)
34algorithms. This option defines the client's key exchange algorithms in the
35SSL handshake (if the SSL backend libcurl is built to use supports it).
36
37The application does not have to keep the string around after setting this
38option.
39
40Using this option multiple times makes the last set string override the
41previous 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
52int 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
69curl_easy_setopt(3) returns a CURLcode indicating success or error.
70
71CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
72libcurl-errors(3).
73