Lines Matching refs:handshake

147     ssl->handshake->tls13_kex_modes = ke_modes;  in ssl_tls13_parse_key_exchange_modes_ext()
562 ret = ssl->handshake->update_checksum(ssl, pre_shared_key_ext, in ssl_tls13_parse_pre_shared_key_ext()
707 ret = ssl->handshake->update_checksum( in ssl_tls13_parse_pre_shared_key_ext()
718 ssl->handshake->selected_identity = (uint16_t) matched_identity; in ssl_tls13_parse_pre_shared_key_ext()
744 not_using_psk = (mbedtls_svc_key_id_is_null(ssl->handshake->psk_opaque)); in ssl_tls13_write_server_pre_shared_key_ext()
746 not_using_psk = (ssl->handshake->psk == NULL); in ssl_tls13_write_server_pre_shared_key_ext()
760 MBEDTLS_PUT_UINT16_BE(ssl->handshake->selected_identity, p, 4); in ssl_tls13_write_server_pre_shared_key_ext()
765 ssl->handshake->selected_identity)); in ssl_tls13_write_server_pre_shared_key_ext()
853 ssl->handshake->hrr_selected_group = 0; in ssl_tls13_parse_supported_groups_ext()
868 ssl->handshake->hrr_selected_group != 0) { in ssl_tls13_parse_supported_groups_ext()
877 ssl->handshake->hrr_selected_group = named_group; in ssl_tls13_parse_supported_groups_ext()
923 ssl->handshake->offered_group_id = 0; in ssl_tls13_parse_key_shares_ext()
956 ssl->handshake->offered_group_id != 0) { in ssl_tls13_parse_key_shares_ext()
980 ssl->handshake->offered_group_id = group; in ssl_tls13_parse_key_shares_ext()
984 if (ssl->handshake->offered_group_id == 0) { in ssl_tls13_parse_key_shares_ext()
996 int masked = ssl->handshake->received_extensions & exts_mask; in ssl_tls13_client_hello_has_exts()
1118 const uint16_t *sig_alg = ssl->handshake->received_sig_algs; in ssl_tls13_pick_key_cert()
1121 if (ssl->handshake->sni_key_cert != NULL) { in ssl_tls13_pick_key_cert()
1122 key_cert_list = ssl->handshake->sni_key_cert; in ssl_tls13_pick_key_cert()
1181 ssl->handshake->key_cert = key_cert; in ssl_tls13_pick_key_cert()
1190 ssl->handshake->key_cert->cert); in ssl_tls13_pick_key_cert()
1265 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_parse_client_hello() local
1430 memcpy(&handshake->randbytes[0], random, MBEDTLS_CLIENT_HELLO_RANDOM_LEN); in ssl_tls13_parse_client_hello()
1449 0, PSA_ALG_NONE, &handshake->ciphersuite_info); in ssl_tls13_parse_client_hello()
1451 if (handshake->ciphersuite_info == NULL) { in ssl_tls13_parse_client_hello()
1456 ssl->session_negotiate->ciphersuite = handshake->ciphersuite_info->id; in ssl_tls13_parse_client_hello()
1459 ((unsigned) handshake->ciphersuite_info->id), in ssl_tls13_parse_client_hello()
1460 handshake->ciphersuite_info->name)); in ssl_tls13_parse_client_hello()
1489 handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_parse_client_hello()
1497 if (ssl->handshake->hello_retry_request_flag) { in ssl_tls13_parse_client_hello()
1509 if (handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(PRE_SHARED_KEY)) { in ssl_tls13_parse_client_hello()
1617 if ((handshake->received_extensions & in ssl_tls13_parse_client_hello()
1686 handshake->received_extensions); in ssl_tls13_parse_client_hello()
1704 if (handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(PRE_SHARED_KEY)) { in ssl_tls13_parse_client_hello()
1705 ret = handshake->update_checksum(ssl, buf, in ssl_tls13_parse_client_hello()
1727 ret = handshake->update_checksum(ssl, buf, p - buf); in ssl_tls13_parse_client_hello()
1751 handshake->key_exchange_mode = in ssl_tls13_parse_client_hello()
1758 handshake->key_exchange_mode = in ssl_tls13_parse_client_hello()
1766 handshake->key_exchange_mode = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK; in ssl_tls13_parse_client_hello()
1780 if (handshake->key_exchange_mode & in ssl_tls13_parse_client_hello()
1782 handshake->ciphersuite_info = psk.ciphersuite_info; in ssl_tls13_parse_client_hello()
1790 handshake->resume = 1; in ssl_tls13_parse_client_hello()
1795 if (handshake->key_exchange_mode != in ssl_tls13_parse_client_hello()
1800 mbedtls_ssl_optimize_checksum(ssl, handshake->ciphersuite_info); in ssl_tls13_parse_client_hello()
1808 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_check_early_data_requirements() local
1817 if (!handshake->resume) { in ssl_tls13_check_early_data_requirements()
1841 if (handshake->selected_identity != 0) { in ssl_tls13_check_early_data_requirements()
1848 if (handshake->ciphersuite_info->id != in ssl_tls13_check_early_data_requirements()
1907 ssl->handshake->sni_name = NULL; in ssl_tls13_postprocess_client_hello()
1908 ssl->handshake->sni_name_len = 0; in ssl_tls13_postprocess_client_hello()
1919 if (ssl->handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(EARLY_DATA)) { in ssl_tls13_postprocess_client_hello()
1920 ssl->handshake->early_data_accepted = in ssl_tls13_postprocess_client_hello()
1923 if (ssl->handshake->early_data_accepted) { in ssl_tls13_postprocess_client_hello()
2018 ssl->handshake->randbytes + MBEDTLS_CLIENT_HELLO_RANDOM_LEN; in ssl_tls13_prepare_server_hello()
2141 uint16_t group = ssl->handshake->offered_group_id; in ssl_tls13_write_key_share_ext()
2190 uint16_t selected_group = ssl->handshake->hrr_selected_group; in ssl_tls13_write_hrr_key_share_ext()
2216 if (ssl->handshake->offered_group_id != 0) { in ssl_tls13_write_hrr_key_share_ext()
2274 ssl->handshake->sent_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_write_server_hello_body()
2297 memcpy(p, &ssl->handshake->randbytes[MBEDTLS_CLIENT_HELLO_RANDOM_LEN], in ssl_tls13_write_server_hello_body()
2397 ssl->handshake->sent_extensions); in ssl_tls13_write_server_hello_body()
2469 if (ssl->handshake->hello_retry_request_flag) { in ssl_tls13_prepare_hello_retry_request()
2516 ssl->handshake->hello_retry_request_flag = 1; in ssl_tls13_write_hello_retry_request()
2575 if (ssl->handshake->early_data_accepted) { in ssl_tls13_write_encrypted_extensions_body()
2586 if (ssl->handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(RECORD_SIZE_LIMIT)) { in ssl_tls13_write_encrypted_extensions_body()
2604 3, MBEDTLS_SSL_HS_ENCRYPTED_EXTENSIONS, ssl->handshake->sent_extensions); in ssl_tls13_write_encrypted_extensions_body()
2617 ssl->handshake->transform_handshake); in ssl_tls13_write_encrypted_extensions()
2670 if (ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET) { in ssl_tls13_certificate_request_coordinate()
2671 authmode = ssl->handshake->sni_authmode; in ssl_tls13_certificate_request_coordinate()
2681 ssl->handshake->certificate_request_sent = 1; in ssl_tls13_certificate_request_coordinate()
2739 3, MBEDTLS_SSL_HS_CERTIFICATE_REQUEST, ssl->handshake->sent_extensions); in ssl_tls13_write_certificate_request_body()
2870 if (ssl->handshake->certificate_request_sent) { in ssl_tls13_prepare_for_handshake_second_flight()
2902 if (ssl->handshake->early_data_accepted) { in ssl_tls13_write_server_finished()
2908 ssl, ssl->handshake->transform_earlydata); in ssl_tls13_write_server_finished()
2916 mbedtls_ssl_set_inbound_transform(ssl, ssl->handshake->transform_handshake); in ssl_tls13_write_server_finished()
3050 ssl, ssl->handshake->transform_handshake); in ssl_tls13_process_end_of_early_data()
3145 if (ssl->handshake->new_session_tickets_count == 0) { in ssl_tls13_write_new_session_ticket_coordinate()
3172 session, ssl->handshake->tls13_kex_modes); in ssl_tls13_prepare_new_session_ticket()
3215 (mbedtls_ssl_ciphersuite_t *) ssl->handshake->ciphersuite_info; in ssl_tls13_prepare_new_session_ticket()
3365 ssl->handshake->sent_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_write_new_session_ticket_body()
3397 3, MBEDTLS_SSL_HS_NEW_SESSION_TICKET, ssl->handshake->sent_extensions); in ssl_tls13_write_new_session_ticket_body()
3434 if (ssl->handshake->resume == 1) { in ssl_tls13_write_new_session_ticket()
3435 ssl->handshake->new_session_tickets_count = 0; in ssl_tls13_write_new_session_ticket()
3437 ssl->handshake->new_session_tickets_count--; in ssl_tls13_write_new_session_ticket()
3459 if (ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER || ssl->handshake == NULL) { in mbedtls_ssl_tls13_handshake_server_step()
3593 if (ssl->handshake->new_session_tickets_count == 0) { in mbedtls_ssl_tls13_handshake_server_step()