| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef NET_SSL_CLIENT_CERT_STORE_WIN_H_ | 5 #ifndef NET_SSL_CLIENT_CERT_STORE_WIN_H_ |
| 6 #define NET_SSL_CLIENT_CERT_STORE_WIN_H_ | 6 #define NET_SSL_CLIENT_CERT_STORE_WIN_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "crypto/scoped_capi_types.h" | 10 #include "crypto/scoped_capi_types.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 using ScopedHCERTSTORE = crypto::ScopedCAPIHandle< | 34 using ScopedHCERTSTORE = crypto::ScopedCAPIHandle< |
| 35 HCERTSTORE, | 35 HCERTSTORE, |
| 36 crypto::CAPIDestroyerWithFlags<HCERTSTORE, | 36 crypto::CAPIDestroyerWithFlags<HCERTSTORE, |
| 37 CertCloseStore, | 37 CertCloseStore, |
| 38 CERT_CLOSE_STORE_CHECK_FLAG>>; | 38 CERT_CLOSE_STORE_CHECK_FLAG>>; |
| 39 | 39 |
| 40 friend class ClientCertStoreWinTestDelegate; | 40 friend class ClientCertStoreWinTestDelegate; |
| 41 | 41 |
| 42 // Opens the "MY" cert store and uses it to lookup the client certs. |
| 43 static ClientCertIdentityList GetClientCertsWithMyCertStore( |
| 44 const SSLCertRequestInfo& request); |
| 45 |
| 42 // A hook for testing. Filters |input_certs| using the logic being used to | 46 // A hook for testing. Filters |input_certs| using the logic being used to |
| 43 // filter the system store when GetClientCerts() is called. | 47 // filter the system store when GetClientCerts() is called. |
| 44 // Implemented by creating a temporary in-memory store and filtering it | 48 // Implemented by creating a temporary in-memory store and filtering it |
| 45 // using the common logic. | 49 // using the common logic. |
| 46 bool SelectClientCertsForTesting(const CertificateList& input_certs, | 50 bool SelectClientCertsForTesting(const CertificateList& input_certs, |
| 47 const SSLCertRequestInfo& cert_request_info, | 51 const SSLCertRequestInfo& cert_request_info, |
| 48 ClientCertIdentityList* selected_identities); | 52 ClientCertIdentityList* selected_identities); |
| 49 | 53 |
| 50 ScopedHCERTSTORE cert_store_; | 54 ScopedHCERTSTORE cert_store_; |
| 51 | 55 |
| 52 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreWin); | 56 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreWin); |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 } // namespace net | 59 } // namespace net |
| 56 | 60 |
| 57 #endif // NET_SSL_CLIENT_CERT_STORE_WIN_H_ | 61 #endif // NET_SSL_CLIENT_CERT_STORE_WIN_H_ |
| OLD | NEW |