• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium Authors
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_CERT_VERIFY_PROC_BUILTIN_H_
6 #define NET_CERT_CERT_VERIFY_PROC_BUILTIN_H_
7 
8 #include <memory>
9 #include <optional>
10 
11 #include "base/memory/scoped_refptr.h"
12 #include "base/time/time.h"
13 #include "components/network_time/time_tracker/time_tracker.h"
14 #include "net/base/net_export.h"
15 #include "net/cert/cert_verify_proc.h"
16 
17 namespace net {
18 
19 class CertNetFetcher;
20 class CRLSet;
21 class CTPolicyEnforcer;
22 class CTVerifier;
23 class SystemTrustStore;
24 
25 // TODO(crbug.com/41276779): This is not how other cert_verify_proc_*.h are
26 // implemented -- they expose the type in the header. Use a consistent style
27 // here too.
28 NET_EXPORT scoped_refptr<CertVerifyProc> CreateCertVerifyProcBuiltin(
29     scoped_refptr<CertNetFetcher> net_fetcher,
30     scoped_refptr<CRLSet> crl_set,
31     std::unique_ptr<CTVerifier> ct_verifier,
32     scoped_refptr<CTPolicyEnforcer> ct_policy_enforcer,
33     std::unique_ptr<SystemTrustStore> system_trust_store,
34     const CertVerifyProc::InstanceParams& instance_params,
35     std::optional<network_time::TimeTracker> time_tracker);
36 
37 // Returns the time limit used by CertVerifyProcBuiltin. Intended for test use.
38 NET_EXPORT_PRIVATE base::TimeDelta
39 GetCertVerifyProcBuiltinTimeLimitForTesting();
40 
41 }  // namespace net
42 
43 #endif  // NET_CERT_CERT_VERIFY_PROC_BUILTIN_H_
44