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_NSS_H_ | 5 #ifndef NET_CERT_INTERNAL_TRUST_STORE_NSS_H_ |
6 #define NET_CERT_INTERNAL_TRUST_STORE_NSS_H_ | 6 #define NET_CERT_INTERNAL_TRUST_STORE_NSS_H_ |
7 | 7 |
8 #include <certt.h> | 8 #include <certt.h> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
12 #include "net/cert/internal/trust_store.h" | 12 #include "net/cert/internal/trust_store.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 // TrustStoreNSS is an implementation of TrustStore which uses NSS to find trust | 16 // TrustStoreNSS is an implementation of TrustStore which uses NSS to find trust |
17 // anchors for path building. | 17 // anchors for path building. |
18 class NET_EXPORT TrustStoreNSS : public TrustStore { | 18 class NET_EXPORT TrustStoreNSS : public TrustStore { |
19 public: | 19 public: |
20 // Creates a TrustStoreNSS which will find anchors that are trusted for | 20 // Creates a TrustStoreNSS which will find anchors that are trusted for |
21 // |trust_type|. | 21 // |trust_type|. |
22 explicit TrustStoreNSS(SECTrustType trust_type); | 22 explicit TrustStoreNSS(SECTrustType trust_type); |
23 ~TrustStoreNSS() override; | 23 ~TrustStoreNSS() override; |
24 | 24 |
| 25 // CertIssuerSource implementation: |
| 26 void SyncGetIssuersOf(const ParsedCertificate* cert, |
| 27 ParsedCertificateList* issuers) override; |
| 28 |
25 // TrustStore implementation: | 29 // TrustStore implementation: |
26 void FindTrustAnchorsForCert(const scoped_refptr<ParsedCertificate>& cert, | 30 void GetTrust(const scoped_refptr<ParsedCertificate>& cert, |
27 TrustAnchors* matches) const override; | 31 CertificateTrust* trust) const override; |
28 | 32 |
29 private: | 33 private: |
30 SECTrustType trust_type_; | 34 SECTrustType trust_type_; |
31 | 35 |
32 DISALLOW_COPY_AND_ASSIGN(TrustStoreNSS); | 36 DISALLOW_COPY_AND_ASSIGN(TrustStoreNSS); |
33 }; | 37 }; |
34 | 38 |
35 } // namespace net | 39 } // namespace net |
36 | 40 |
37 #endif // NET_CERT_INTERNAL_TRUST_STORE_NSS_H_ | 41 #endif // NET_CERT_INTERNAL_TRUST_STORE_NSS_H_ |
OLD | NEW |