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
16---
17
18# NAME
19
20CURLOPT_SSL_EC_CURVES - key exchange curves
21
22# SYNOPSIS
23
24~~~c
25#include <curl/curl.h>
26
27CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_EC_CURVES, char *alg_list);
28~~~
29
30# DESCRIPTION
31
32Pass a string as parameter with a colon delimited list of (EC) algorithms. This
33option defines the client's key exchange algorithms in the SSL handshake (if
34the SSL backend libcurl is built to use supports it).
35
36# DEFAULT
37
38"", embedded in SSL backend
39
40# EXAMPLE
41
42~~~c
43int main(void)
44{
45  CURL *curl = curl_easy_init();
46  if(curl) {
47    CURLcode res;
48    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
49    curl_easy_setopt(curl, CURLOPT_SSL_EC_CURVES, "X25519:P-521");
50    res = curl_easy_perform(curl);
51    curl_easy_cleanup(curl);
52  }
53}
54~~~
55
56# AVAILABILITY
57
58Added in 7.73.0. Supported by the OpenSSL backend.
59
60# RETURN VALUE
61
62Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
63