Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: net/base/client_cert_store_impl.h

Issue 12680003: net: split net/ssl out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/client_cert_store.h ('k') | net/base/client_cert_store_impl_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_BASE_CLIENT_CERT_STORE_IMPL_H_
6 #define NET_BASE_CLIENT_CERT_STORE_IMPL_H_
7
8 #include "base/basictypes.h"
9 #include "base/gtest_prod_util.h"
10 #include "net/base/client_cert_store.h"
11 #include "net/base/net_export.h"
12 #include "net/base/ssl_cert_request_info.h"
13
14 namespace net {
15
16 class NET_EXPORT ClientCertStoreImpl : public ClientCertStore {
17 public:
18 ClientCertStoreImpl() {}
19
20 virtual ~ClientCertStoreImpl() {}
21
22 // ClientCertStore:
23 virtual bool GetClientCerts(const SSLCertRequestInfo& cert_request_info,
24 CertificateList* selected_certs) OVERRIDE;
25
26 private:
27 FRIEND_TEST_ALL_PREFIXES(ClientCertStoreImplTest, EmptyQuery);
28 FRIEND_TEST_ALL_PREFIXES(ClientCertStoreImplTest, AllIssuersAllowed);
29 FRIEND_TEST_ALL_PREFIXES(ClientCertStoreImplTest, CertAuthorityFiltering);
30 #if defined(OS_MACOSX) && !defined(OS_IOS)
31 FRIEND_TEST_ALL_PREFIXES(ClientCertStoreImplTest, FilterOutThePreferredCert);
32 FRIEND_TEST_ALL_PREFIXES(ClientCertStoreImplTest, PreferredCertGoesFirst);
33 #endif
34
35 // A hook for testing. Filters |input_certs| using the logic being used to
36 // filter the system store when GetClientCerts() is called. Depending on the
37 // implementation, this might be:
38 // - Implemented by creating a temporary in-memory store and filtering it
39 // using the common logic (preferable, currently on Windows).
40 // - Implemented by creating a list of certificates that otherwise would be
41 // extracted from the system store and filtering it using the common logic
42 // (less adequate, currently on NSS and Mac).
43 bool SelectClientCerts(const CertificateList& input_certs,
44 const SSLCertRequestInfo& cert_request_info,
45 CertificateList* selected_certs);
46
47 #if defined(OS_MACOSX) && !defined(OS_IOS)
48 // Testing hook specific to Mac, where the internal logic recognizes preferred
49 // certificates for particular domains. If the preferred certificate is
50 // present in the output list (i.e. it doesn't get filtered out), it should
51 // always come first.
52 bool SelectClientCertsGivenPreferred(
53 const scoped_refptr<X509Certificate>& preferred_cert,
54 const CertificateList& regular_certs,
55 const SSLCertRequestInfo& request,
56 CertificateList* selected_certs);
57 #endif
58
59 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreImpl);
60 };
61
62 } // namespace net
63
64 #endif // NET_BASE_CLIENT_CERT_STORE_IMPL_H_
OLDNEW
« no previous file with comments | « net/base/client_cert_store.h ('k') | net/base/client_cert_store_impl_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698