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

Side by Side Diff: net/ssl/client_cert_store_impl_mac.cc

Issue 83793006: NSS: Handle unfriendly tokens in client auth. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for comment #8 Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ssl/client_cert_store_impl.h" 5 #include "net/ssl/client_cert_store_impl.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <CoreFoundation/CFArray.h> 8 #include <CoreFoundation/CFArray.h>
9 #include <CoreServices/CoreServices.h> 9 #include <CoreServices/CoreServices.h>
10 #include <Security/SecBase.h> 10 #include <Security/SecBase.h>
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 CertificateList::iterator sort_end = selected_certs->end(); 165 CertificateList::iterator sort_end = selected_certs->end();
166 if (preferred_cert.get() && sort_begin != sort_end && 166 if (preferred_cert.get() && sort_begin != sort_end &&
167 sort_begin->get() == preferred_cert.get()) { 167 sort_begin->get() == preferred_cert.get()) {
168 ++sort_begin; 168 ++sort_begin;
169 } 169 }
170 sort(sort_begin, sort_end, x509_util::ClientCertSorter()); 170 sort(sort_begin, sort_end, x509_util::ClientCertSorter());
171 } 171 }
172 172
173 } // namespace 173 } // namespace
174 174
175 ClientCertStoreImpl::ClientCertStoreImpl() {}
176
177 ClientCertStoreImpl::~ClientCertStoreImpl() {}
wtc 2013/11/26 23:28:17 Nit: It is a shame that we need to define the cons
Ryan Sleevi 2013/11/26 23:36:26 The clang style checker will warn about a non-triv
178
175 void ClientCertStoreImpl::GetClientCerts(const SSLCertRequestInfo& request, 179 void ClientCertStoreImpl::GetClientCerts(const SSLCertRequestInfo& request,
176 CertificateList* selected_certs, 180 CertificateList* selected_certs,
177 const base::Closure& callback) { 181 const base::Closure& callback) {
178 std::string server_domain = 182 std::string server_domain =
179 HostPortPair::FromString(request.host_and_port).host(); 183 HostPortPair::FromString(request.host_and_port).host();
180 184
181 ScopedCFTypeRef<SecIdentityRef> preferred_identity; 185 ScopedCFTypeRef<SecIdentityRef> preferred_identity;
182 if (!server_domain.empty()) { 186 if (!server_domain.empty()) {
183 // See if there's an identity preference for this domain: 187 // See if there's an identity preference for this domain:
184 ScopedCFTypeRef<CFStringRef> domain_str( 188 ScopedCFTypeRef<CFStringRef> domain_str(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 const CertificateList& regular_certs, 271 const CertificateList& regular_certs,
268 const SSLCertRequestInfo& request, 272 const SSLCertRequestInfo& request,
269 CertificateList* selected_certs) { 273 CertificateList* selected_certs) {
270 GetClientCertsImpl( 274 GetClientCertsImpl(
271 preferred_cert, regular_certs, request, false, selected_certs); 275 preferred_cert, regular_certs, request, false, selected_certs);
272 return true; 276 return true;
273 } 277 }
274 #endif 278 #endif
275 279
276 } // namespace net 280 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698