Add -cipher option to bssl client.
Change-Id: I3da1af62de9a94317fa7f14fda00e230b32bf5d5 Reviewed-on: https://boringssl-review.googlesource.com/2081 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
8f1ef1d554
commit
5f51c25303
@ -46,6 +46,10 @@ static const struct argument kArguments[] = {
|
||||
"-connect", true,
|
||||
"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;
|
||||
|
Loading…
Reference in New Issue
Block a user