OLD | NEW |
---|---|
(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_NSS_H_ | |
6 #define NET_CERT_INTERNAL_TRUST_STORE_NSS_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 // TrustStoreNSS is an implementation of TrustStore which uses NSS to find trust | |
19 // anchors for path building. | |
20 // TODO(mattm): also implement CertIssuerSource to return intermediates in NSS | |
21 // DB? Or have a separate CertIssuerSourceNSS for that? (implementing both in | |
22 // the same class could be more efficient with some caching/etc. Need to be | |
23 // careful about caching between different pathbuilder instances though.) | |
24 class NET_EXPORT TrustStoreNSS : public TrustStore { | |
eroman
2016/08/27 01:53:39
I have never understood if we are supposed to type
mattm
2016/08/29 20:38:17
I think the style guide says Nss, but in Chromium
| |
25 public: | |
26 // Creates a TrustStoreNSS. All NSS calls will be done on |nss_task_runner|. | |
27 explicit TrustStoreNSS(scoped_refptr<base::TaskRunner> nss_task_runner); | |
28 ~TrustStoreNSS() override; | |
29 | |
30 // TrustStore implementation: | |
31 void FindTrustAnchorsForCert( | |
32 scoped_refptr<ParsedCertificate> cert, | |
33 const TrustAnchorsCallback& callback, | |
34 TrustAnchors* synchronous_matches, | |
35 std::unique_ptr<Request>* out_req) const override; | |
36 | |
37 private: | |
38 scoped_refptr<base::TaskRunner> nss_task_runner_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(TrustStoreNSS); | |
41 }; | |
42 | |
43 } // namespace net | |
44 | |
45 #endif // NET_CERT_INTERNAL_TRUST_STORE_NSS_H_ | |
OLD | NEW |