summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2014-10-28 15:45:39 -0700
committerAdam Langley <agl@google.com>2014-10-29 20:48:23 +0000
commit5f51c2530347045644ef64e8d277d985609d73d6 (patch)
treefec9e483ed330e3614aaf53ec34a2748e57d54e2
parent8f1ef1d55477f6f5c359c866dacceec8eb2cd7ce (diff)
downloadsrc-5f51c2530347045644ef64e8d277d985609d73d6.tar.gz
Add -cipher option to bssl client.
Change-Id: I3da1af62de9a94317fa7f14fda00e230b32bf5d5 Reviewed-on: https://boringssl-review.googlesource.com/2081 Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r--tool/client.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/client.cc b/tool/client.cc
index d7d9e22..6cc93d6 100644
--- a/tool/client.cc
+++ b/tool/client.cc
@@ -47,6 +47,10 @@ static const struct argument kArguments[] = {
"The hostname and port of the server to connect to, e.g. foo.com:443",
},
{
+ "-cipher", false,
+ "An OpenSSL-style cipher suite string that configures the offered ciphers",
+ },
+ {
"", false, "",
},
};
@@ -265,6 +269,10 @@ bool Client(const std::vector<std::string> &args) {
SSL_CTX_set_keylog_bio(ctx, keylog_bio);
}
+ if (args_map.count("-cipher") != 0) {
+ SSL_CTX_set_cipher_list(ctx, args_map["-cipher"].c_str());
+ }
+
int sock = -1;
if (!Connect(&sock, args_map["-connect"])) {
return false;