#include "parse_certificate.h"
#include <optional>
#include <utility>
#include <openssl/base.h>
#include <openssl/bytestring.h>
#include "cert_error_params.h"
#include "cert_errors.h"
#include "general_names.h"
#include "input.h"
#include "parse_values.h"
#include "parser.h"
#include "string_util.h"
BSSL_NAMESPACE_BEGIN
namespace …
ParsedTbsCertificate::ParsedTbsCertificate() = default;
ParsedTbsCertificate::ParsedTbsCertificate(ParsedTbsCertificate &&other) =
default;
ParsedTbsCertificate::~ParsedTbsCertificate() = default;
bool VerifySerialNumber(der::Input value, bool warnings_only,
CertErrors *errors) { … }
bool ReadUTCOrGeneralizedTime(der::Parser *parser, der::GeneralizedTime *out) { … }
bool ParseValidity(der::Input validity_tlv, der::GeneralizedTime *not_before,
der::GeneralizedTime *not_after) { … }
bool ParseCertificate(der::Input certificate_tlv,
der::Input *out_tbs_certificate_tlv,
der::Input *out_signature_algorithm_tlv,
der::BitString *out_signature_value,
CertErrors *out_errors) { … }
bool ParseTbsCertificate(der::Input tbs_tlv,
const ParseCertificateOptions &options,
ParsedTbsCertificate *out, CertErrors *errors) { … }
bool ParseExtension(der::Input extension_tlv, ParsedExtension *out) { … }
OPENSSL_EXPORT bool ParseExtensions(
der::Input extensions_tlv,
std::map<der::Input, ParsedExtension> *extensions) { … }
OPENSSL_EXPORT bool ConsumeExtension(
der::Input oid,
std::map<der::Input, ParsedExtension> *unconsumed_extensions,
ParsedExtension *extension) { … }
bool ParseBasicConstraints(der::Input basic_constraints_tlv,
ParsedBasicConstraints *out) { … }
bool ParseKeyUsage(der::Input key_usage_tlv, der::BitString *key_usage) { … }
bool ParseAuthorityInfoAccess(
der::Input authority_info_access_tlv,
std::vector<AuthorityInfoAccessDescription> *out_access_descriptions) { … }
bool ParseAuthorityInfoAccessURIs(
der::Input authority_info_access_tlv,
std::vector<std::string_view> *out_ca_issuers_uris,
std::vector<std::string_view> *out_ocsp_uris) { … }
ParsedDistributionPoint::ParsedDistributionPoint() = default;
ParsedDistributionPoint::ParsedDistributionPoint(
ParsedDistributionPoint &&other) = default;
ParsedDistributionPoint::~ParsedDistributionPoint() = default;
bool ParseCrlDistributionPoints(
der::Input extension_value,
std::vector<ParsedDistributionPoint> *distribution_points) { … }
ParsedAuthorityKeyIdentifier::ParsedAuthorityKeyIdentifier() = default;
ParsedAuthorityKeyIdentifier::~ParsedAuthorityKeyIdentifier() = default;
ParsedAuthorityKeyIdentifier::ParsedAuthorityKeyIdentifier(
ParsedAuthorityKeyIdentifier &&other) = default;
ParsedAuthorityKeyIdentifier &ParsedAuthorityKeyIdentifier::operator=(
ParsedAuthorityKeyIdentifier &&other) = default;
bool ParseAuthorityKeyIdentifier(
der::Input extension_value,
ParsedAuthorityKeyIdentifier *authority_key_identifier) { … }
bool ParseSubjectKeyIdentifier(der::Input extension_value,
der::Input *subject_key_identifier) { … }
BSSL_NAMESPACE_END