OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_ | 5 #ifndef NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_ |
6 #define NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_ | 6 #define NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
10 #include "net/cert/internal/trust_store.h" | 10 #include "net/cert/internal/trust_store.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 // TrustStoreCollection is an implementation of TrustStore which combines the | 14 // TrustStoreCollection is an implementation of TrustStore which combines the |
15 // results from multiple TrustStores. | 15 // results from multiple TrustStores. |
16 // | 16 // |
17 // The order of the matches will correspond to a concatenation of matches in | 17 // The order of the matches will correspond to a concatenation of matches in |
18 // the order the stores were added. | 18 // the order the stores were added. |
19 class NET_EXPORT TrustStoreCollection : public TrustStore { | 19 class NET_EXPORT TrustStoreCollection : public TrustStore { |
20 public: | 20 public: |
21 TrustStoreCollection(); | 21 TrustStoreCollection(); |
22 ~TrustStoreCollection() override; | 22 ~TrustStoreCollection() override; |
23 | 23 |
24 // Includes results from |store| in the combined output. |store| must | 24 // Includes results from |store| in the combined output. |store| must |
25 // outlive the TrustStoreCollection. | 25 // outlive the TrustStoreCollection. |
26 void AddTrustStore(TrustStore* store); | 26 void AddTrustStore(TrustStore* store); |
27 | 27 |
28 // TrustStore implementation: | 28 // TrustStore implementation: |
29 void FindTrustAnchorsForCert(const scoped_refptr<ParsedCertificate>& cert, | 29 void FindIssuers(const scoped_refptr<ParsedCertificate>& cert, |
30 TrustAnchors* matches) const override; | 30 TrustAnchors* trust_anchors, |
| 31 ParsedCertificateList* intermediates) const override; |
| 32 bool IsBlacklisted( |
| 33 const scoped_refptr<ParsedCertificate>& cert) const override; |
31 | 34 |
32 private: | 35 private: |
33 std::vector<TrustStore*> stores_; | 36 std::vector<TrustStore*> stores_; |
34 | 37 |
35 DISALLOW_COPY_AND_ASSIGN(TrustStoreCollection); | 38 DISALLOW_COPY_AND_ASSIGN(TrustStoreCollection); |
36 }; | 39 }; |
37 | 40 |
38 } // namespace net | 41 } // namespace net |
39 | 42 |
40 #endif // NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_ | 43 #endif // NET_CERT_INTERNAL_TRUST_STORE_COLLECTION_H_ |
OLD | NEW |