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

Side by Side Diff: net/cert/internal/trust_store_collection.h

Issue 2126803004: WIP: NSS trust store integration for path builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert-command-line-path-builder-add_certpathbuilder
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « net/cert/internal/trust_store.cc ('k') | net/cert/internal/trust_store_collection.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 2016 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_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_
6 #define NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_
7
8 #include <vector>
9
10 #include "base/memory/ref_counted.h"
11 #include "net/base/net_export.h"
12 #include "net/cert/internal/cert_issuer_source_collection.h"
13 #include "net/cert/internal/trust_store.h"
14
15 namespace net {
16
17 // Returns results from a collection of other TrustStores.
18 //
19 // If any of the trust stores returns a trusted value for a cert, it will be
20 // passed on to the caller immediately without waiting for the other trust
21 // stores in the collection to return a result.
22 class NET_EXPORT TrustStoreCollection : public TrustStore {
23 public:
24 TrustStoreCollection();
25 ~TrustStoreCollection() override;
26
27 // Adds |store| to the list of TrustStores. The |store| must be valid for the
28 // lifetime of the TrustStoreCollection.
29 void AddStore(TrustStore* store);
30
31 // TrustStore implementation:
32 void IsTrustedCertificate(
33 scoped_refptr<ParsedCertificate> cert,
34 const TrustCallback& callback,
35 bool* out_trusted,
36 std::unique_ptr<TrustStore::Request>* out_req) const override;
37
38 // CertIssuerSource implementation:
39 void SyncGetIssuersOf(const ParsedCertificate* cert,
40 ParsedCertificateList* issuers) override;
41 void AsyncGetIssuersOf(
42 scoped_refptr<ParsedCertificate> cert,
43 const IssuerCallback& callback,
44 std::unique_ptr<CertIssuerSource::Request>* out_req) override;
45
46 private:
47 std::vector<TrustStore*> stores_;
48
49 CertIssuerSourceCollection cert_sources_;
50
51 DISALLOW_COPY_AND_ASSIGN(TrustStoreCollection);
52 };
53
54 } // namespace net
55
56 #endif // NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_
OLDNEW
« no previous file with comments | « net/cert/internal/trust_store.cc ('k') | net/cert/internal/trust_store_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698