1---
2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_TLS13_CIPHERS
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_PROXY_SSLVERSION (3)
9  - CURLOPT_PROXY_SSL_CIPHER_LIST (3)
10  - CURLOPT_PROXY_TLS13_CIPHERS (3)
11  - CURLOPT_SSLVERSION (3)
12  - CURLOPT_SSL_CIPHER_LIST (3)
13  - CURLOPT_USE_SSL (3)
14---
15
16# NAME
17
18CURLOPT_TLS13_CIPHERS - ciphers suites to use for TLS 1.3
19
20# SYNOPSIS
21
22~~~c
23#include <curl/curl.h>
24
25CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLS13_CIPHERS, char *list);
26~~~
27
28# DESCRIPTION
29
30Pass a char pointer, pointing to a null-terminated string holding the list of
31cipher suites to use for the TLS 1.3 connection. The list must be
32syntactically correct, it consists of one or more cipher suite strings
33separated by colons.
34
35Find more details about cipher lists on this URL:
36
37 https://curl.se/docs/ssl-ciphers.html
38
39This option is currently used only when curl is built to use OpenSSL 1.1.1 or
40later, or Schannel. If you are using a different SSL backend you can try
41setting TLS 1.3 cipher suites by using the CURLOPT_SSL_CIPHER_LIST(3)
42option.
43
44The application does not have to keep the string around after setting this
45option.
46
47# DEFAULT
48
49NULL, use internal default
50
51# PROTOCOLS
52
53All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
54
55# EXAMPLE
56
57~~~c
58int main(void)
59{
60  CURL *curl = curl_easy_init();
61  if(curl) {
62    CURLcode res;
63    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
64    curl_easy_setopt(curl, CURLOPT_TLS13_CIPHERS,
65                     "TLS_CHACHA20_POLY1305_SHA256");
66    res = curl_easy_perform(curl);
67    curl_easy_cleanup(curl);
68  }
69}
70~~~
71
72# AVAILABILITY
73
74Added in 7.61.0 for OpenSSL. Available when built with OpenSSL >= 1.1.1.
75
76Added in 7.85.0 for Schannel.
77
78# RETURN VALUE
79
80Returns CURLE_OK if supported, CURLE_NOT_BUILT_IN otherwise.
81