Chromium Code Reviews| Index: net/http/http_network_transaction.cc |
| diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc |
| index f060cd7485dff317ec198c842d3a22b412888531..b9062c87ca42bbc1305fd0b39e62a678185083e2 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" |
|
davidben
2015/09/25 20:10:11
[THIS one is actually necessary]
svaldez
2015/09/28 16:54:52
Done.
|
| #include "url/gurl.h" |
| #include "url/url_canon.h" |
| @@ -219,7 +220,9 @@ int HttpNetworkTransaction::RestartIgnoringLastError( |
| } |
| int HttpNetworkTransaction::RestartWithCertificate( |
| - X509Certificate* client_cert, const CompletionCallback& callback) { |
| + X509Certificate* client_cert, |
| + SSLPrivateKey* client_pkey, |
| + 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()); |
| @@ -230,8 +233,9 @@ int HttpNetworkTransaction::RestartWithCertificate( |
| &proxy_ssl_config_ : &server_ssl_config_; |
| ssl_config->send_client_cert = true; |
| ssl_config->client_cert = client_cert; |
| + ssl_config->client_pkey = client_pkey; |
| 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_pkey); |
| // Reset the other member variables. |
| // Note: this is necessary only with SSL renegotiation. |
| ResetStateForRestart(); |
| @@ -1214,8 +1218,9 @@ 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_pkey; |
| 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_pkey); |
| if (!found_cached_cert) |
| return error; |
| @@ -1239,6 +1244,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_pkey = client_pkey; |
| next_state_ = STATE_CREATE_STREAM; |
| // Reset the other member variables. |
| // Note: this is necessary only with SSL renegotiation. |