Add switch to enable draft 22.

Change-Id: I60dc085fa02c152adb12a505b453fe8f84670d8b
Reviewed-on: https://boringssl-review.googlesource.com/23464
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
Steven Valdez 2017-11-27 15:40:16 -05:00 committed by CQ bot account: commit-bot@chromium.org
parent 56aaf164ac
commit 8c9ceadc58

View File

@ -70,6 +70,9 @@ static const struct argument kArguments[] = {
{ {
"-tls13-variant", kBooleanArgument, "Enable TLS 1.3 variants", "-tls13-variant", kBooleanArgument, "Enable TLS 1.3 variants",
}, },
{
"-tls13-draft22-variant", kBooleanArgument, "Enable TLS 1.3 Draft 22.",
},
{ {
"-www", kBooleanArgument, "-www", kBooleanArgument,
"The server will print connection information in response to a " "The server will print connection information in response to a "
@ -315,8 +318,10 @@ bool Server(const std::vector<std::string> &args) {
SSL_CTX_set_early_data_enabled(ctx.get(), 1); SSL_CTX_set_early_data_enabled(ctx.get(), 1);
} }
// Enabling any TLS 1.3 variant on the server enables all of them. // Draft 22 variants need to be explicitly enabled.
if (args_map.count("-tls13-variant") != 0) { if (args_map.count("-tls13-draft22-variant") != 0) {
SSL_CTX_set_tls13_variant(ctx.get(), tls13_draft22);
} else if (args_map.count("-tls13-variant") != 0) {
SSL_CTX_set_tls13_variant(ctx.get(), tls13_experiment); SSL_CTX_set_tls13_variant(ctx.get(), tls13_experiment);
} }