verify_using_cert_verify_proc.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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_CERT_VERIFY_PROC_H_
  5. #define NET_TOOLS_CERT_VERIFY_TOOL_VERIFY_USING_CERT_VERIFY_PROC_H_
  6. #include <string>
  7. #include <vector>
  8. namespace base {
  9. class FilePath;
  10. }
  11. namespace net {
  12. class CertVerifyProc;
  13. class CRLSet;
  14. class CertVerifyResult;
  15. }
  16. struct CertInput;
  17. void PrintCertVerifyResult(const net::CertVerifyResult& result);
  18. // Verifies |target_der_cert| using |cert_verify_proc|. Returns true if the
  19. // certificate verified successfully, false if it failed to verify or there was
  20. // some other error.
  21. // Informational messages will be printed to stdout/stderr as appropriate.
  22. bool VerifyUsingCertVerifyProc(
  23. net::CertVerifyProc* cert_verify_proc,
  24. const CertInput& target_der_cert,
  25. const std::string& hostname,
  26. const std::vector<CertInput>& intermediate_der_certs,
  27. const std::vector<CertInput>& root_der_certs,
  28. net::CRLSet* crl_set,
  29. const base::FilePath& dump_path);
  30. #endif // NET_TOOLS_CERT_VERIFY_TOOL_VERIFY_USING_CERT_VERIFY_PROC_H_