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

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

Issue 2272493002: Add TrustStoreNSS and TrustStoreCollection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert-trust-store-interface3-nss
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
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 "base/memory/ref_counted.h"
9 #include "net/base/net_export.h"
10 #include "net/cert/internal/trust_store.h"
11
12 namespace base {
13 class TaskRunner;
14 }
15
16 namespace net {
17
18 // TrustStoreCollection is an implementation of TrustStore which combines the
19 // results from multiple other TrustStores.
20 // Currently only one "primary" store can be added that supports async queries,
21 // any number of additional, synchronous-only stores can be used. (The
22 // assumption is that async one would be useful for OS integration, while the
23 // sync only stores can be used for supplying additional anchors. If multiple
24 // async stores are desired, it might be worth changing the
25 // FindTrustAnchorsForCert interface so that it can return async results in
26 // multiple batches.)
eroman 2016/08/23 18:48:54 Can you mention something about the order of resul
mattm 2016/08/27 00:37:01 Done.
27 class NET_EXPORT TrustStoreCollection : public TrustStore {
28 public:
29 TrustStoreCollection();
30 ~TrustStoreCollection() override;
31
32 // Include results from |store| in the combined output. Both sync and async
eroman 2016/08/23 18:48:54 Include --> Includes
mattm 2016/08/27 00:37:01 Done.
33 // queries to |store| will be allowed. |store| must outlive the
34 // TrustStoreCollection.
35 void SetPrimaryTrustStore(TrustStore* store);
36
37 // Include results from |store| in the combined output. |store| will only be
eroman 2016/08/23 18:48:54 Includes
mattm 2016/08/27 00:37:01 Done.
38 // queried synchronously. |store| must outlive the TrustStoreCollection.
39 void AddTrustStoreSynchronousOnly(TrustStore* store);
40
41 // TrustStore implementation:
42 void FindTrustAnchorsForCert(
eroman 2016/08/23 18:48:54 Do you think this API will ever need to communicat
mattm 2016/08/27 00:37:01 I think we may need something as far as logging /
43 const ParsedCertificate* cert,
44 const TrustAnchorCallback& callback,
eroman 2016/08/23 18:48:54 side-comment (belongs on other CL): "TrustAnchorCa
mattm 2016/08/27 00:37:01 Done.
45 TrustAnchors* out_matches,
46 std::unique_ptr<Request>* out_req) const override;
47
48 private:
49 TrustStore* primary_store_ = nullptr;
50 std::vector<TrustStore*> sync_only_stores_;
51
52 DISALLOW_COPY_AND_ASSIGN(TrustStoreCollection);
53 };
54
55 } // namespace net
56
57 #endif // NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/cert/internal/trust_store_collection.cc » ('j') | net/cert/internal/trust_store_collection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698