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

Unified Diff: net/http/http_network_transaction.cc

Issue 12035105: Move client certificates retrieval logic out of the SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing license header Created 7 years, 10 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
« no previous file with comments | « net/data/ssl/scripts/client_authentication/run-test-server.sh ('k') | net/socket/ssl_client_socket_nss.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 7c9c930d412c19e0f4bf7d733d1af5040d4f9015..5b120f765ae7da7fdf9e368e4639df27b9a8f175 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1174,16 +1174,11 @@ int HttpNetworkTransaction::HandleCertificateRequest(int error) {
// is likely to accept, based on the criteria supplied in the
// CertificateRequest message.
if (client_cert) {
- const std::vector<scoped_refptr<X509Certificate> >& client_certs =
- response_.cert_request_info->client_certs;
- bool cert_still_valid = false;
- for (size_t i = 0; i < client_certs.size(); ++i) {
- if (client_cert->Equals(client_certs[i])) {
- cert_still_valid = true;
- break;
- }
- }
+ const std::vector<std::string>& cert_authorities =
+ response_.cert_request_info->cert_authorities;
+ bool cert_still_valid = cert_authorities.empty() ||
+ client_cert->IsIssuedByEncoded(cert_authorities);
if (!cert_still_valid)
return error;
}
« no previous file with comments | « net/data/ssl/scripts/client_authentication/run-test-server.sh ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698