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

Unified Diff: net/base/openssl_private_key_store_android.cc

Issue 2400033005: Use BoringSSL scopers in //net. (Closed)
Patch Set: eroman comments Created 4 years, 2 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 | « net/base/keygen_handler_unittest.cc ('k') | net/cert/cert_database_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/openssl_private_key_store_android.cc
diff --git a/net/base/openssl_private_key_store_android.cc b/net/base/openssl_private_key_store_android.cc
index 424f72f477e3c7eabded7caee45e916d011138f9..224a4f53a6876ba696dddd6662ed088843b3a91a 100644
--- a/net/base/openssl_private_key_store_android.cc
+++ b/net/base/openssl_private_key_store_android.cc
@@ -10,9 +10,7 @@
#include "base/logging.h"
#include "base/memory/singleton.h"
-#include "crypto/auto_cbb.h"
#include "crypto/openssl_util.h"
-#include "crypto/scoped_openssl_types.h"
#include "net/android/network_library.h"
namespace net {
@@ -23,12 +21,12 @@ bool OpenSSLPrivateKeyStore::StoreKeyPair(const GURL& url, EVP_PKEY* pkey) {
uint8_t* public_key;
size_t public_len;
- crypto::AutoCBB cbb;
+ bssl::ScopedCBB cbb;
if (!CBB_init(cbb.get(), 0) || !EVP_marshal_public_key(cbb.get(), pkey) ||
!CBB_finish(cbb.get(), &public_key, &public_len)) {
return false;
}
- crypto::ScopedOpenSSLBytes free_public_key(public_key);
+ bssl::UniquePtr<uint8_t> free_public_key(public_key);
uint8_t* private_key;
size_t private_len;
@@ -37,7 +35,7 @@ bool OpenSSLPrivateKeyStore::StoreKeyPair(const GURL& url, EVP_PKEY* pkey) {
!CBB_finish(cbb.get(), &private_key, &private_len)) {
return false;
}
- crypto::ScopedOpenSSLBytes free_private_key(private_key);
+ bssl::UniquePtr<uint8_t> free_private_key(private_key);
if (!android::StoreKeyPair(public_key, public_len, private_key,
private_len)) {
« no previous file with comments | « net/base/keygen_handler_unittest.cc ('k') | net/cert/cert_database_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698