#include "quiche/quic/core/tls_chlo_extractor.h"
#include <cstdint>
#include <cstring>
#include <memory>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "openssl/ssl.h"
#include "quiche/quic/core/frames/quic_crypto_frame.h"
#include "quiche/quic/core/quic_data_reader.h"
#include "quiche/quic/core/quic_error_codes.h"
#include "quiche/quic/core/quic_framer.h"
#include "quiche/quic/core/quic_time.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_versions.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_flag_utils.h"
#include "quiche/quic/platform/api/quic_flags.h"
#include "quiche/common/platform/api/quiche_logging.h"
namespace quic {
namespace {
bool HasExtension(const SSL_CLIENT_HELLO* client_hello, uint16_t extension) { … }
std::vector<uint16_t> GetSupportedGroups(const SSL_CLIENT_HELLO* client_hello) { … }
std::vector<uint16_t> GetCertCompressionAlgos(
const SSL_CLIENT_HELLO* client_hello) { … }
}
TlsChloExtractor::TlsChloExtractor()
: … { … }
TlsChloExtractor::TlsChloExtractor(TlsChloExtractor&& other)
: … { … }
TlsChloExtractor& TlsChloExtractor::operator=(TlsChloExtractor&& other) { … }
void TlsChloExtractor::IngestPacket(const ParsedQuicVersion& version,
const QuicReceivedPacket& packet) { … }
bool TlsChloExtractor::OnUnauthenticatedPublicHeader(
const QuicPacketHeader& header) { … }
bool TlsChloExtractor::OnProtocolVersionMismatch(ParsedQuicVersion version) { … }
void TlsChloExtractor::OnUnrecoverableError(QuicErrorCode error,
const std::string& details) { … }
void TlsChloExtractor::OnUnrecoverableError(
QuicErrorCode error, QuicIetfTransportErrorCodes ietf_error,
const std::string& details) { … }
bool TlsChloExtractor::OnCryptoFrame(const QuicCryptoFrame& frame) { … }
void TlsChloExtractor::OnDataAvailable() { … }
TlsChloExtractor* TlsChloExtractor::GetInstanceFromSSL(SSL* ssl) { … }
int TlsChloExtractor::SetReadSecretCallback(
SSL* ssl, enum ssl_encryption_level_t ,
const SSL_CIPHER* , const uint8_t* ,
size_t ) { … }
int TlsChloExtractor::SetWriteSecretCallback(
SSL* ssl, enum ssl_encryption_level_t ,
const SSL_CIPHER* , const uint8_t* ,
size_t ) { … }
int TlsChloExtractor::WriteMessageCallback(
SSL* ssl, enum ssl_encryption_level_t , const uint8_t* ,
size_t ) { … }
int TlsChloExtractor::FlushFlightCallback(SSL* ssl) { … }
void TlsChloExtractor::HandleUnexpectedCallback(
const std::string& callback_name) { … }
int TlsChloExtractor::SendAlertCallback(SSL* ssl,
enum ssl_encryption_level_t ,
uint8_t desc) { … }
void TlsChloExtractor::SendAlert(uint8_t tls_alert_value) { … }
enum ssl_select_cert_result_t TlsChloExtractor::SelectCertCallback(
const SSL_CLIENT_HELLO* client_hello) { … }
void TlsChloExtractor::HandleParsedChlo(const SSL_CLIENT_HELLO* client_hello) { … }
std::pair<SSL_CTX*, int> TlsChloExtractor::GetSharedSslHandles() { … }
void TlsChloExtractor::SetupSslHandle() { … }
void TlsChloExtractor::HandleUnrecoverableError(
const std::string& error_details) { … }
std::string TlsChloExtractor::StateToString(State state) { … }
std::ostream& operator<<(std::ostream& os,
const TlsChloExtractor::State& state) { … }
}