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

Unified Diff: net/ssl/openssl_client_key_store.cc

Issue 396803002: Implement TLS client auth in the OS X OpenSSL port. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 d7a32e8f2fa47b1ebcdd1db123afdf8b3c6c1435..ef38da6e12770ebc186d8488073b212923906d9e 100644
--- a/net/ssl/openssl_client_key_store.cc
+++ b/net/ssl/openssl_client_key_store.cc
@@ -107,22 +107,20 @@ bool OpenSSLClientKeyStore::RecordClientCertPrivateKey(
return true;
}
-bool OpenSSLClientKeyStore::FetchClientCertPrivateKey(
- const X509Certificate* client_cert,
- crypto::ScopedEVP_PKEY* private_key) {
+crypto::ScopedEVP_PKEY OpenSSLClientKeyStore::FetchClientCertPrivateKey(
+ const X509Certificate* client_cert) {
if (!client_cert)
- return false;
+ return crypto::ScopedEVP_PKEY();
crypto::ScopedEVP_PKEY pub_key(GetOpenSSLPublicKey(client_cert));
if (!pub_key.get())
- return false;
+ return crypto::ScopedEVP_PKEY();
int index = FindKeyPairIndex(pub_key.get());
if (index < 0)
- return false;
+ return crypto::ScopedEVP_PKEY();
- private_key->reset(CopyEVP_PKEY(pairs_[index].private_key));
- return true;
+ return crypto::ScopedEVP_PKEY(CopyEVP_PKEY(pairs_[index].private_key));
}
void OpenSSLClientKeyStore::Flush() {
« 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