#include "net/tools/cert_verify_tool/verify_using_cert_verify_proc.h"
#include <algorithm>
#include <iostream>
#include <string_view>
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "crypto/sha2.h"
#include "net/base/net_errors.h"
#include "net/cert/cert_verifier.h"
#include "net/cert/cert_verify_proc.h"
#include "net/cert/cert_verify_result.h"
#include "net/cert/test_root_certs.h"
#include "net/cert/x509_certificate.h"
#include "net/cert/x509_util.h"
#include "net/log/net_log_with_source.h"
#include "net/tools/cert_verify_tool/cert_verify_tool_util.h"
namespace {
struct StringToConstant { … };
const StringToConstant kCertStatusFlags[] = …;
bool DumpX509CertificateChain(const base::FilePath& file_path,
const net::X509Certificate* cert) { … }
void PrintCertStatus(int cert_status) { … }
}
void PrintCertVerifyResult(const net::CertVerifyResult& result) { … }
bool VerifyUsingCertVerifyProc(
net::CertVerifyProc* cert_verify_proc,
const CertInput& target_der_cert,
const std::string& hostname,
const std::vector<CertInput>& intermediate_der_certs,
const std::vector<CertInputWithTrustSetting>& der_certs_with_trust_settings,
const base::FilePath& dump_path) { … }