aboutsummaryrefslogtreecommitdiff
path: root/tool/ciphers.cc
diff options
context:
space:
mode:
authorMatt Braithwaite <mab@google.com>2016-08-17 20:10:28 -0700
committerCQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>2016-09-01 22:22:54 +0000
commitd17d74d73f8a008f5e7ca6a64257b3c3a99d1bb4 (patch)
tree77f0a84c6ddac2344a2bbcc9daff73f7233ddc1c /tool/ciphers.cc
parentbc61769e49df6c84de636051ecd8b8104c07caf4 (diff)
downloadboringssl-d17d74d73f8a008f5e7ca6a64257b3c3a99d1bb4.zip
boringssl-d17d74d73f8a008f5e7ca6a64257b3c3a99d1bb4.tar.gz
boringssl-d17d74d73f8a008f5e7ca6a64257b3c3a99d1bb4.tar.bz2
Replace Scoped* heap types with bssl::UniquePtr.
Unlike the Scoped* types, bssl::UniquePtr is available to C++ users, and offered for a large variety of types. The 'extern "C++"' trick is used to make the C++ bits digestible to C callers that wrap header files in 'extern "C"'. Change-Id: Ifbca4c2997d6628e33028c7d7620c72aff0f862e Reviewed-on: https://boringssl-review.googlesource.com/10521 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Diffstat (limited to 'tool/ciphers.cc')
-rw-r--r--tool/ciphers.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/tool/ciphers.cc b/tool/ciphers.cc
index d7cc36b..f52527b 100644
--- a/tool/ciphers.cc
+++ b/tool/ciphers.cc
@@ -20,8 +20,6 @@
#include <openssl/ssl.h>
-#include "../crypto/test/scoped_types.h"
-#include "../ssl/test/scoped_types.h"
#include "internal.h"
@@ -33,7 +31,7 @@ bool Ciphers(const std::vector<std::string> &args) {
const std::string &ciphers_string = args.back();
- ScopedSSL_CTX ctx(SSL_CTX_new(SSLv23_client_method()));
+ bssl::UniquePtr<SSL_CTX> ctx(SSL_CTX_new(SSLv23_client_method()));
if (!SSL_CTX_set_cipher_list(ctx.get(), ciphers_string.c_str())) {
fprintf(stderr, "Failed to parse cipher suite config.\n");
ERR_print_errors_fp(stderr);