OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/field_trial.h" | 9 #include "base/field_trial.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 connection_.Reset(); | 1335 connection_.Reset(); |
1336 | 1336 |
1337 // If the user selected one of the certificate in client_certs for this | 1337 // If the user selected one of the certificate in client_certs for this |
1338 // server before, use it automatically. | 1338 // server before, use it automatically. |
1339 X509Certificate* client_cert = session_->ssl_client_auth_cache()-> | 1339 X509Certificate* client_cert = session_->ssl_client_auth_cache()-> |
1340 Lookup(GetHostAndPort(request_->url)); | 1340 Lookup(GetHostAndPort(request_->url)); |
1341 if (client_cert) { | 1341 if (client_cert) { |
1342 const std::vector<scoped_refptr<X509Certificate> >& client_certs = | 1342 const std::vector<scoped_refptr<X509Certificate> >& client_certs = |
1343 response_.cert_request_info->client_certs; | 1343 response_.cert_request_info->client_certs; |
1344 for (size_t i = 0; i < client_certs.size(); ++i) { | 1344 for (size_t i = 0; i < client_certs.size(); ++i) { |
1345 if (client_cert->fingerprint() == client_certs[i]->fingerprint()) { | 1345 if (client_cert->fingerprint().Equals(client_certs[i]->fingerprint())) { |
1346 ssl_config_.client_cert = client_cert; | 1346 ssl_config_.client_cert = client_cert; |
1347 ssl_config_.send_client_cert = true; | 1347 ssl_config_.send_client_cert = true; |
1348 next_state_ = STATE_INIT_CONNECTION; | 1348 next_state_ = STATE_INIT_CONNECTION; |
1349 // Reset the other member variables. | 1349 // Reset the other member variables. |
1350 // Note: this is necessary only with SSL renegotiation. | 1350 // Note: this is necessary only with SSL renegotiation. |
1351 ResetStateForRestart(); | 1351 ResetStateForRestart(); |
1352 return OK; | 1352 return OK; |
1353 } | 1353 } |
1354 } | 1354 } |
1355 } | 1355 } |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 host_and_port = proxy_info_.proxy_server().host_and_port(); | 1757 host_and_port = proxy_info_.proxy_server().host_and_port(); |
1758 } else { | 1758 } else { |
1759 DCHECK(target == HttpAuth::AUTH_SERVER); | 1759 DCHECK(target == HttpAuth::AUTH_SERVER); |
1760 host_and_port = GetHostAndPort(request_->url); | 1760 host_and_port = GetHostAndPort(request_->url); |
1761 } | 1761 } |
1762 auth_info->host_and_port = ASCIIToWide(host_and_port); | 1762 auth_info->host_and_port = ASCIIToWide(host_and_port); |
1763 response_.auth_challenge = auth_info; | 1763 response_.auth_challenge = auth_info; |
1764 } | 1764 } |
1765 | 1765 |
1766 } // namespace net | 1766 } // namespace net |
OLD | NEW |