| 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 <Security/Security.h> |
| 9 |
| 8 #include "base/callback.h" | 10 #include "base/callback.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 11 #include "net/ssl/client_cert_store.h" | 13 #include "net/ssl/client_cert_store.h" |
| 12 #include "net/ssl/ssl_cert_request_info.h" | 14 #include "net/ssl/ssl_cert_request_info.h" |
| 13 | 15 |
| 14 namespace net { | 16 namespace net { |
| 15 | 17 |
| 16 class NET_EXPORT ClientCertStoreMac : public ClientCertStore { | 18 class NET_EXPORT ClientCertStoreMac : public ClientCertStore { |
| 17 public: | 19 public: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 38 // Testing hook specific to Mac, where the internal logic recognizes preferred | 40 // Testing hook specific to Mac, where the internal logic recognizes preferred |
| 39 // certificates for particular domains. If the preferred certificate is | 41 // certificates for particular domains. If the preferred certificate is |
| 40 // present in the output list (i.e. it doesn't get filtered out), it should | 42 // present in the output list (i.e. it doesn't get filtered out), it should |
| 41 // always come first. | 43 // always come first. |
| 42 bool SelectClientCertsGivenPreferredForTesting( | 44 bool SelectClientCertsGivenPreferredForTesting( |
| 43 const scoped_refptr<X509Certificate>& preferred_cert, | 45 const scoped_refptr<X509Certificate>& preferred_cert, |
| 44 const CertificateList& regular_certs, | 46 const CertificateList& regular_certs, |
| 45 const SSLCertRequestInfo& request, | 47 const SSLCertRequestInfo& request, |
| 46 CertificateList* selected_certs); | 48 CertificateList* selected_certs); |
| 47 | 49 |
| 50 // Given an |identity| identifies its corresponding certificate, and either |
| 51 // adds it to |regular_certs| or assigns it to |preferred_cert|, if the |
| 52 // |identity| matches the |preferred_identity|. |
| 53 void AddIdentity(CertificateList& regular_certs, |
| 54 scoped_refptr<X509Certificate>& preferred_cert, |
| 55 SecIdentityRef preferred_identity, |
| 56 SecIdentityRef identity); |
| 57 |
| 48 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); | 58 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); |
| 49 }; | 59 }; |
| 50 | 60 |
| 51 } // namespace net | 61 } // namespace net |
| 52 | 62 |
| 53 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ | 63 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ |
| OLD | NEW |