aboutsummaryrefslogtreecommitdiff
path: root/tool/ciphers.cc
diff options
context:
space:
mode:
authorMatthew Braithwaite <mab@google.com>2017-02-17 22:08:23 -0800
committerMatt Braithwaite <mab@google.com>2017-02-22 00:09:27 +0000
commita57dcfb69c475b13f8675f6bfbe2f2cf8dad3667 (patch)
tree8ad2d291ee4d13ae7c9a6cbb105dc54aea10120a /tool/ciphers.cc
parentc4796c92e0aced2342ed5687201aea07189c3bc1 (diff)
downloadboringssl-a57dcfb69c475b13f8675f6bfbe2f2cf8dad3667.zip
boringssl-a57dcfb69c475b13f8675f6bfbe2f2cf8dad3667.tar.gz
boringssl-a57dcfb69c475b13f8675f6bfbe2f2cf8dad3667.tar.bz2
Add new cipherlist-setting APIs that reject nonsense.
The new APIs are SSL_CTX_set_strict_cipher_list() and SSL_set_strict_cipher_list(). They have two motivations: First, typos in cipher lists can go undetected for a long time, and can have surprising consequences when silently ignored. Second, there is a tendency to use superstition in the construction of cipher lists, for example by "turning off" things that do not actually exist. This leads to the corrosive belief that DEFAULT and ALL ought not to be trusted. This belief is false. Change-Id: I42909b69186e0b4cf45457e5c0bc968f6bbf231a Reviewed-on: https://boringssl-review.googlesource.com/13925 Commit-Queue: Matt Braithwaite <mab@google.com> Reviewed-by: Matt Braithwaite <mab@google.com>
Diffstat (limited to 'tool/ciphers.cc')
-rw-r--r--tool/ciphers.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ciphers.cc b/tool/ciphers.cc
index f52527b..6370b78 100644
--- a/tool/ciphers.cc
+++ b/tool/ciphers.cc
@@ -32,7 +32,7 @@ bool Ciphers(const std::vector<std::string> &args) {
const std::string &ciphers_string = args.back();
bssl::UniquePtr<SSL_CTX> ctx(SSL_CTX_new(SSLv23_client_method()));
- if (!SSL_CTX_set_cipher_list(ctx.get(), ciphers_string.c_str())) {
+ if (!SSL_CTX_set_strict_cipher_list(ctx.get(), ciphers_string.c_str())) {
fprintf(stderr, "Failed to parse cipher suite config.\n");
ERR_print_errors_fp(stderr);
return false;