summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-05-29 16:12:52 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-05-29 16:12:52 +0200
commit050c93c46f5bc880897152419200e60da56b46e0 (patch)
tree511d0b0030464cb8a666b312d578332f86ecc1b5 /lib/setopt.c
parent5005ade2ce57e0e71439aa6639eb70414db949b8 (diff)
downloadcurl-050c93c46f5bc880897152419200e60da56b46e0.tar.gz
setopt: add TLS 1.3 ciphersuites
Adds CURLOPT_TLS13_CIPHERS and CURLOPT_PROXY_TLS13_CIPHERS. curl: added --tls13-ciphers and --proxy-tls13-ciphers Fixes #2435 Reported-by: zzq1015 on github Closes #2607
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index c1f6bd97e..93a4dd2b5 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -142,6 +142,25 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
va_arg(param, char *));
break;
+ case CURLOPT_TLS13_CIPHERS:
+ if(Curl_ssl_tls13_ciphersuites()) {
+ /* set preferred list of TLS 1.3 cipher suites */
+ result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER13_LIST_ORIG],
+ va_arg(param, char *));
+ }
+ else
+ return CURLE_NOT_BUILT_IN;
+ break;
+ case CURLOPT_PROXY_TLS13_CIPHERS:
+ if(Curl_ssl_tls13_ciphersuites()) {
+ /* set preferred list of TLS 1.3 cipher suites for proxy */
+ result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER13_LIST_PROXY],
+ va_arg(param, char *));
+ }
+ else
+ return CURLE_NOT_BUILT_IN;
+ break;
+
case CURLOPT_RANDOM_FILE:
/*
* This is the path name to a file that contains random data to seed