Add a -sigalgs option to bssl client.
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>
diff --git a/tool/client.cc b/tool/client.cc
index a95e04e..d175ba3 100644
--- a/tool/client.cc
+++ b/tool/client.cc
@@ -48,6 +48,11 @@
"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",
},
@@ -380,6 +385,12 @@
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"])) {