From 6448f98c1857de521fb2dd3f9d4e5659845b5474 Mon Sep 17 00:00:00 2001 From: Jozef Kralik Date: Tue, 13 Dec 2016 21:10:00 +0100 Subject: vtls: add options to specify range of enabled TLS versions This commit introduces the CURL_SSLVERSION_MAX_* constants as well as the --tls-max option of the curl tool. Closes https://github.com/curl/curl/pull/1166 --- src/tool_getparam.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/tool_getparam.c') diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 686b01d7e..85d75ae6e 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -184,6 +184,7 @@ static const struct LongShort aliases[]= { {"$S", "tftp-no-options", FALSE}, {"$U", "connect-to", TRUE}, {"$W", "abstract-unix-socket", TRUE}, + {"$X", "tls-max", TRUE}, {"0", "http1.0", FALSE}, {"01", "http1.1", FALSE}, {"02", "http2", FALSE}, @@ -1060,6 +1061,11 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ config->abstract_unix_socket = TRUE; GetStr(&config->unix_socket_path, nextarg); break; + case 'X': /* --tls-max */ + err = str2tls_max(&config->ssl_version_max, nextarg); + if(err) + return err; + break; } break; case '#': /* --progress-bar */ -- cgit v1.2.3