summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Baentsch <57787676+baentsch@users.noreply.github.com>2020-08-29 14:09:24 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-08-30 17:24:04 +0200
commitede125b7b7ca8fc5a1fe3d7c1aee6bff2ea0bf24 (patch)
treeef1c1fd2071ecad350d6f89b6524d218b1dfe562 /src
parenta337355487c4c3305a4c0703282fdcbe008d4998 (diff)
downloadcurl-ede125b7b7ca8fc5a1fe3d7c1aee6bff2ea0bf24.tar.gz
tls: add CURLOPT_SSL_EC_CURVES and --curves
Closes #5892
Diffstat (limited to 'src')
-rw-r--r--src/tool_cfgable.h1
-rw-r--r--src/tool_getparam.c5
-rw-r--r--src/tool_help.c2
-rw-r--r--src/tool_operate.c3
4 files changed, 11 insertions, 0 deletions
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h
index 620bfef3e..a3b8dd51b 100644
--- a/src/tool_cfgable.h
+++ b/src/tool_cfgable.h
@@ -162,6 +162,7 @@ struct OperationConfig {
char *etag_compare_file;
bool crlf;
char *customrequest;
+ char *ssl_ec_curves;
char *krblevel;
char *request_target;
long httpversion;
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 74b6b7369..64c988122 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -272,6 +272,7 @@ static const struct LongShort aliases[]= {
{"EB", "socks5-gssapi", ARG_BOOL},
{"EC", "etag-save", ARG_FILENAME},
{"ED", "etag-compare", ARG_FILENAME},
+ {"EE", "curves", ARG_STRING},
{"f", "fail", ARG_BOOL},
{"fa", "fail-early", ARG_BOOL},
{"fb", "styled-output", ARG_BOOL},
@@ -1726,6 +1727,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
GetStr(&config->etag_compare_file, nextarg);
break;
+ case 'E':
+ GetStr(&config->ssl_ec_curves, nextarg);
+ break;
+
default: /* unknown flag */
return PARAM_OPTION_UNKNOWN;
}
diff --git a/src/tool_help.c b/src/tool_help.c
index 29680d05a..c8b2f52c9 100644
--- a/src/tool_help.c
+++ b/src/tool_help.c
@@ -94,6 +94,8 @@ static const struct helptxt helptext[] = {
"Convert LF to CRLF in upload"},
{" --crlfile <file>",
"Get a CRL list in PEM format from the given file"},
+ {" --curves <algorithm list>",
+ "(EC) TLS key exchange algorithm(s) to request "},
{"-d, --data <data>",
"HTTP POST data"},
{" --data-ascii <data>",
diff --git a/src/tool_operate.c b/src/tool_operate.c
index aaadeeb9d..1fe7637d2 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1520,6 +1520,9 @@ static CURLcode single_transfer(struct GlobalConfig *global,
if(config->pinnedpubkey)
my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, config->pinnedpubkey);
+ if(config->ssl_ec_curves)
+ my_setopt_str(curl, CURLOPT_SSL_EC_CURVES, config->ssl_ec_curves);
+
if(curlinfo->features & CURL_VERSION_SSL) {
/* Check if config->cert is a PKCS#11 URI and set the
* config->cert_type if necessary */