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 #include "net/cert/internal/trust_store_collection.h" | 5 #include "net/cert/internal/trust_store_collection.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 TrustStoreCollection::TrustStoreCollection() = default; | 9 TrustStoreCollection::TrustStoreCollection() = default; |
10 TrustStoreCollection::~TrustStoreCollection() = default; | 10 TrustStoreCollection::~TrustStoreCollection() = default; |
11 | 11 |
12 void TrustStoreCollection::AddTrustStore(TrustStore* store) { | 12 void TrustStoreCollection::AddTrustStore(TrustStore* store) { |
13 DCHECK(store); | 13 DCHECK(store); |
14 stores_.push_back(store); | 14 stores_.push_back(store); |
15 } | 15 } |
16 | 16 |
17 void TrustStoreCollection::FindTrustAnchorsForCert( | 17 void TrustStoreCollection::FindIssuers( |
18 const scoped_refptr<ParsedCertificate>& cert, | 18 const scoped_refptr<ParsedCertificate>& cert, |
19 TrustAnchors* matches) const { | 19 TrustAnchors* trust_anchors, |
| 20 ParsedCertificateList* intermediates) const { |
20 for (auto* store : stores_) { | 21 for (auto* store : stores_) { |
21 store->FindTrustAnchorsForCert(cert, matches); | 22 store->FindIssuers(cert, trust_anchors, intermediates); |
22 } | 23 } |
23 } | 24 } |
24 | 25 |
| 26 bool TrustStoreCollection::IsBlacklisted( |
| 27 const scoped_refptr<ParsedCertificate>& cert) const { |
| 28 for (auto* store : stores_) { |
| 29 if (store->IsBlacklisted(cert)) |
| 30 return true; |
| 31 } |
| 32 return false; |
| 33 } |
| 34 |
25 } // namespace net | 35 } // namespace net |
OLD | NEW |