Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 1739403002: Cut down on usage of deprecated APIs in //crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grumble grumble string vector char uint8_t grumble Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/signature_verifier_openssl.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_openssl.cc
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index 9e23a4dffc5311615248a429014451f36e597cf1..02e91942afe582e7b26178f5e563d547c3072843 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -31,6 +31,7 @@
#include "base/synchronization/lock.h"
#include "base/threading/thread_local.h"
#include "base/values.h"
+#include "crypto/auto_cbb.h"
#include "crypto/ec_private_key.h"
#include "crypto/openssl_util.h"
#include "crypto/scoped_openssl_types.h"
@@ -115,18 +116,6 @@ bool EVP_MDToPrivateKeyHash(const EVP_MD* md, SSLPrivateKey::Hash* hash) {
}
}
-class ScopedCBB {
- public:
- ScopedCBB() { CBB_zero(&cbb_); }
- ~ScopedCBB() { CBB_cleanup(&cbb_); }
-
- CBB* get() { return &cbb_; }
-
- private:
- CBB cbb_;
- DISALLOW_COPY_AND_ASSIGN(ScopedCBB);
-};
-
scoped_ptr<base::Value> NetLogPrivateKeyOperationCallback(
SSLPrivateKey::Type type,
SSLPrivateKey::Hash hash,
@@ -2257,7 +2246,7 @@ int SSLClientSocketOpenSSL::TokenBindingAdd(const uint8_t** out,
if (ssl_config_.token_binding_params.empty()) {
return 0;
}
- ScopedCBB output;
+ crypto::AutoCBB output;
CBB parameters_list;
if (!CBB_init(output.get(), 7) ||
!CBB_add_u8(output.get(), kTbProtocolVersionMajor) ||
« no previous file with comments | « crypto/signature_verifier_openssl.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698