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
This commit is contained in:
Jozef Kralik 2016-12-13 21:10:00 +01:00 committed by Kamil Dudka
parent b666907336
commit 6448f98c18
25 changed files with 781 additions and 227 deletions

View file

@ -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 */