Skip to content

Commit

Permalink
Add a -sigalgs option to bssl client.
Browse files Browse the repository at this point in the history
Change-Id: I6247e02c6a9a9cc6ff5005eafe96f89f864cb12c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/39846
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
  • Loading branch information
davidben authored and CQ bot account: commit-bot@chromium.org committed Feb 6, 2020
1 parent f0a815c commit bf17f4f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tool/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ static const struct argument kArguments[] = {
"-curves", kOptionalArgument,
"An OpenSSL-style ECDH curves list that configures the offered curves",
},
{
"-sigalgs", kOptionalArgument,
"An OpenSSL-style signature algorithms list that configures the "
"signature algorithm preferences",
},
{
"-max-version", kOptionalArgument,
"The maximum acceptable protocol version",
Expand Down Expand Up @@ -380,6 +385,12 @@ bool Client(const std::vector<std::string> &args) {
return false;
}

if (args_map.count("-sigalgs") != 0 &&
!SSL_CTX_set1_sigalgs_list(ctx.get(), args_map["-sigalgs"].c_str())) {
fprintf(stderr, "Failed setting signature algorithms list\n");
return false;
}

uint16_t max_version = TLS1_3_VERSION;
if (args_map.count("-max-version") != 0 &&
!VersionFromString(&max_version, args_map["-max-version"])) {
Expand Down

0 comments on commit bf17f4f

Please sign in to comment.