diff options
author | Matt Braithwaite <mab@google.com> | 2016-08-17 20:10:28 -0700 |
---|---|---|
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | 2016-09-01 22:22:54 +0000 |
commit | d17d74d73f8a008f5e7ca6a64257b3c3a99d1bb4 (patch) | |
tree | 77f0a84c6ddac2344a2bbcc9daff73f7233ddc1c /tool/ciphers.cc | |
parent | bc61769e49df6c84de636051ecd8b8104c07caf4 (diff) | |
download | boringssl-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.cc | 4 |
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); |