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

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

Issue 2126803004: WIP: NSS trust store integration for path builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert-command-line-path-builder-add_certpathbuilder
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_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/cert_issuer_source.h"
11 #include "net/cert/internal/trust_store.h"
12
13 namespace base {
14 class TaskRunner;
15 }
16
17 namespace net {
18
19 // TrustStoreNSS is an implementation of TrustStore and CertIssuerSource which
20 // provides uses NSS to do trust checks and to provide certificates (both
21 // intermediates and roots) from the NSS DB for path building.
22 class NET_EXPORT TrustStoreNSS : public TrustStore {
23 public:
24 // Creates a TrustStoreNSS. All NSS calls will be done on |nss_task_runner|.
25 explicit TrustStoreNSS(scoped_refptr<base::TaskRunner> nss_task_runner);
26 ~TrustStoreNSS() override;
27
28 // TrustStore implementation:
29 void IsTrustedCertificate(
30 scoped_refptr<ParsedCertificate> cert,
31 const TrustCallback& callback,
32 bool* out_trusted,
33 std::unique_ptr<TrustStore::Request>* out_req) const override;
34
35 // CertIssuerSource implementation:
36 void SyncGetIssuersOf(const ParsedCertificate* cert,
37 ParsedCertificateList* issuers) override;
38 void AsyncGetIssuersOf(
39 scoped_refptr<ParsedCertificate> cert,
40 const IssuerCallback& callback,
41 std::unique_ptr<CertIssuerSource::Request>* out_req) override;
42
43 private:
44 scoped_refptr<base::TaskRunner> nss_task_runner_;
45
46 DISALLOW_COPY_AND_ASSIGN(TrustStoreNSS);
47 };
48
49 } // namespace net
50
51 #endif // NET_CERT_INTERNAL_TRUST_STORE_NSS_H_
OLDNEW
« no previous file with comments | « net/cert/internal/trust_store_collection_unittest.cc ('k') | net/cert/internal/trust_store_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698