Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 | 72 |
| 73 std::sort(selected_certs->begin(), selected_certs->end(), | 73 std::sort(selected_certs->begin(), selected_certs->end(), |
| 74 x509_util::ClientCertSorter()); | 74 x509_util::ClientCertSorter()); |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace | 78 } // namespace |
| 79 | 79 |
| 80 bool ClientCertStoreImpl::GetClientCerts(const SSLCertRequestInfo& request, | 80 bool ClientCertStoreImpl::GetClientCerts(const SSLCertRequestInfo& request, |
| 81 CertificateList* selected_certs) { | 81 CertificateList* selected_certs) { |
| 82 // XXX | |
|
Ryan Sleevi
2013/06/28 17:01:59
I'm guessing this is where you want to filter by s
mattm
2013/09/12 21:46:32
yeah, probably something for a separate CL though.
| |
| 82 CERTCertList* client_certs = CERT_FindUserCertsByUsage( | 83 CERTCertList* client_certs = CERT_FindUserCertsByUsage( |
| 83 CERT_GetDefaultCertDB(), certUsageSSLClient, | 84 CERT_GetDefaultCertDB(), certUsageSSLClient, |
| 84 PR_FALSE, PR_FALSE, NULL); | 85 PR_FALSE, PR_FALSE, NULL); |
| 85 // It is ok for a user not to have any client certs. | 86 // It is ok for a user not to have any client certs. |
| 86 if (!client_certs) | 87 if (!client_certs) |
| 87 return true; | 88 return true; |
| 88 | 89 |
| 89 bool rv = GetClientCertsImpl(client_certs, request, true, selected_certs); | 90 bool rv = GetClientCertsImpl(client_certs, request, true, selected_certs); |
| 90 CERT_DestroyCertList(client_certs); | 91 CERT_DestroyCertList(client_certs); |
| 91 return rv; | 92 return rv; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 102 CERT_AddCertToListTail( | 103 CERT_AddCertToListTail( |
| 103 cert_list, CERT_DupCertificate(input_certs[i]->os_cert_handle())); | 104 cert_list, CERT_DupCertificate(input_certs[i]->os_cert_handle())); |
| 104 } | 105 } |
| 105 | 106 |
| 106 bool rv = GetClientCertsImpl(cert_list, request, false, selected_certs); | 107 bool rv = GetClientCertsImpl(cert_list, request, false, selected_certs); |
| 107 CERT_DestroyCertList(cert_list); | 108 CERT_DestroyCertList(cert_list); |
| 108 return rv; | 109 return rv; |
| 109 } | 110 } |
| 110 | 111 |
| 111 } // namespace net | 112 } // namespace net |
| OLD | NEW |