#include "quiche/quic/test_tools/fake_proof_source.h"
#include <memory>
#include <string>
#include <utility>
#include "absl/strings/string_view.h"
#include "quiche/quic/platform/api/quic_logging.h"
#include "quiche/quic/test_tools/crypto_test_utils.h"
namespace quic {
namespace test {
FakeProofSource::FakeProofSource()
: … { … }
FakeProofSource::~FakeProofSource() { … }
FakeProofSource::PendingOp::~PendingOp() = default;
FakeProofSource::GetProofOp::GetProofOp(
const QuicSocketAddress& server_addr,
const QuicSocketAddress& client_address, std::string hostname,
std::string server_config, QuicTransportVersion transport_version,
std::string chlo_hash, std::unique_ptr<ProofSource::Callback> callback,
ProofSource* delegate)
: … { … }
FakeProofSource::GetProofOp::~GetProofOp() = default;
void FakeProofSource::GetProofOp::Run() { … }
FakeProofSource::ComputeSignatureOp::ComputeSignatureOp(
const QuicSocketAddress& server_address,
const QuicSocketAddress& client_address, std::string hostname,
uint16_t sig_alg, absl::string_view in,
std::unique_ptr<ProofSource::SignatureCallback> callback,
ProofSource* delegate)
: … { … }
FakeProofSource::ComputeSignatureOp::~ComputeSignatureOp() = default;
void FakeProofSource::ComputeSignatureOp::Run() { … }
void FakeProofSource::Activate() { … }
void FakeProofSource::GetProof(
const QuicSocketAddress& server_address,
const QuicSocketAddress& client_address, const std::string& hostname,
const std::string& server_config, QuicTransportVersion transport_version,
absl::string_view chlo_hash,
std::unique_ptr<ProofSource::Callback> callback) { … }
quiche::QuicheReferenceCountedPointer<ProofSource::Chain>
FakeProofSource::GetCertChain(const QuicSocketAddress& server_address,
const QuicSocketAddress& client_address,
const std::string& hostname,
bool* cert_matched_sni) { … }
void FakeProofSource::ComputeTlsSignature(
const QuicSocketAddress& server_address,
const QuicSocketAddress& client_address, const std::string& hostname,
uint16_t signature_algorithm, absl::string_view in,
std::unique_ptr<ProofSource::SignatureCallback> callback) { … }
absl::InlinedVector<uint16_t, 8>
FakeProofSource::SupportedTlsSignatureAlgorithms() const { … }
ProofSource::TicketCrypter* FakeProofSource::GetTicketCrypter() { … }
void FakeProofSource::SetTicketCrypter(
std::unique_ptr<TicketCrypter> ticket_crypter) { … }
int FakeProofSource::NumPendingCallbacks() const { … }
void FakeProofSource::InvokePendingCallback(int n) { … }
}
}