#include "quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier.h"
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/strings/escaping.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_replace.h"
#include "absl/strings/string_view.h"
#include "openssl/sha.h"
#include "quiche/quic/core/crypto/certificate_view.h"
#include "quiche/quic/core/quic_time.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_utils.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_logging.h"
#include "quiche/common/quiche_text_utils.h"
namespace quic {
namespace {
constexpr size_t kFingerprintLength = …;
bool IsNormalizedHexDigit(char c) { … }
void NormalizeFingerprint(CertificateFingerprint& fingerprint) { … }
}
constexpr char CertificateFingerprint::kSha256[];
constexpr char WebTransportHash::kSha256[];
ProofVerifyDetails* WebTransportFingerprintProofVerifier::Details::Clone()
const { … }
WebTransportFingerprintProofVerifier::WebTransportFingerprintProofVerifier(
const QuicClock* clock, int max_validity_days)
: … { … }
bool WebTransportFingerprintProofVerifier::AddFingerprint(
CertificateFingerprint fingerprint) { … }
bool WebTransportFingerprintProofVerifier::AddFingerprint(
WebTransportHash hash) { … }
QuicAsyncStatus WebTransportFingerprintProofVerifier::VerifyProof(
const std::string& , const uint16_t ,
const std::string& ,
QuicTransportVersion , absl::string_view ,
const std::vector<std::string>& , const std::string& ,
const std::string& , const ProofVerifyContext* ,
std::string* error_details, std::unique_ptr<ProofVerifyDetails>* details,
std::unique_ptr<ProofVerifierCallback> ) { … }
QuicAsyncStatus WebTransportFingerprintProofVerifier::VerifyCertChain(
const std::string& , const uint16_t ,
const std::vector<std::string>& certs, const std::string& ,
const std::string& , const ProofVerifyContext* ,
std::string* error_details, std::unique_ptr<ProofVerifyDetails>* details,
uint8_t* ,
std::unique_ptr<ProofVerifierCallback> ) { … }
std::unique_ptr<ProofVerifyContext>
WebTransportFingerprintProofVerifier::CreateDefaultContext() { … }
bool WebTransportFingerprintProofVerifier::HasKnownFingerprint(
absl::string_view der_certificate) { … }
bool WebTransportFingerprintProofVerifier::HasValidExpiry(
const CertificateView& certificate) { … }
bool WebTransportFingerprintProofVerifier::IsWithinValidityPeriod(
const CertificateView& certificate) { … }
bool WebTransportFingerprintProofVerifier::IsKeyTypeAllowedByPolicy(
const CertificateView& certificate) { … }
}