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

Side by Side Diff: net/ssl/client_cert_store_impl_win.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 #13 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
« no previous file with comments | « net/ssl/client_cert_store_impl_nss.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #define SECURITY_WIN32 // Needs to be defined before including security.h 10 #define SECURITY_WIN32 // Needs to be defined before including security.h
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 for (size_t i = 0; i < intermediates.size(); ++i) 136 for (size_t i = 0; i < intermediates.size(); ++i)
137 CertFreeCertificateContext(intermediates[i]); 137 CertFreeCertificateContext(intermediates[i]);
138 } 138 }
139 139
140 std::sort(selected_certs->begin(), selected_certs->end(), 140 std::sort(selected_certs->begin(), selected_certs->end(),
141 x509_util::ClientCertSorter()); 141 x509_util::ClientCertSorter());
142 } 142 }
143 143
144 } // namespace 144 } // namespace
145 145
146 ClientCertStoreImpl::ClientCertStoreImpl() {}
147
148 ClientCertStoreImpl::~ClientCertStoreImpl() {}
149
146 void ClientCertStoreImpl::GetClientCerts(const SSLCertRequestInfo& request, 150 void ClientCertStoreImpl::GetClientCerts(const SSLCertRequestInfo& request,
147 CertificateList* selected_certs, 151 CertificateList* selected_certs,
148 const base::Closure& callback) { 152 const base::Closure& callback) {
149 // Client certificates of the user are in the "MY" system certificate store. 153 // Client certificates of the user are in the "MY" system certificate store.
150 HCERTSTORE my_cert_store = CertOpenSystemStore(NULL, L"MY"); 154 HCERTSTORE my_cert_store = CertOpenSystemStore(NULL, L"MY");
151 if (!my_cert_store) { 155 if (!my_cert_store) {
152 PLOG(ERROR) << "Could not open the \"MY\" system certificate store: "; 156 PLOG(ERROR) << "Could not open the \"MY\" system certificate store: ";
153 selected_certs->clear(); 157 selected_certs->clear();
154 callback.Run(); 158 callback.Run();
155 return; 159 return;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // copy). 201 // copy).
198 if (!CertFreeCertificateContext(cert)) 202 if (!CertFreeCertificateContext(cert))
199 return false; 203 return false;
200 } 204 }
201 205
202 GetClientCertsImpl(test_store.get(), request, selected_certs); 206 GetClientCertsImpl(test_store.get(), request, selected_certs);
203 return true; 207 return true;
204 } 208 }
205 209
206 } // namespace net 210 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/client_cert_store_impl_nss.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698