#include "quiche/quic/core/quic_crypto_server_stream.h"
#include <memory>
#include <string>
#include <utility>
#include "absl/base/macros.h"
#include "absl/strings/string_view.h"
#include "openssl/sha.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/platform/api/quic_flag_utils.h"
#include "quiche/quic/platform/api/quic_testvalue.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/quiche_text_utils.h"
namespace quic {
class QuicCryptoServerStream::ProcessClientHelloCallback
: public ProcessClientHelloResultCallback { … };
QuicCryptoServerStream::QuicCryptoServerStream(
const QuicCryptoServerConfig* crypto_config,
QuicCompressedCertsCache* compressed_certs_cache, QuicSession* session,
QuicCryptoServerStreamBase::Helper* helper)
: … { … }
QuicCryptoServerStream::~QuicCryptoServerStream() { … }
void QuicCryptoServerStream::CancelOutstandingCallbacks() { … }
void QuicCryptoServerStream::OnHandshakeMessage(
const CryptoHandshakeMessage& message) { … }
void QuicCryptoServerStream::FinishProcessingHandshakeMessage(
quiche::QuicheReferenceCountedPointer<
ValidateClientHelloResultCallback::Result>
result,
std::unique_ptr<ProofSource::Details> details) { … }
void QuicCryptoServerStream::
FinishProcessingHandshakeMessageAfterProcessClientHello(
const ValidateClientHelloResultCallback::Result& result,
QuicErrorCode error, const std::string& error_details,
std::unique_ptr<CryptoHandshakeMessage> reply,
std::unique_ptr<DiversificationNonce> diversification_nonce,
std::unique_ptr<ProofSource::Details> proof_source_details) { … }
void QuicCryptoServerStream::SendServerConfigUpdate(
const CachedNetworkParameters* cached_network_params) { … }
QuicCryptoServerStream::SendServerConfigUpdateCallback::
SendServerConfigUpdateCallback(QuicCryptoServerStream* parent)
: … { … }
void QuicCryptoServerStream::SendServerConfigUpdateCallback::Cancel() { … }
void QuicCryptoServerStream::SendServerConfigUpdateCallback::Run(
bool ok, const CryptoHandshakeMessage& message) { … }
void QuicCryptoServerStream::FinishSendServerConfigUpdate(
bool ok, const CryptoHandshakeMessage& message) { … }
bool QuicCryptoServerStream::DisableResumption() { … }
bool QuicCryptoServerStream::IsZeroRtt() const { … }
bool QuicCryptoServerStream::IsResumption() const { … }
int QuicCryptoServerStream::NumServerConfigUpdateMessagesSent() const { … }
const CachedNetworkParameters*
QuicCryptoServerStream::PreviousCachedNetworkParams() const { … }
bool QuicCryptoServerStream::ResumptionAttempted() const { … }
bool QuicCryptoServerStream::EarlyDataAttempted() const { … }
void QuicCryptoServerStream::SetPreviousCachedNetworkParams(
CachedNetworkParameters cached_network_params) { … }
void QuicCryptoServerStream::OnPacketDecrypted(EncryptionLevel level) { … }
void QuicCryptoServerStream::OnHandshakeDoneReceived() { … }
void QuicCryptoServerStream::OnNewTokenReceived(absl::string_view ) { … }
std::string QuicCryptoServerStream::GetAddressToken(
const CachedNetworkParameters* ) const { … }
bool QuicCryptoServerStream::ValidateAddressToken(
absl::string_view ) const { … }
bool QuicCryptoServerStream::ShouldSendExpectCTHeader() const { … }
bool QuicCryptoServerStream::DidCertMatchSni() const { … }
const ProofSource::Details* QuicCryptoServerStream::ProofSourceDetails() const { … }
bool QuicCryptoServerStream::GetBase64SHA256ClientChannelID(
std::string* output) const { … }
ssl_early_data_reason_t QuicCryptoServerStream::EarlyDataReason() const { … }
bool QuicCryptoServerStream::encryption_established() const { … }
bool QuicCryptoServerStream::one_rtt_keys_available() const { … }
const QuicCryptoNegotiatedParameters&
QuicCryptoServerStream::crypto_negotiated_params() const { … }
CryptoMessageParser* QuicCryptoServerStream::crypto_message_parser() { … }
HandshakeState QuicCryptoServerStream::GetHandshakeState() const { … }
void QuicCryptoServerStream::SetServerApplicationStateForResumption(
std::unique_ptr<ApplicationState> ) { … }
size_t QuicCryptoServerStream::BufferSizeLimitForLevel(
EncryptionLevel level) const { … }
std::unique_ptr<QuicDecrypter>
QuicCryptoServerStream::AdvanceKeysAndCreateCurrentOneRttDecrypter() { … }
std::unique_ptr<QuicEncrypter>
QuicCryptoServerStream::CreateCurrentOneRttEncrypter() { … }
void QuicCryptoServerStream::ProcessClientHello(
quiche::QuicheReferenceCountedPointer<
ValidateClientHelloResultCallback::Result>
result,
std::unique_ptr<ProofSource::Details> proof_source_details,
std::shared_ptr<ProcessClientHelloResultCallback> done_cb) { … }
void QuicCryptoServerStream::OverrideQuicConfigDefaults(
QuicConfig* ) { … }
QuicCryptoServerStream::ValidateCallback::ValidateCallback(
QuicCryptoServerStream* parent)
: … { … }
void QuicCryptoServerStream::ValidateCallback::Cancel() { … }
void QuicCryptoServerStream::ValidateCallback::Run(
quiche::QuicheReferenceCountedPointer<Result> result,
std::unique_ptr<ProofSource::Details> details) { … }
const QuicSocketAddress QuicCryptoServerStream::GetClientAddress() { … }
SSL* QuicCryptoServerStream::GetSsl() const { … }
bool QuicCryptoServerStream::IsCryptoFrameExpectedForEncryptionLevel(
EncryptionLevel ) const { … }
EncryptionLevel
QuicCryptoServerStream::GetEncryptionLevelToSendCryptoDataOfSpace(
PacketNumberSpace space) const { … }
}