Change-Id: Ie515386b7f3555a5acf42e37b49e9a831571cb4a Signed-off-by: Piotr Sikora <piotrsikora@google.com> Reviewed-on: https://boringssl-review.googlesource.com/15065 Reviewed-by: Adam Langley <agl@google.com> 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>kris/onging/CECPQ3_patch15
@@ -43,6 +43,10 @@ static const struct argument kArguments[] = { | |||||
"An OpenSSL-style cipher suite string that configures the offered " | "An OpenSSL-style cipher suite string that configures the offered " | ||||
"ciphers", | "ciphers", | ||||
}, | }, | ||||
{ | |||||
"-curves", kOptionalArgument, | |||||
"An OpenSSL-style ECDH curves list that configures the offered curves", | |||||
}, | |||||
{ | { | ||||
"-max-version", kOptionalArgument, | "-max-version", kOptionalArgument, | ||||
"The maximum acceptable protocol version", | "The maximum acceptable protocol version", | ||||
@@ -296,6 +300,12 @@ bool Client(const std::vector<std::string> &args) { | |||||
return false; | return false; | ||||
} | } | ||||
if (args_map.count("-curves") != 0 && | |||||
!SSL_CTX_set1_curves_list(ctx.get(), args_map["-curves"].c_str())) { | |||||
fprintf(stderr, "Failed setting curves list\n"); | |||||
return false; | |||||
} | |||||
uint16_t max_version = TLS1_3_VERSION; | uint16_t max_version = TLS1_3_VERSION; | ||||
if (args_map.count("-max-version") != 0 && | if (args_map.count("-max-version") != 0 && | ||||
!VersionFromString(&max_version, args_map["-max-version"])) { | !VersionFromString(&max_version, args_map["-max-version"])) { | ||||
@@ -34,6 +34,10 @@ static const struct argument kArguments[] = { | |||||
"An OpenSSL-style cipher suite string that configures the offered " | "An OpenSSL-style cipher suite string that configures the offered " | ||||
"ciphers", | "ciphers", | ||||
}, | }, | ||||
{ | |||||
"-curves", kOptionalArgument, | |||||
"An OpenSSL-style ECDH curves list that configures the offered curves", | |||||
}, | |||||
{ | { | ||||
"-max-version", kOptionalArgument, | "-max-version", kOptionalArgument, | ||||
"The maximum acceptable protocol version", | "The maximum acceptable protocol version", | ||||
@@ -190,6 +194,12 @@ bool Server(const std::vector<std::string> &args) { | |||||
return false; | return false; | ||||
} | } | ||||
if (args_map.count("-curves") != 0 && | |||||
!SSL_CTX_set1_curves_list(ctx.get(), args_map["-curves"].c_str())) { | |||||
fprintf(stderr, "Failed setting curves list\n"); | |||||
return false; | |||||
} | |||||
uint16_t max_version = TLS1_3_VERSION; | uint16_t max_version = TLS1_3_VERSION; | ||||
if (args_map.count("-max-version") != 0 && | if (args_map.count("-max-version") != 0 && | ||||
!VersionFromString(&max_version, args_map["-max-version"])) { | !VersionFromString(&max_version, args_map["-max-version"])) { | ||||