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