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

Unified Diff: content/browser/loader/resource_loader.cc

Issue 1422573008: Plumbing SSLPrivateKey (//net) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing un-needed forward decl. Created 5 years, 1 month 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: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 854c0adde9149c719e6717d1ef8764cdb641933d..5a9bbff111476ce9f08961454596d5ae074ba69b 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -35,6 +35,8 @@
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
#include "net/ssl/client_cert_store.h"
+#include "net/ssl/ssl_platform_key.h"
+#include "net/ssl/ssl_private_key.h"
#include "net/url_request/redirect_info.h"
#include "net/url_request/url_request_status.h"
@@ -423,7 +425,13 @@ void ResourceLoader::ContinueSSLRequest() {
void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) {
DCHECK(ssl_client_auth_handler_);
ssl_client_auth_handler_.reset();
- request_->ContinueWithCertificate(cert);
+ if (!cert) {
+ request_->ContinueWithCertificate(nullptr, nullptr);
+ return;
+ }
+ scoped_refptr<net::SSLPrivateKey> private_key =
+ net::FetchClientCertPrivateKey(cert);
+ request_->ContinueWithCertificate(cert, private_key.get());
}
void ResourceLoader::CancelCertificateSelection() {
« no previous file with comments | « chrome/browser/devtools/devtools_network_transaction.cc ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698