| 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_MAC_H_ | 5 #ifndef NET_SSL_CLIENT_CERT_STORE_MAC_H_ |
| 6 #define NET_SSL_CLIENT_CERT_STORE_MAC_H_ | 6 #define NET_SSL_CLIENT_CERT_STORE_MAC_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 "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| 11 #include "net/ssl/client_cert_store.h" | 11 #include "net/ssl/client_cert_store.h" |
| 12 #include "net/ssl/ssl_cert_request_info.h" | 12 #include "net/ssl/ssl_cert_request_info.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class NET_EXPORT ClientCertStoreMac : public ClientCertStore { | 16 class NET_EXPORT ClientCertStoreMac : public ClientCertStore { |
| 17 public: | 17 public: |
| 18 ClientCertStoreMac(); | 18 ClientCertStoreMac(); |
| 19 ~ClientCertStoreMac() override; | 19 ~ClientCertStoreMac() override; |
| 20 | 20 |
| 21 // ClientCertStore: | 21 // ClientCertStore: |
| 22 void GetClientCerts(const SSLCertRequestInfo& cert_request_info, | 22 void GetClientCerts(const SSLCertRequestInfo& cert_request_info, |
| 23 const ClientCertListCallback& callback) override; | 23 CertificateList* selected_certs, |
| 24 const base::Closure& callback) override; |
| 24 | 25 |
| 25 private: | 26 private: |
| 26 friend class ClientCertStoreMacTest; | 27 friend class ClientCertStoreMacTest; |
| 27 friend class ClientCertStoreMacTestDelegate; | 28 friend class ClientCertStoreMacTestDelegate; |
| 28 | 29 |
| 29 // A hook for testing. Filters |input_certs| using the logic being used to | 30 // A hook for testing. Filters |input_certs| using the logic being used to |
| 30 // filter the system store when GetClientCerts() is called. | 31 // filter the system store when GetClientCerts() is called. |
| 31 // Implemented by creating a list of certificates that otherwise would be | 32 // Implemented by creating a list of certificates that otherwise would be |
| 32 // extracted from the system store and filtering it using the common logic | 33 // extracted from the system store and filtering it using the common logic |
| 33 // (less adequate than the approach used on Windows). | 34 // (less adequate than the approach used on Windows). |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 const CertificateList& regular_certs, | 45 const CertificateList& regular_certs, |
| 45 const SSLCertRequestInfo& request, | 46 const SSLCertRequestInfo& request, |
| 46 CertificateList* selected_certs); | 47 CertificateList* selected_certs); |
| 47 | 48 |
| 48 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); | 49 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 } // namespace net | 52 } // namespace net |
| 52 | 53 |
| 53 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ | 54 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ |
| OLD | NEW |