#include <openssl/ssl.h>
#include <assert.h>
#include <string.h>
#include <algorithm>
#include <tuple>
#include <openssl/aead.h>
#include <openssl/bytestring.h>
#include <openssl/digest.h>
#include <openssl/err.h>
#include <openssl/hpke.h>
#include <openssl/mem.h>
#include <openssl/rand.h>
#include <openssl/stack.h>
#include "../crypto/internal.h"
#include "internal.h"
BSSL_NAMESPACE_BEGIN
static const uint8_t kZeroes[EVP_MAX_MD_SIZE] = …;
static const int32_t kMaxTicketAgeSkewSeconds = …;
static bool resolve_ecdhe_secret(SSL_HANDSHAKE *hs,
const SSL_CLIENT_HELLO *client_hello) { … }
static int ssl_ext_supported_versions_add_serverhello(SSL_HANDSHAKE *hs,
CBB *out) { … }
static const SSL_CIPHER *choose_tls13_cipher(
const SSL *ssl, const SSL_CLIENT_HELLO *client_hello) { … }
static bool add_new_session_tickets(SSL_HANDSHAKE *hs, bool *out_sent_tickets) { … }
static bool check_credential(SSL_HANDSHAKE *hs, const SSL_CREDENTIAL *cred,
uint16_t *out_sigalg) { … }
static enum ssl_hs_wait_t do_select_parameters(SSL_HANDSHAKE *hs) { … }
static enum ssl_ticket_aead_result_t select_session(
SSL_HANDSHAKE *hs, uint8_t *out_alert, UniquePtr<SSL_SESSION> *out_session,
int32_t *out_ticket_age_skew, bool *out_offered_ticket,
const SSLMessage &msg, const SSL_CLIENT_HELLO *client_hello) { … }
static bool quic_ticket_compatible(const SSL_SESSION *session,
const SSL_CONFIG *config) { … }
static enum ssl_hs_wait_t do_select_session(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_send_hello_retry_request(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_read_second_client_hello(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_send_server_hello(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_send_server_certificate_verify(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_send_server_finished(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_send_half_rtt_ticket(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_read_second_client_flight(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_process_end_of_early_data(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_read_client_encrypted_extensions(
SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_read_client_certificate(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_read_client_certificate_verify(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_read_channel_id(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_read_client_finished(SSL_HANDSHAKE *hs) { … }
static enum ssl_hs_wait_t do_send_new_session_ticket(SSL_HANDSHAKE *hs) { … }
enum ssl_hs_wait_t tls13_server_handshake(SSL_HANDSHAKE *hs) { … }
const char *tls13_server_handshake_state(SSL_HANDSHAKE *hs) { … }
BSSL_NAMESPACE_END