verify_using_path_builder.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #ifndef NET_TOOLS_CERT_VERIFY_TOOL_VERIFY_USING_PATH_BUILDER_H_
  5. #define NET_TOOLS_CERT_VERIFY_TOOL_VERIFY_USING_PATH_BUILDER_H_
  6. #include <vector>
  7. #include "base/memory/ref_counted.h"
  8. namespace base {
  9. class FilePath;
  10. class Time;
  11. }
  12. namespace net {
  13. class CertNetFetcher;
  14. class SystemTrustStore;
  15. }
  16. struct CertInput;
  17. // Verifies |target_der_cert| using CertPathBuilder. Returns true if the
  18. // certificate verified successfully, false if it failed to verify or there was
  19. // some other error.
  20. // Informational messages will be printed to stdout/stderr as appropriate.
  21. bool VerifyUsingPathBuilder(
  22. const CertInput& target_der_cert,
  23. const std::vector<CertInput>& intermediate_der_certs,
  24. const std::vector<CertInput>& root_der_certs,
  25. const base::Time at_time,
  26. const base::FilePath& dump_prefix_path,
  27. scoped_refptr<net::CertNetFetcher> cert_net_fetcher,
  28. net::SystemTrustStore* system_trust_store);
  29. #endif // NET_TOOLS_CERT_VERIFY_TOOL_VERIFY_USING_PATH_BUILDER_H_