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

Unified Diff: net/base/openssl_private_key_store_android.cc

Issue 361193003: Eliminate ScopedOpenSSL in favour of scoped_ptr<> specializations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android fixes Created 6 years, 6 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
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 e9851077faa836140dd94c645ae2e2e63ef17bbd..824b0a9b9ea92246d37155d4599e460b6fec1a35 100644
--- a/net/base/openssl_private_key_store_android.cc
+++ b/net/base/openssl_private_key_store_android.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/memory/singleton.h"
#include "crypto/openssl_util.h"
+#include "crypto/scoped_openssl_types.h"
#include "net/android/network_library.h"
namespace net {
@@ -29,9 +30,10 @@ bool OpenSSLPrivateKeyStore::StoreKeyPair(const GURL& url,
// in a format that is incompatible with what the platform expects.
unsigned char* private_key = NULL;
int private_len = 0;
- crypto::ScopedOpenSSL<
- PKCS8_PRIV_KEY_INFO,
- PKCS8_PRIV_KEY_INFO_free> pkcs8(EVP_PKEY2PKCS8(pkey));
+ scoped_ptr<PKCS8_PRIV_KEY_INFO,
+ crypto::OpenSSLDestroyer<PKCS8_PRIV_KEY_INFO,
+ PKCS8_PRIV_KEY_INFO_free> >
+ pkcs8(EVP_PKEY2PKCS8(pkey));
if (pkcs8.get() != NULL) {
private_len = i2d_PKCS8_PRIV_KEY_INFO(pkcs8.get(), &private_key);
}

Powered by Google App Engine
This is Rietveld 408576698