Chromium Code Reviews| 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 | |
| 51 // Given an |identity|, adds it to either |regular_certs| or assigns | |
| 52 // |preferred_cert| if it it shte |preferred_identity. | |
|
Ryan Sleevi
2017/05/30 18:00:01
typo: if it is the |preferred_identity|
Ryan Sleevi
2017/05/30 18:00:01
Could you expand on what you're trying to document
agaynor
2017/05/31 02:37:33
Done.
| |
| 53 void AddIdentity( | |
| 54 CertificateList& regular_certs, | |
| 55 scoped_refptr<X509Certificate>& preferred_cert, | |
| 56 SecIdentityRef preferred_identity, | |
| 57 SecIdentityRef identity); | |
| 58 | |
| 59 | |
| 48 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); | 60 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); |
| 49 }; | 61 }; |
| 50 | 62 |
| 51 } // namespace net | 63 } // namespace net |
| 52 | 64 |
| 53 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ | 65 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ |
| OLD | NEW |