chromium/net/tools/cert_verify_tool/cert_verify_tool_util.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/tools/cert_verify_tool/cert_verify_tool_util.h"

#include <iostream>

#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "net/cert/x509_certificate.h"
#include "net/cert/x509_util.h"
#include "third_party/boringssl/src/pki/pem.h"

namespace {

// The PEM block header used for PEM-encoded DER certificates.
const char kCertificateHeader[] =;

// Parses |data_string| as a single DER cert or a PEM certificate list.
// This is an alternative to X509Certificate::CreateFrom[...] which
// is designed to decouple the file input and decoding from the DER Certificate
// parsing.
void ExtractCertificatesFromData(const std::string& data_string,
                                 const base::FilePath& file_path,
                                 std::vector<CertInput>* certs) {}

}  // namespace

bool ReadCertificatesFromFile(const base::FilePath& file_path,
                              std::vector<CertInput>* certs) {}

bool ReadChainFromFile(const base::FilePath& file_path,
                       CertInput* target,
                       std::vector<CertInput>* intermediates) {}

bool ReadFromFile(const base::FilePath& file_path, std::string* file_data) {}

bool WriteToFile(const base::FilePath& file_path, const std::string& data) {}

void PrintCertError(const std::string& error, const CertInput& cert) {}

std::string FingerPrintCryptoBuffer(const CRYPTO_BUFFER* cert_handle) {}

std::string SubjectFromX509Certificate(const net::X509Certificate* cert) {}

std::string SubjectFromCryptoBuffer(CRYPTO_BUFFER* cert_handle) {}