Go to the documentation of this file.
132 #include "../crypto/internal.h"
146 }
else if (u1 > u2) {
159 size_t num_extensions = 0;
173 if (num_extensions == 0) {
178 if (!extension_types.
Init(num_extensions)) {
184 for (
size_t i = 0;
i < extension_types.
size();
i++) {
198 for (
size_t i = 1;
i < num_extensions;
i++) {
199 if (extension_types[
i - 1] == extension_types[
i]) {
224 out->ssl =
const_cast<SSL *
>(ssl);
227 CBS random, session_id;
253 CBS_len(&compression_methods) < 1) {
259 out->compression_methods =
CBS_data(&compression_methods);
260 out->compression_methods_len =
CBS_len(&compression_methods);
265 out->extensions =
nullptr;
266 out->extensions_len = 0;
296 if (
type == extension_type) {
343 if (pref_group == supp_group &&
348 *out_group_id = pref_group;
359 if (!group_ids.
Init(curves.
size())) {
363 for (
size_t i = 0;
i < curves.
size();
i++) {
376 const char *
ptr = curves, *col;
378 col = strchr(
ptr,
':');
393 col = strchr(
ptr,
':');
395 col ? (
size_t)(col -
ptr) : strlen(
ptr))) {
421 if (supported == group_id) {
493 if (verify_sigalg == sigalg) {
569 CBB *out_compressible,
571 const SSL *
const ssl = hs->
ssl;
613 if (hs->
ssl->
s3->session_reused ||
632 CBB *out_compressible,
722 CBB body, retry_configs;
729 if (!
config->is_retry_config()) {
733 config->ech_config().raw.size())) {
746 CBB *out_compressible,
748 const SSL *
const ssl = hs->
ssl;
755 assert(ssl->
s3->initial_handshake_complete ==
756 (ssl->
s3->previous_client_finished_len != 0));
763 ssl->
s3->previous_client_finished_len) ||
781 if (ssl->
s3->initial_handshake_complete &&
782 (
contents != NULL) != ssl->
s3->send_connection_binding) {
799 const size_t expected_len = ssl->
s3->previous_client_finished_len +
800 ssl->
s3->previous_server_finished_len;
803 assert(!expected_len || ssl->
s3->previous_client_finished_len);
804 assert(!expected_len || ssl->
s3->previous_server_finished_len);
805 assert(ssl->
s3->initial_handshake_complete ==
806 (ssl->
s3->previous_client_finished_len != 0));
807 assert(ssl->
s3->initial_handshake_complete ==
808 (ssl->
s3->previous_server_finished_len != 0));
811 CBS renegotiated_connection;
820 if (
CBS_len(&renegotiated_connection) != expected_len) {
828 ssl->
s3->previous_client_finished_len) == 0;
829 #if defined(BORINGSSL_UNSAFE_FUZZER_MODE)
837 d += ssl->
s3->previous_client_finished_len;
840 ssl->
s3->previous_server_finished_len) == 0;
841 #if defined(BORINGSSL_UNSAFE_FUZZER_MODE)
849 ssl->
s3->send_connection_binding =
true;
859 assert(!ssl->
s3->initial_handshake_complete);
869 CBS renegotiated_connection;
878 if (
CBS_len(&renegotiated_connection) != 0) {
884 ssl->
s3->send_connection_binding =
true;
893 assert(!ssl->
s3->initial_handshake_complete);
914 CBB *out_compressible,
943 if (ssl->
s3->established_session !=
nullptr &&
945 !!ssl->
s3->established_session->extended_master_secret) {
991 CBB *out_compressible,
993 const SSL *
const ssl = hs->
ssl;
1006 if (!ssl->
s3->initial_handshake_complete &&
1008 !ssl->
session->ticket.empty() &&
1011 ticket = ssl->
session->ticket;
1027 SSL *
const ssl = hs->
ssl;
1071 CBB *out_compressible,
1096 CBS supported_signature_algorithms;
1112 CBB *out_compressible,
1133 SSL *
const ssl = hs->
ssl;
1176 SSL *
const ssl = hs->
ssl;
1179 ssl->
s3->session_reused ||
1196 CBB *out_compressible,
1198 const SSL *
const ssl = hs->
ssl;
1199 if (ssl->
ctx->next_proto_select_cb == NULL ||
1201 ssl->
s3->initial_handshake_complete ||
1218 SSL *
const ssl = hs->
ssl;
1230 assert(!ssl->
s3->initial_handshake_complete);
1232 assert(ssl->
ctx->next_proto_select_cb != NULL);
1234 if (!ssl->
s3->alpn_selected.empty()) {
1254 if (ssl->
ctx->next_proto_select_cb(
1255 ssl, &selected, &selected_len, orig_contents, orig_len,
1257 !ssl->
s3->next_proto_negotiated.CopyFrom(
1269 SSL *
const ssl = hs->
ssl;
1279 ssl->
s3->initial_handshake_complete ||
1280 ssl->
ctx->next_protos_advertised_cb == NULL ||
1290 SSL *
const ssl = hs->
ssl;
1300 if (ssl->
ctx->next_protos_advertised_cb(
1301 ssl, &npa, &npa_len, ssl->
ctx->next_protos_advertised_cb_arg) !=
1324 CBB *out_compressible,
1340 SSL *
const ssl = hs->
ssl;
1365 if (!ssl->
s3->session_reused) {
1366 hs->
new_session->signed_cert_timestamp_list.reset(
1368 if (hs->
new_session->signed_cert_timestamp_list ==
nullptr) {
1392 SSL *
const ssl = hs->
ssl;
1395 hs->
config->
cert->signed_cert_timestamp_list == NULL) {
1405 hs->
config->
cert->signed_cert_timestamp_list.get()),
1407 hs->
config->
cert->signed_cert_timestamp_list.get())) &&
1417 CBB *out_compressible,
1419 const SSL *
const ssl = hs->
ssl;
1427 ssl->
s3->initial_handshake_complete) {
1447 SSL *
const ssl = hs->
ssl;
1458 assert(!ssl->
s3->initial_handshake_complete);
1470 CBS protocol_name_list, protocol_name;
1475 CBS_len(&protocol_name) == 0 ||
1476 CBS_len(&protocol_name_list) != 0) {
1486 if (!ssl->
s3->alpn_selected.CopyFrom(protocol_name)) {
1495 CBS protocol_name_list =
in;
1496 if (
CBS_len(&protocol_name_list) == 0) {
1499 while (
CBS_len(&protocol_name_list) > 0) {
1503 CBS_len(&protocol_name) == 0) {
1516 if (hs->
ssl->
ctx->allow_unknown_alpn_protos) {
1521 CBS client_protocol_name_list =
1523 client_protocol_name;
1524 while (
CBS_len(&client_protocol_name_list) > 0) {
1526 &client_protocol_name)) {
1530 if (client_protocol_name ==
protocol) {
1540 SSL *
const ssl = hs->
ssl;
1542 if (ssl->
ctx->alpn_select_cb == NULL ||
1559 CBS protocol_name_list;
1570 int ret = ssl->
ctx->alpn_select_cb(
1571 ssl, &selected, &selected_len,
CBS_data(&protocol_name_list),
1572 CBS_len(&protocol_name_list), ssl->
ctx->alpn_select_cb_arg);
1580 if (selected_len == 0) {
1585 if (!ssl->
s3->alpn_selected.CopyFrom(
1609 SSL *
const ssl = hs->
ssl;
1610 if (ssl->
s3->alpn_selected.empty()) {
1620 ssl->
s3->alpn_selected.size()) ||
1634 CBB *out_compressible,
1636 const SSL *
const ssl = hs->
ssl;
1679 SSL *
const ssl = hs->
ssl;
1711 CBB *out_compressible,
1713 const SSL *
const ssl = hs->
ssl;
1716 if (profiles == NULL ||
1745 SSL *
const ssl = hs->
ssl;
1755 CBS profile_ids, srtp_mki;
1766 if (
CBS_len(&srtp_mki) != 0) {
1775 if (
profile->id == profile_id) {
1788 SSL *
const ssl = hs->
ssl;
1794 CBS profile_ids, srtp_mki;
1809 CBS profile_ids_tmp;
1812 while (
CBS_len(&profile_ids_tmp) > 0) {
1814 if (!
CBS_get_u16(&profile_ids_tmp, &profile_id)) {
1818 if (server_profile->id == profile_id) {
1819 ssl->
s3->srtp_profile = server_profile;
1829 SSL *
const ssl = hs->
ssl;
1830 if (ssl->
s3->srtp_profile == NULL) {
1867 CBB *out_compressible,
1887 CBS ec_point_format_list;
1897 CBS_len(&ec_point_format_list)) == NULL) {
1915 SSL *
const ssl = hs->
ssl;
1938 const SSL *
const ssl = hs->
ssl;
1952 if (ssl->
s3->used_hello_retry_request &&
1962 const SSL *
const ssl = hs->
ssl;
1968 return 15 + ssl->
session->ticket.size() + binder_len;
1972 CBB *
out,
bool *out_needs_binder,
1974 const SSL *
const ssl = hs->
ssl;
1975 *out_needs_binder =
false;
1983 uint32_t obfuscated_ticket_age = ticket_age + ssl->
session->ticket_age_add;
1995 ssl->
session->ticket.size()) ||
2003 *out_needs_binder =
true;
2042 CBS identities, binders;
2045 !
CBS_get_u32(&identities, out_obfuscated_ticket_age) ||
2054 *out_binders = binders;
2057 size_t num_identities = 1;
2058 while (
CBS_len(&identities) != 0) {
2060 uint32_t unused_obfuscated_ticket_age;
2062 !
CBS_get_u32(&identities, &unused_obfuscated_ticket_age)) {
2073 size_t num_binders = 0;
2074 while (
CBS_len(&binders) != 0) {
2085 if (num_identities != num_binders) {
2095 if (!hs->
ssl->
s3->session_reused) {
2162 CBB *out_compressible,
2164 const SSL *
const ssl = hs->
ssl;
2167 if (ssl->
s3->used_hello_retry_request) {
2192 SSL *
const ssl = hs->
ssl;
2195 ssl->
s3->early_data_reason = ssl->
s3->session_reused
2209 assert(!ssl->
s3->used_hello_retry_request);
2216 if (!ssl->
s3->session_reused) {
2223 ssl->
s3->early_data_accepted =
true;
2229 SSL *
const ssl = hs->
ssl;
2245 if (!hs->
ssl->
s3->early_data_accepted) {
2264 SSL *
const ssl = hs->
ssl;
2273 bssl::ScopedCBB cbb;
2278 if (override_group_id == 0 && ssl->
ctx->grease_enabled) {
2287 uint16_t group_id = override_group_id;
2289 if (override_group_id == 0) {
2302 second_group_id =
groups[1];
2303 assert(second_group_id != group_id);
2316 if (second_group_id != 0) {
2330 CBB *out_compressible,
2364 if (key_share->
GroupID() != group_id) {
2373 if (!key_share->
Finish(out_secret, out_alert, peer_key)) {
2408 while (
CBS_len(&key_shares) > 0) {
2413 CBS_len(&peer_key_tmp) == 0) {
2418 if (
id == group_id) {
2419 if (
CBS_len(&peer_key) != 0) {
2425 peer_key = peer_key_tmp;
2430 if (out_peer_key !=
nullptr) {
2431 *out_peer_key = peer_key;
2433 *out_found =
CBS_len(&peer_key) != 0;
2459 const SSL *
const ssl = hs->
ssl;
2467 out = out_compressible;
2478 if (ssl->
ctx->grease_enabled &&
2500 CBB *out_compressible,
2526 CBB *out_compressible,
2528 const SSL *
const ssl = hs->
ssl;
2537 if (ssl->
ctx->grease_enabled &&
2575 for (
size_t i = 0;
i <
ret.size();
i++) {
2594 CBS supported_group_list;
2596 CBS_len(&supported_group_list) == 0 ||
2646 hs, out_compressible,
false);
2653 hs, out_compressible,
true);
2658 bool used_legacy_codepoint) {
2659 SSL *
const ssl = hs->
ssl;
2676 return ssl->
s3->peer_quic_transport_params.CopyFrom(*
contents);
2694 bool used_legacy_codepoint) {
2695 SSL *
const ssl = hs->
ssl;
2715 if (used_legacy_codepoint) {
2730 return ssl->
s3->peer_quic_transport_params.CopyFrom(*
contents);
2829 CBB *out_compressible,
2834 for (
const auto &alg : hs->
ssl->
ctx->cert_compression_algs) {
2835 if (alg.decompress ==
nullptr) {
2874 const size_t num_algs =
ctx->cert_compression_algs.size();
2884 const size_t num_given_alg_ids =
CBS_len(&alg_ids) / 2;
2886 if (!given_alg_ids.
Init(num_given_alg_ids)) {
2890 size_t best_index = num_algs;
2891 size_t given_alg_idx = 0;
2893 while (
CBS_len(&alg_ids) > 0) {
2899 given_alg_ids[given_alg_idx++] = alg_id;
2901 for (
size_t i = 0;
i < num_algs;
i++) {
2902 const auto &alg =
ctx->cert_compression_algs[
i];
2903 if (alg.alg_id == alg_id && alg.compress !=
nullptr) {
2904 if (
i < best_index) {
2914 for (
size_t i = 1;
i < num_given_alg_ids;
i++) {
2915 if (given_alg_ids[
i - 1] == given_alg_ids[
i]) {
2920 if (best_index < num_algs &&
2942 *out_settings =
config.settings;
2950 CBB *out_compressible,
2952 const SSL *
const ssl = hs->
ssl;
2960 ssl->
s3->initial_handshake_complete) {
2974 config.protocol.size())) {
2984 SSL *
const ssl = hs->
ssl;
2989 assert(!ssl->
s3->initial_handshake_complete);
3012 SSL *
const ssl = hs->
ssl;
3017 ssl->
s3->early_data_accepted) {
3025 hs->
new_session->local_application_settings.data(),
3026 hs->
new_session->local_application_settings.size()) ||
3036 SSL *
const ssl = hs->
ssl;
3037 if (ssl->
s3->alpn_selected.empty()) {
3046 ssl->
s3->alpn_selected) &&
3053 CBS_len(&alps_contents) != 0 ||
3059 while (
CBS_len(&alps_list) > 0) {
3063 CBS_len(&protocol_name) == 0) {
3261 #define kNumExtensions (sizeof(kExtensions) / sizeof(struct tls_extension))
3265 "too many extensions for sent bitset");
3268 "too many extensions for received bitset");
3276 "extensions_permutation type is too small");
3288 std::swap(permutation[
i], permutation[seeds[
i - 1] % (
i + 1)]);
3320 bool *out_needs_psk_binder) {
3326 SSL *
const ssl = hs->
ssl;
3327 bssl::ScopedCBB compressed, outer_extensions;
3332 !
CBB_init(outer_extensions.get(), 64)) {
3339 if (ssl->
ctx->grease_enabled) {
3344 !
CBB_add_u16(outer_extensions.get(), grease_ext)) {
3349 for (
size_t unpermuted = 0; unpermuted <
kNumExtensions; unpermuted++) {
3354 const size_t len_compressed_before =
CBB_len(compressed.get());
3363 const size_t bytes_written_compressed =
3364 CBB_len(compressed.get()) - len_compressed_before;
3366 assert(
bytes_written == 0 || bytes_written_compressed == 0);
3371 if (bytes_written_compressed != 0 &&
3377 if (ssl->
ctx->grease_enabled) {
3382 !
CBB_add_u16(outer_extensions.get(), grease_ext)) {
3394 if (
CBB_len(compressed.get()) != 0) {
3404 CBB_len(outer_extensions.get())) ||
3427 bool *out_needs_psk_binder,
3429 size_t header_len) {
3430 *out_needs_psk_binder =
false;
3434 out_needs_psk_binder);
3437 assert(out_encoded ==
nullptr);
3438 SSL *
const ssl = hs->
ssl;
3451 if (ssl->
ctx->grease_enabled &&
3457 bool last_was_empty =
false;
3458 for (
size_t unpermuted = 0; unpermuted <
kNumExtensions; unpermuted++) {
3478 if (ssl->
ctx->grease_enabled) {
3484 last_was_empty =
false;
3492 !ssl->
s3->used_hello_retry_request) {
3495 size_t padding_len = 0;
3500 if (last_was_empty && psk_extension_len == 0) {
3503 header_len += 4 + padding_len;
3510 if (header_len > 0xff && header_len < 0x200) {
3513 if (padding_len != 0) {
3514 header_len -= 4 + padding_len;
3516 padding_len = 0x200 - header_len;
3521 if (padding_len >= 4 + 1) {
3528 if (padding_len != 0 &&
3553 SSL *
const ssl = hs->
ssl;
3625 static const uint8_t kFakeRenegotiateExtension[] = {0};
3631 CBS_init(&fake_contents, kFakeRenegotiateExtension,
3632 sizeof(kFakeRenegotiateExtension));
3653 SSL *
const ssl = hs->
ssl;
3710 received |= (1
u << ext_index);
3722 if (!(received & (1
u <<
i))) {
3739 SSL *
const ssl = hs->
ssl;
3742 if (ssl->
ctx->servername_callback != 0) {
3743 ret = ssl->
ctx->servername_callback(ssl, &al, ssl->
ctx->servername_arg);
3744 }
else if (ssl->
session_ctx->servername_callback != 0) {
3764 SSL *
const ssl = hs->
ssl;
3769 if (ssl->
s3->alpn_selected.empty()) {
3778 ssl->
s3->alpn_selected)) {
3794 SSL *
const ssl = hs->
ssl;
3821 auto ticket_mac = ticket.
last(mac_len);
3822 ticket = ticket.
first(ticket.
size() - mac_len);
3825 assert(mac_len == ticket_mac.size());
3826 bool mac_ok =
CRYPTO_memcmp(mac, ticket_mac.data(), mac_len) == 0;
3827 #if defined(BORINGSSL_UNSAFE_FUZZER_MODE)
3837 #if defined(BORINGSSL_UNSAFE_FUZZER_MODE)
3855 plaintext.Shrink(
static_cast<size_t>(len1) + len2);
3866 ScopedEVP_CIPHER_CTX cipher_ctx;
3867 ScopedHMAC_CTX hmac_ctx;
3875 const_cast<uint8_t *
>(iv.data()), cipher_ctx.get(), hmac_ctx.get(),
3879 }
else if (cb_ret == 0) {
3881 }
else if (cb_ret == 2) {
3882 *out_renew_ticket =
true;
3884 assert(cb_ret == 1);
3906 ScopedEVP_CIPHER_CTX cipher_ctx;
3907 ScopedHMAC_CTX hmac_ctx;
3909 MutexReadLock lock(&
ctx->lock);
3911 if (
ctx->ticket_key_current &&
name ==
ctx->ticket_key_current->name) {
3912 key =
ctx->ticket_key_current.get();
3913 }
else if (
ctx->ticket_key_prev &&
name ==
ctx->ticket_key_prev->name) {
3914 key =
ctx->ticket_key_prev.get();
3921 key->aes_key, iv.data())) {
3938 size_t plaintext_len;
3939 const enum ssl_ticket_aead_result_t
result =
3956 SSL *
const ssl = hs->
ssl;
3957 *out_renew_ticket =
false;
3958 out_session->reset();
3971 enum ssl_ticket_aead_result_t
result;
3979 }
else if (ssl->
session_ctx->ticket_aead_method != NULL) {
3989 }
else if (ssl->
session_ctx->ticket_key_cb != NULL) {
4037 return CBS_len(in_sigalgs) != 0 &&
4055 SSL *
const ssl = hs->
ssl;
4057 DC *dc = cert->
dc.get();
4086 for (
uint16_t peer_sigalg : peer_sigalgs) {
4087 if (sigalg == peer_sigalg) {
4106 peer_sigalgs = kDefaultPeerAlgorithms;
4108 return peer_sigalgs;
4112 SSL *
const ssl = hs->
ssl;
4135 if (!sig || !
x || !
y) {
4151 y.get(),
nullptr) ||
4164 #if defined(BORINGSSL_UNSAFE_FUZZER_MODE)
4175 ssl->
s3->channel_id_valid =
true;
4187 if (ec_key ==
nullptr) {
4196 x.get(),
y.get(),
nullptr)) {
4200 UniquePtr<ECDSA_SIG> sig(
ECDSA_do_sign(digest, digest_len, ec_key));
4220 SSL *
const ssl = hs->
ssl;
4235 static const char kClientIDMagic[] =
"TLS Channel ID signature";
4239 static const char kResumptionMagic[] =
"Resumption";
4241 if (ssl->
session->original_handshake_hash_len == 0) {
4246 ssl->
session->original_handshake_hash_len);
4261 SSL *
const ssl = hs->
ssl;
4271 "original_handshake_hash is too small");
4280 "EVP_MAX_MD_SIZE does not fit in uint8_t");
4298 while (
CBS_len(&sct_list) > 0) {
4311 using namespace bssl;
Array< uint8_t > alpn_client_proto_list
static bool ext_ech_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
void ssl_send_alert(SSL *ssl, int level, int desc)
bool ssl_ext_key_share_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
bool tls1_set_curves_list(Array< uint16_t > *out_group_ids, const char *curves)
Span subspan(size_t pos=0, size_t len=npos) const
static bool ssl_scan_clienthello_tlsext(SSL_HANDSHAKE *hs, const SSL_CLIENT_HELLO *client_hello, int *out_alert)
#define SSL_SIGN_RSA_PSS_RSAE_SHA512
static bool forbid_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
bool Init(size_t new_size)
#define SSL_SIGN_RSA_PSS_RSAE_SHA256
UniquePtr< SSL_HANDSHAKE_HINTS > hints
static bool parse_u16_array(const CBS *cbs, Array< uint16_t > *out)
static bool is_post_quantum_group(uint16_t id)
static int compare_uint16_t(const void *p1, const void *p2)
Array< uint16_t > supported_group_list
#define NID_X9_62_prime256v1
#define SSL_R_NO_GROUPS_SPECIFIED
#define SSL_TICKET_KEY_NAME_LEN
static bool ext_quic_transport_params_parse_clienthello_legacy(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_sct_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define TLSEXT_ECPOINTFORMAT_uncompressed
#define SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN
#define SSL_R_MISSING_EXTENSION
const Descriptor::ReservedRange const EnumValueDescriptor const MethodDescriptor extension
#define TLSEXT_TYPE_renegotiate
static Span< const uint16_t > tls12_get_verify_sigalgs(const SSL_HANDSHAKE *hs)
bool extended_master_secret
bool(* add_clienthello)(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define SSL_R_ERROR_ADDING_EXTENSION
static bool ext_alps_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
bool tls1_write_channel_id(SSL_HANDSHAKE *hs, CBB *cbb)
static bool ext_srtp_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
UniquePtr< EVP_PKEY > local_pubkey
bool ssl_is_valid_ech_config_list(Span< const uint8_t > ech_config_list)
UniquePtr< EVP_PKEY > channel_id_private
static bool ext_alps_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
static const struct tls_extension kExtensions[]
static bool ext_ec_point_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
const SSL_CIPHER * new_cipher
GrowableArray< ALPSConfig > alps_configs
#define SSL_R_PARSE_TLSEXT
static bool ignore_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_ec_point_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define OPENSSL_PUT_ERROR(library, reason)
#define CRYPTO_BUFFER_new_from_CBS
bool ssl_is_valid_alpn_list(Span< const uint8_t > in)
Array< uint16_t > peer_supported_group_list
static bool ext_quic_transport_params_parse_clienthello_impl(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents, bool used_legacy_codepoint)
static enum ssl_ticket_aead_result_t decrypt_ticket_with_cipher_ctx(Array< uint8_t > *out, EVP_CIPHER_CTX *cipher_ctx, HMAC_CTX *hmac_ctx, Span< const uint8_t > ticket)
static int copy(grpc_slice_buffer *input, grpc_slice_buffer *output)
#define TLSEXT_TYPE_early_data
static bool ext_psk_key_exchange_modes_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define CBB_add_u16_length_prefixed
bool(* parse_serverhello)(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
bool tls1_parse_peer_sigalgs(SSL_HANDSHAKE *hs, const CBS *in_sigalgs)
static bool ext_ri_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
bool ssl_cipher_uses_certificate_auth(const SSL_CIPHER *cipher)
#define TLSEXT_TYPE_delegated_credential
#define SSL_TLSEXT_ERR_OK
static bool ext_ocsp_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define SSL_AD_INTERNAL_ERROR
#define CRYPTO_BUFFER_len
#define CBS_get_u8_length_prefixed
static bool ext_ems_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define EC_KEY_set_public_key
#define TLSEXT_TYPE_cookie
static bool dont_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
static const uint16_t kSignSignatureAlgorithms[]
Array< uint8_t > extension_permutation
static bool ext_channel_id_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static void * OPENSSL_memchr(const void *s, int c, size_t n)
bool ssl_parse_serverhello_tlsext(SSL_HANDSHAKE *hs, const CBS *cbs)
#define EVP_CIPHER_iv_length
OPENSSL_EXPORT pem_password_cb void * u
bool tls1_check_group_id(const SSL_HANDSHAKE *hs, uint16_t group_id)
bool ssl_is_alpn_protocol_allowed(const SSL_HANDSHAKE *hs, Span< const uint8_t > protocol)
UniquePtr< ECHConfig > selected_ech_config
#define SSL_SIGN_RSA_PSS_RSAE_SHA384
#define SSL_SESSION_from_bytes
static bool ext_ocsp_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static struct test_ctx ctx
#define EC_GROUP_new_by_curve_name
#define TLSEXT_TYPE_quic_transport_parameters_legacy
bool ocsp_stapling_requested
Array< uint16_t > sigalgs
#define SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED
union SSL_HANDSHAKE::@373 extensions
static bool ext_ec_point_add_extension(const SSL_HANDSHAKE *hs, CBB *out)
bool ssl_ext_key_share_parse_clienthello(SSL_HANDSHAKE *hs, bool *out_found, Span< const uint8_t > *out_peer_key, uint8_t *out_alert, const SSL_CLIENT_HELLO *client_hello)
static const char * cipher_suites
static bool ext_sni_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_AD_ILLEGAL_PARAMETER
bool ssl_negotiate_alpn(SSL_HANDSHAKE *hs, uint8_t *out_alert, const SSL_CLIENT_HELLO *client_hello)
static bool ext_quic_transport_params_add_serverhello_impl(SSL_HANDSHAKE *hs, CBB *out, bool use_legacy_codepoint)
UniquePtr< SSL_SESSION > new_session
#define SSL_SIGN_ECDSA_SECP521R1_SHA512
void ssl_get_current_time(const SSL *ssl, struct OPENSSL_timeval *out_clock)
#define SSL_SIGN_RSA_PKCS1_SHA256
#define EC_KEY_get0_group
#define SSL_R_CLIENTHELLO_TLSEXT
uint16_t cert_compression_alg_id
#define EVP_CIPHER_CTX_iv_length
#define TLSEXT_TYPE_ech_outer_extensions
static void * OPENSSL_memset(void *dst, int c, size_t n)
bool CopyFrom(Span< const T > in)
const SSL_QUIC_METHOD * quic_method
bool ssl_name_to_group_id(uint16_t *out_group_id, const char *name, size_t len)
static bool ext_ri_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_R_NO_APPLICATION_PROTOCOL
static bool ext_sni_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
bool tls1_record_handshake_hashes_for_channel_id(SSL_HANDSHAKE *hs)
static bool ext_early_data_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
bssl::UniquePtr< SSL_SESSION > session
static bool ext_channel_id_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
uint16_t ssl_session_protocol_version(const SSL_SESSION *session)
static bool ext_pre_shared_key_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, bool *out_needs_binder, ssl_client_hello_type_t type)
Array< uint8_t > ech_client_outer
static BSSL_NAMESPACE_BEGIN bool ssl_check_clienthello_tlsext(SSL_HANDSHAKE *hs)
ssl_early_data_peer_declined
#define EVP_DecryptInit_ex
#define SSL_AD_UNSUPPORTED_EXTENSION
static bool ext_delegated_credential_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_early_data_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
Span< const uint16_t > tls1_get_grouplist(const SSL_HANDSHAKE *hs)
#define SSL_SIGN_RSA_PKCS1_SHA384
int SSL_early_callback_ctx_extension_get(const SSL_CLIENT_HELLO *client_hello, uint16_t extension_type, const uint8_t **out_data, size_t *out_len)
#define TLSEXT_TYPE_supported_versions
#define SSL_SIGN_RSA_PKCS1_SHA512
static bool ext_supported_groups_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_supported_groups_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool should_offer_psk(const SSL_HANDSHAKE *hs, ssl_client_hello_type_t type)
uint32_t inner_extensions_sent
bool ssl_add_clienthello_tlsext(SSL_HANDSHAKE *hs, CBB *out, CBB *out_encoded, bool *out_needs_psk_binder, ssl_client_hello_type_t type, size_t header_len)
#define EC_POINT_get_affine_coordinates_GFp
bool ssl_is_sct_list_valid(const CBS *contents)
static bool ext_alpn_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define TLSEXT_CHANNEL_ID_SIZE
static bool ext_sct_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_quic_transport_params_add_clienthello_impl(const SSL_HANDSHAKE *hs, CBB *out, bool use_legacy_codepoint)
static bool ext_channel_id_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static bool ext_quic_transport_params_add_serverhello_legacy(SSL_HANDSHAKE *hs, CBB *out)
#define EC_POINT_set_affine_coordinates_GFp
static bool ext_ec_point_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
Span< const uint16_t > tls1_get_peer_verify_algorithms(const SSL_HANDSHAKE *hs)
static bool ext_ticket_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
static bool ext_ech_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static bool ext_ems_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
static bool cert_compression_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static bool ext_npn_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
Array< uint8_t > decrypted_psk
static bool ext_srtp_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
bool channel_id_negotiated
#define CBB_add_u8_length_prefixed
bool ssl_setup_extension_permutation(SSL_HANDSHAKE *hs)
#define ERR_add_error_dataf
bool tls1_set_curves(Array< uint16_t > *out_group_ids, Span< const int > curves)
static bool cert_compression_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define TLSEXT_TYPE_channel_id
#define SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH
static bool ext_sni_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
static bool cert_compression_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define SSL_SIGN_RSA_PKCS1_SHA1
#define TLSEXT_TYPE_padding
static bool ext_ech_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_AD_UNKNOWN_PSK_IDENTITY
def profile(message_size, response_count)
#define SSL3_HM_HEADER_LENGTH
static bool add_padding_extension(CBB *cbb, uint16_t ext, size_t len)
static bool ssl_scan_serverhello_tlsext(SSL_HANDSHAKE *hs, const CBS *cbs, int *out_alert)
bool ssl_client_hello_get_extension(const SSL_CLIENT_HELLO *client_hello, CBS *out, uint16_t extension_type)
static bool ext_key_share_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
uint16_t ssl_get_grease_value(const SSL_HANDSHAKE *hs, enum ssl_grease_index_t index)
#define TLSEXT_TYPE_signature_algorithms
static size_t ext_pre_shared_key_clienthello_length(const SSL_HANDSHAKE *hs, ssl_client_hello_type_t type)
#define SSL_R_WRONG_SIGNATURE_TYPE
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
bool tls12_check_peer_sigalg(const SSL_HANDSHAKE *hs, uint8_t *out_alert, uint16_t sigalg)
#define BSSL_NAMESPACE_END
static bool ext_npn_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static bool ext_delegated_credential_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
Array< uint16_t > verify_sigalgs
bool ssl_negotiate_alps(SSL_HANDSHAKE *hs, uint8_t *out_alert, const SSL_CLIENT_HELLO *client_hello)
#define SSL_AD_MISSING_EXTENSION
#define SSL_TLSEXT_ERR_NOACK
static bool ext_ems_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_npn_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_R_WRONG_CURVE
#define ERR_R_INTERNAL_ERROR
uint16_t ssl_protocol_version(const SSL *ssl)
static bool ext_quic_transport_params_add_clienthello_legacy(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
bool tls1_choose_signature_algorithm(SSL_HANDSHAKE *hs, uint16_t *out)
static bool ext_quic_transport_params_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define TLSEXT_TYPE_key_share
#define EC_KEY_get0_public_key
#define SSL_R_RENEGOTIATION_MISMATCH
static bool ext_alps_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static bool ext_alpn_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_ec_point_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
bool tls1_get_legacy_signature_algorithm(uint16_t *out, const EVP_PKEY *pkey)
#define TLSEXT_TYPE_cert_compression
#define DTLS1_COOKIE_LENGTH
static bool ext_alpn_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define SSL_R_NO_P256_SUPPORT
Array< uint8_t > ech_retry_configs
#define SSL_R_RENEGOTIATION_ENCODING_ERR
const EVP_MD * ssl_session_get_digest(const SSL_SESSION *session)
bool ocsp_stapling_enabled
#define SSL_R_RENEGOTIATION_EMS_MISMATCH
#define SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN
void qsort(void *a, size_t n, size_t es, int(*cmp)(const void *, const void *))
static bool ext_sigalgs_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define SSL_TLSEXT_ERR_ALERT_WARNING
Array< uint16_t > peer_sigalgs
#define SSL_R_BAD_SRTP_MKI_VALUE
bssl::UniquePtr< char > hostname
bool ssl_client_hello_init(const SSL *ssl, SSL_CLIENT_HELLO *out, Span< const uint8_t > body)
#define TLSEXT_TYPE_supported_groups
#define SSL_R_MISSING_KEY_SHARE
#define TLSEXT_TYPE_psk_key_exchange_modes
uint16_t expected_cert_verify_algorithm
enum ssl_ticket_aead_result_t ssl_process_ticket(SSL_HANDSHAKE *hs, UniquePtr< SSL_SESSION > *out_session, bool *out_renew_ticket, Span< const uint8_t > ticket, Span< const uint8_t > session_id)
bool ssl_parse_client_hello_with_trailing_data(const SSL *ssl, CBS *cbs, SSL_CLIENT_HELLO *out)
static bool ext_npn_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
static bool ext_quic_transport_params_parse_serverhello_impl(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents, bool used_legacy_codepoint)
bool ssl_nid_to_group_id(uint16_t *out_group_id, int nid)
bool quic_use_legacy_codepoint
#define SSL_OP_CIPHER_SERVER_PREFERENCE
static bool ext_ems_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS
OPENSSL_EXPORT bool CBBFinishArray(CBB *cbb, Array< uint8_t > *out)
Array< uint8_t > quic_transport_params
bool(* parse_clienthello)(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static HAS_VIRTUAL_DESTRUCTOR UniquePtr< SSLKeyShare > Create(uint16_t group_id)
static bool ext_early_data_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_get_srtp_profiles
static bool ext_supported_versions_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static bool ext_psk_key_exchange_modes_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_SIGN_RSA_PKCS1_MD5_SHA1
#define TLSEXT_TYPE_certificate_timestamp
static bool cert_compression_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_R_INVALID_ALPN_PROTOCOL
const uint8_t * extensions
#define SSL_R_UNEXPECTED_EXTENSION
static enum ssl_ticket_aead_result_t ssl_decrypt_ticket_with_ticket_keys(SSL_HANDSHAKE *hs, Array< uint8_t > *out, Span< const uint8_t > ticket)
#define EVP_DecryptUpdate
#define TLSEXT_TYPE_status_request
#define EVP_PKEY_get0_EC_KEY
bool ssl_parse_clienthello_tlsext(SSL_HANDSHAKE *hs, const SSL_CLIENT_HELLO *client_hello)
Array< uint8_t > ecdh_public_key
#define TLSEXT_TYPE_next_proto_neg
#define TLSEXT_TYPE_extended_master_secret
static bool ext_quic_transport_params_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define SSL_CURVE_SECP256R1
#define SSL_AD_DECODE_ERROR
static const uint16_t kVerifySignatureAlgorithms[]
UniquePtr< SSL_SESSION > ret
static enum ssl_ticket_aead_result_t ssl_decrypt_ticket_with_method(SSL_HANDSHAKE *hs, Array< uint8_t > *out, bool *out_renew_ticket, Span< const uint8_t > ticket)
bool ssl_ext_pre_shared_key_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ssl_add_clienthello_tlsext_inner(SSL_HANDSHAKE *hs, CBB *out, CBB *out_encoded, bool *out_needs_psk_binder)
static bool ssl_check_serverhello_tlsext(SSL_HANDSHAKE *hs)
#define CBS_get_u16_length_prefixed
UniquePtr< SSLKeyShare > key_shares[2]
#define SHA256_DIGEST_LENGTH
static bool ext_sct_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
bool signed_cert_timestamps_enabled
static const struct tls_extension * tls_extension_find(uint32_t *out_index, uint16_t value)
static bool ext_ocsp_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
static bool ext_ech_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
virtual uint16_t GroupID() const PURE_VIRTUAL
bool ssl_setup_key_shares(SSL_HANDSHAKE *hs, uint16_t override_group_id)
#define EVP_MAX_IV_LENGTH
static bool ext_supported_groups_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
bool ssl_ext_pre_shared_key_parse_clienthello(SSL_HANDSHAKE *hs, CBS *out_ticket, CBS *out_binders, uint32_t *out_obfuscated_ticket_age, uint8_t *out_alert, const SSL_CLIENT_HELLO *client_hello, CBS *contents)
#define SSL_R_PRE_SHARED_KEY_MUST_BE_LAST
#define SSL_AD_HANDSHAKE_FAILURE
ssl_ticket_aead_ignore_ticket
static bool ext_quic_transport_params_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define EVP_DecryptFinal_ex
static bool ext_early_data_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define TLSEXT_STATUSTYPE_ocsp
bool GetHash(uint8_t *out, size_t *out_len) const
#define TLSEXT_TYPE_session_ticket
bool(* add_serverhello)(SSL_HANDSHAKE *hs, CBB *out)
BSSL_NAMESPACE_BEGIN bool ssl_client_cipher_list_contains_cipher(const SSL_CLIENT_HELLO *client_hello, uint16_t id)
static const uint16_t kDefaultGroups[]
static bool ext_cookie_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
#define sk_SRTP_PROTECTION_PROFILE_num
static bool ext_sct_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_TLSEXT_ERR_ALERT_FATAL
#define SSL_MAX_SSL_SESSION_ID_LENGTH
int ssl_ctx_rotate_ticket_encryption_key(SSL_CTX *ctx)
static bool tls1_check_duplicate_extensions(const CBS *cbs)
#define SSL_R_CHANNEL_ID_SIGNATURE_INVALID
static enum ssl_ticket_aead_result_t ssl_decrypt_ticket_with_cb(SSL_HANDSHAKE *hs, Array< uint8_t > *out, bool *out_renew_ticket, Span< const uint8_t > ticket)
#define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST
bool certificate_status_expected
static bool ext_srtp_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
@ ssl_cert_verify_channel_id
#define SSL_CURVE_SECP384R1
static size_t bytes_written
bool tls1_channel_id_hash(SSL_HANDSHAKE *hs, uint8_t *out, size_t *out_len)
#define TLSEXT_TYPE_application_settings
static bool ext_sigalgs_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define SSL_AD_UNRECOGNIZED_NAME
UniquePtr< SSL_ECH_KEYS > ech_keys
static bool ext_ocsp_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define TLSEXT_TYPE_encrypted_client_hello
virtual bool Finish(Array< uint8_t > *out_secret, uint8_t *out_alert, Span< const uint8_t > peer_key) PURE_VIRTUAL
#define SSL_SIGN_ECDSA_SHA1
#define SSL_R_DECODE_ERROR
bool tls1_get_shared_group(SSL_HANDSHAKE *hs, uint16_t *out_group_id)
Array< uint16_t > peer_delegated_credential_sigalgs
bssl::UniquePtr< SSL_CTX > session_ctx
bool ssl_add_serverhello_tlsext(SSL_HANDSHAKE *hs, CBB *out)
bool ssl_ext_key_share_parse_serverhello(SSL_HANDSHAKE *hs, Array< uint8_t > *out_secret, uint8_t *out_alert, CBS *contents)
static bool ext_ticket_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
static bool ext_ticket_parse_serverhello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define TLSEXT_TYPE_application_layer_protocol_negotiation
bool ssl_add_supported_versions(const SSL_HANDSHAKE *hs, CBB *cbb, uint16_t extra_min_version)
#define TLSEXT_TYPE_pre_shared_key
bool ssl_signing_with_dc(const SSL_HANDSHAKE *hs)
static bool ext_quic_transport_params_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
bool tls1_verify_channel_id(SSL_HANDSHAKE *hs, const SSLMessage &msg)
#define SSL_R_DUPLICATE_KEY_SHARE
const OPENSSL_EXPORT EVP_CIPHER * EVP_aes_128_cbc(void)
#define TLSEXT_TYPE_quic_transport_parameters
static bool ext_srtp_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
Array< uint8_t > key_share_bytes
#define TLSEXT_TYPE_server_name
#define SSL_AD_NO_APPLICATION_PROTOCOL
#define SSL_R_ERROR_PARSING_EXTENSION
static bool ext_sni_add_clienthello(const SSL_HANDSHAKE *hs, CBB *out, CBB *out_compressible, ssl_client_hello_type_t type)
bool tls13_get_cert_verify_signature_input(SSL_HANDSHAKE *hs, Array< uint8_t > *out, enum ssl_cert_verify_context_t cert_verify_context)
bssl::UniquePtr< SSL_CTX > ctx
static bool ext_channel_id_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
bool ssl_private_key_supports_signature_algorithm(SSL_HANDSHAKE *hs, uint16_t sigalg)
static bool ext_ri_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define SSL_AD_DECRYPT_ERROR
bool cert_compression_negotiated
#define SSL_R_PSK_IDENTITY_NOT_FOUND
#define TLSEXT_TYPE_ec_point_formats
static bool ext_quic_transport_params_parse_serverhello_legacy(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define TLSEXT_NAMETYPE_host_name
ssl_early_data_session_not_resumed
#define CBB_discard_child
bool ssl_get_local_application_settings(const SSL_HANDSHAKE *hs, Span< const uint8_t > *out_settings, Span< const uint8_t > protocol)
bool tls12_add_verify_sigalgs(const SSL_HANDSHAKE *hs, CBB *out)
static bool ext_ri_parse_clienthello(SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents)
#define CRYPTO_BUFFER_data
#define ERR_R_MALLOC_FAILURE
bool delegated_credential_requested
bool ssl_ext_pre_shared_key_add_serverhello(SSL_HANDSHAKE *hs, CBB *out)
#define SSL_SIGN_ECDSA_SECP384R1_SHA384
constexpr Span< const T > MakeConstSpan(T *ptr, size_t size) noexcept
#define SSL_SIGN_ECDSA_SECP256R1_SHA256
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:18