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

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

Issue 14254003: Clarify that ClientCertStoreImpl::SelectClientCerts is testing-only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/ssl/client_cert_store_impl_mac.cc ('k') | net/ssl/client_cert_store_impl_unittest.cc » ('j') | 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 <nss.h> 7 #include <nss.h>
8 #include <ssl.h> 8 #include <ssl.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 PR_FALSE, PR_FALSE, NULL); 84 PR_FALSE, PR_FALSE, NULL);
85 // It is ok for a user not to have any client certs. 85 // It is ok for a user not to have any client certs.
86 if (!client_certs) 86 if (!client_certs)
87 return true; 87 return true;
88 88
89 bool rv = GetClientCertsImpl(client_certs, request, true, selected_certs); 89 bool rv = GetClientCertsImpl(client_certs, request, true, selected_certs);
90 CERT_DestroyCertList(client_certs); 90 CERT_DestroyCertList(client_certs);
91 return rv; 91 return rv;
92 } 92 }
93 93
94 bool ClientCertStoreImpl::SelectClientCerts(const CertificateList& input_certs, 94 bool ClientCertStoreImpl::SelectClientCertsForTesting(
95 const SSLCertRequestInfo& request, 95 const CertificateList& input_certs,
96 CertificateList* selected_certs) { 96 const SSLCertRequestInfo& request,
97 CertificateList* selected_certs) {
97 CERTCertList* cert_list = CERT_NewCertList(); 98 CERTCertList* cert_list = CERT_NewCertList();
98 if (!cert_list) 99 if (!cert_list)
99 return false; 100 return false;
100 for (size_t i = 0; i < input_certs.size(); ++i) { 101 for (size_t i = 0; i < input_certs.size(); ++i) {
101 CERT_AddCertToListTail( 102 CERT_AddCertToListTail(
102 cert_list, CERT_DupCertificate(input_certs[i]->os_cert_handle())); 103 cert_list, CERT_DupCertificate(input_certs[i]->os_cert_handle()));
103 } 104 }
104 105
105 bool rv = GetClientCertsImpl(cert_list, request, false, selected_certs); 106 bool rv = GetClientCertsImpl(cert_list, request, false, selected_certs);
106 CERT_DestroyCertList(cert_list); 107 CERT_DestroyCertList(cert_list);
107 return rv; 108 return rv;
108 } 109 }
109 110
110 } // namespace net 111 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/client_cert_store_impl_mac.cc ('k') | net/ssl/client_cert_store_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698