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

Unified Diff: net/http/http_network_transaction.cc

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: . Created 3 years, 7 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: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index e29b01d43e23a9c2f99c2bf647a483e891c25022..57babee89812c76e92a2f04f37d4ec61aba25edf 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -149,8 +149,8 @@ int HttpNetworkTransaction::RestartIgnoringLastError(
}
int HttpNetworkTransaction::RestartWithCertificate(
- X509Certificate* client_cert,
- SSLPrivateKey* client_private_key,
+ scoped_refptr<X509Certificate> client_cert,
+ scoped_refptr<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.
@@ -164,8 +164,8 @@ int HttpNetworkTransaction::RestartWithCertificate(
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,
- client_private_key);
+ response_.cert_request_info->host_and_port, std::move(client_cert),
+ std::move(client_private_key));
// Reset the other member variables.
// Note: this is necessary only with SSL renegotiation.
ResetStateForRestart();

Powered by Google App Engine
This is Rietveld 408576698