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

Unified Diff: net/socket/ssl_client_socket_mac.cc

Issue 1417003: Revert due to compile failures... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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/net.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_mac.cc
===================================================================
--- net/socket/ssl_client_socket_mac.cc (revision 42829)
+++ net/socket/ssl_client_socket_mac.cc (working copy)
@@ -655,32 +655,19 @@
void SSLClientSocketMac::GetSSLCertRequestInfo(
SSLCertRequestInfo* cert_request_info) {
// I'm being asked for available client certs (identities).
- // First, get the cert issuer names allowed by the server.
- std::vector<CertPrincipal> valid_issuers;
- CFArrayRef valid_issuer_names = NULL;
- if (SSLCopyDistinguishedNames(ssl_context_, &valid_issuer_names) == noErr &&
- valid_issuer_names != NULL) {
- SSL_LOG << "Server has " << CFArrayGetCount(valid_issuer_names)
- << " valid issuer names";
- int n = CFArrayGetCount(valid_issuer_names);
- for (int i = 0; i < n; i++) {
- // Parse each name into a CertPrincipal object.
- CFDataRef issuer = reinterpret_cast<CFDataRef>(
- CFArrayGetValueAtIndex(valid_issuer_names, i));
- CertPrincipal p;
- if (p.ParseDistinguishedName(CFDataGetBytePtr(issuer),
- CFDataGetLength(issuer))) {
- valid_issuers.push_back(p);
- }
- }
- CFRelease(valid_issuer_names);
+
+ CFArrayRef allowed_issuer_names = NULL;
+ if (SSLCopyDistinguishedNames(ssl_context_, &allowed_issuer_names) == noErr &&
+ allowed_issuer_names != NULL) {
+ SSL_LOG << "Server has " << CFArrayGetCount(allowed_issuer_names)
+ << " allowed issuer names";
+ CFRelease(allowed_issuer_names);
+ // TODO(snej): Filter GetSSLClientCertificates using this array.
}
- // Now get the available client certs whose issuers are allowed by the server.
cert_request_info->host_and_port = hostname_;
cert_request_info->client_certs.clear();
X509Certificate::GetSSLClientCertificates(hostname_,
- valid_issuers,
&cert_request_info->client_certs);
SSL_LOG << "Asking user to choose between "
<< cert_request_info->client_certs.size() << " client certs...";
« no previous file with comments | « net/net.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698