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

Unified Diff: net/ssl/openssl_client_key_store.cc

Issue 388683002: Switch OpenSSLClientKeyStore::ScopedEVP_PKEY to crypto::ScopedEVP_PKEY. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mis-split CL Created 6 years, 5 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/ssl/openssl_client_key_store.h ('k') | net/ssl/openssl_client_key_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/openssl_client_key_store.cc
diff --git a/net/ssl/openssl_client_key_store.cc b/net/ssl/openssl_client_key_store.cc
index 9ea044e3fde6671e391cf1ad9f6ddecda35b8584..d7a32e8f2fa47b1ebcdd1db123afdf8b3c6c1435 100644
--- a/net/ssl/openssl_client_key_store.cc
+++ b/net/ssl/openssl_client_key_store.cc
@@ -15,8 +15,6 @@ namespace net {
namespace {
-typedef OpenSSLClientKeyStore::ScopedEVP_PKEY ScopedEVP_PKEY;
-
// Increment the reference count of a given EVP_PKEY. This function
// is similar to EVP_PKEY_dup which is not available from the OpenSSL
// version used by Chromium at the moment. Its name is distinct to
@@ -31,14 +29,14 @@ EVP_PKEY* CopyEVP_PKEY(EVP_PKEY* key) {
// Return the EVP_PKEY holding the public key of a given certificate.
// |cert| is a certificate.
// Returns a scoped EVP_PKEY for it.
-ScopedEVP_PKEY GetOpenSSLPublicKey(const X509Certificate* cert) {
+crypto::ScopedEVP_PKEY GetOpenSSLPublicKey(const X509Certificate* cert) {
// X509_PUBKEY_get() increments the reference count of its result.
// Unlike X509_get_X509_PUBKEY() which simply returns a direct pointer.
EVP_PKEY* pkey =
X509_PUBKEY_get(X509_get_X509_PUBKEY(cert->os_cert_handle()));
if (!pkey)
LOG(ERROR) << "Can't extract private key from certificate!";
- return ScopedEVP_PKEY(pkey);
+ return crypto::ScopedEVP_PKEY(pkey);
}
} // namespace
@@ -101,7 +99,7 @@ bool OpenSSLClientKeyStore::RecordClientCertPrivateKey(
return false;
// Get public key from certificate.
- ScopedEVP_PKEY pub_key(GetOpenSSLPublicKey(client_cert));
+ crypto::ScopedEVP_PKEY pub_key(GetOpenSSLPublicKey(client_cert));
if (!pub_key.get())
return false;
@@ -111,11 +109,11 @@ bool OpenSSLClientKeyStore::RecordClientCertPrivateKey(
bool OpenSSLClientKeyStore::FetchClientCertPrivateKey(
const X509Certificate* client_cert,
- ScopedEVP_PKEY* private_key) {
+ crypto::ScopedEVP_PKEY* private_key) {
if (!client_cert)
return false;
- ScopedEVP_PKEY pub_key(GetOpenSSLPublicKey(client_cert));
+ crypto::ScopedEVP_PKEY pub_key(GetOpenSSLPublicKey(client_cert));
if (!pub_key.get())
return false;
« no previous file with comments | « net/ssl/openssl_client_key_store.h ('k') | net/ssl/openssl_client_key_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698