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

Unified Diff: chrome/browser/ssl/ssl_client_auth_observer.cc

Issue 1304143010: Plumbing SSLPrivateKey Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase. Created 4 years, 11 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: chrome/browser/ssl/ssl_client_auth_observer.cc
diff --git a/chrome/browser/ssl/ssl_client_auth_observer.cc b/chrome/browser/ssl/ssl_client_auth_observer.cc
index fd9fa66b69352571fbe85bd46af5849f26083091..b0f7122e3625d0e99310caa73f0514c4bab55743 100644
--- a/chrome/browser/ssl/ssl_client_auth_observer.cc
+++ b/chrome/browser/ssl/ssl_client_auth_observer.cc
@@ -14,6 +14,8 @@
#include "content/public/browser/notification_service.h"
#include "net/cert/x509_certificate.h"
#include "net/ssl/ssl_cert_request_info.h"
+#include "net/ssl/ssl_platform_key.h"
+#include "net/ssl/ssl_private_key.h"
using content::BrowserThread;
@@ -48,7 +50,12 @@ void SSLClientAuthObserver::CertificateSelected(
content::Source<content::BrowserContext>(browser_context_),
content::Details<CertDetails>(&details));
- delegate_->ContinueWithCertificate(certificate);
+ scoped_refptr<net::SSLPrivateKey> private_key;
+
+ if (certificate)
+ private_key = net::FetchClientCertPrivateKey(certificate);
+
+ delegate_->ContinueWithCertificate(certificate, private_key.get());
delegate_.reset();
}
@@ -71,13 +78,19 @@ void SSLClientAuthObserver::Observe(
CertDetails* cert_details = content::Details<CertDetails>(details).ptr();
if (!cert_details->first->host_and_port.Equals(
- cert_request_info_->host_and_port))
+ cert_request_info_->host_and_port))
return;
DVLOG(1) << this << " got matching notification and selecting cert "
<< cert_details->second;
StopObserving();
- delegate_->ContinueWithCertificate(cert_details->second);
+
+ scoped_refptr<net::SSLPrivateKey> private_key;
+
+ if (cert_details->second)
+ private_key = net::FetchClientCertPrivateKey(cert_details->second);
+
+ delegate_->ContinueWithCertificate(cert_details->second, private_key.get());
delegate_.reset();
OnCertSelectedByNotification();
}
« no previous file with comments | « chrome/browser/devtools/devtools_network_transaction.h ('k') | chrome/browser/ssl/ssl_client_auth_requestor_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698