Enable TLS 1.3 by default in bssl tool.
Change-Id: I4b586dce37f4db0770e516888c2eeeae3ecffd97 Reviewed-on: https://boringssl-review.googlesource.com/13784 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:
parent
7d7554b6b3
commit
040bc4944b
@ -282,17 +282,17 @@ bool Client(const std::vector<std::string> &args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (args_map.count("-max-version") != 0) {
|
||||
uint16_t version;
|
||||
if (!VersionFromString(&version, args_map["-max-version"])) {
|
||||
uint16_t max_version = TLS1_3_VERSION;
|
||||
if (args_map.count("-max-version") != 0 &&
|
||||
!VersionFromString(&max_version, args_map["-max-version"])) {
|
||||
fprintf(stderr, "Unknown protocol version: '%s'\n",
|
||||
args_map["-max-version"].c_str());
|
||||
return false;
|
||||
}
|
||||
if (!SSL_CTX_set_max_proto_version(ctx.get(), version)) {
|
||||
|
||||
if (!SSL_CTX_set_max_proto_version(ctx.get(), max_version)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (args_map.count("-min-version") != 0) {
|
||||
uint16_t version;
|
||||
|
@ -193,17 +193,17 @@ bool Server(const std::vector<std::string> &args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (args_map.count("-max-version") != 0) {
|
||||
uint16_t version;
|
||||
if (!VersionFromString(&version, args_map["-max-version"])) {
|
||||
uint16_t max_version = TLS1_3_VERSION;
|
||||
if (args_map.count("-max-version") != 0 &&
|
||||
!VersionFromString(&max_version, args_map["-max-version"])) {
|
||||
fprintf(stderr, "Unknown protocol version: '%s'\n",
|
||||
args_map["-max-version"].c_str());
|
||||
return false;
|
||||
}
|
||||
if (!SSL_CTX_set_max_proto_version(ctx.get(), version)) {
|
||||
|
||||
if (!SSL_CTX_set_max_proto_version(ctx.get(), max_version)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (args_map.count("-min-version") != 0) {
|
||||
uint16_t version;
|
||||
|
Loading…
Reference in New Issue
Block a user