| 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 4a2dedb74822bb6ea55eacf54c087ce08714ed31..691577ed1d34e0bd748801d1d35537a21b64a824 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;
|
|
|
| @@ -49,7 +51,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();
|
| }
|
|
|
| @@ -72,13 +79,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();
|
| }
|
|
|