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

Unified Diff: net/socket_stream/socket_stream.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/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream.cc
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index bf53d17cccdf6831c21adfdf5baf752e6787c3c8..158cff371ebdb2dd997e3a609f2834043b683eb2 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -1168,15 +1168,10 @@ int SocketStream::HandleCertificateRequest(int result, SSLConfig* ssl_config) {
if (!client_cert)
return result;
- const std::vector<scoped_refptr<X509Certificate> >& client_certs =
- 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 =
+ cert_request_info->cert_authorities;
+ bool cert_still_valid = cert_authorities.empty() ||
+ client_cert->IsIssuedByEncoded(cert_authorities);
if (!cert_still_valid)
return result;
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698