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

Unified Diff: net/http/http_network_transaction.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
« no previous file with comments | « net/http/http_network_transaction.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 8a8e7421e4bbd5d3e8f5390f3fd5f601c176b45d..339bb751f619834577feae741dc22613f6ac454c 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -60,6 +60,7 @@
#include "net/spdy/spdy_session_pool.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_connection_status_flags.h"
+#include "net/ssl/ssl_private_key.h"
#include "url/gurl.h"
#include "url/url_canon.h"
@@ -220,7 +221,9 @@ int HttpNetworkTransaction::RestartIgnoringLastError(
}
int HttpNetworkTransaction::RestartWithCertificate(
- X509Certificate* client_cert, const CompletionCallback& callback) {
+ X509Certificate* client_cert,
+ SSLPrivateKey* client_private_key,
+ const CompletionCallback& callback) {
// In HandleCertificateRequest(), we always tear down existing stream
// requests to force a new connection. So we shouldn't have one here.
DCHECK(!stream_request_.get());
@@ -231,8 +234,10 @@ int HttpNetworkTransaction::RestartWithCertificate(
&proxy_ssl_config_ : &server_ssl_config_;
ssl_config->send_client_cert = true;
ssl_config->client_cert = client_cert;
+ ssl_config->client_private_key = client_private_key;
session_->ssl_client_auth_cache()->Add(
- response_.cert_request_info->host_and_port, client_cert);
+ response_.cert_request_info->host_and_port, client_cert,
+ client_private_key);
// Reset the other member variables.
// Note: this is necessary only with SSL renegotiation.
ResetStateForRestart();
@@ -1226,8 +1231,10 @@ int HttpNetworkTransaction::HandleCertificateRequest(int error) {
// to provide one for this server before, use the past decision
// automatically.
scoped_refptr<X509Certificate> client_cert;
+ scoped_refptr<SSLPrivateKey> client_private_key;
bool found_cached_cert = session_->ssl_client_auth_cache()->Lookup(
- response_.cert_request_info->host_and_port, &client_cert);
+ response_.cert_request_info->host_and_port, &client_cert,
+ &client_private_key);
if (!found_cached_cert)
return error;
@@ -1251,6 +1258,7 @@ int HttpNetworkTransaction::HandleCertificateRequest(int error) {
&proxy_ssl_config_ : &server_ssl_config_;
ssl_config->send_client_cert = true;
ssl_config->client_cert = client_cert;
+ ssl_config->client_private_key = client_private_key;
next_state_ = STATE_CREATE_STREAM;
// Reset the other member variables.
// Note: this is necessary only with SSL renegotiation.
« no previous file with comments | « net/http/http_network_transaction.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698