Lines Matching refs:handshake

52     unsigned char versions_len = (ssl->handshake->min_tls_version <=  in ssl_tls13_write_supported_versions_ext()
83 if (ssl->handshake->min_tls_version <= MBEDTLS_SSL_VERSION_TLS1_2) { in ssl_tls13_write_supported_versions_ext()
177 uint16_t group_id = ssl->handshake->offered_group_id; in ssl_tls13_reset_key_share()
190 status = psa_destroy_key(ssl->handshake->xxdh_psa_privkey); in ssl_tls13_reset_key_share()
197 ssl->handshake->xxdh_psa_privkey = MBEDTLS_SVC_KEY_ID_INIT; in ssl_tls13_reset_key_share()
288 group_id = ssl->handshake->offered_group_id; in ssl_tls13_write_key_share_ext()
352 ssl->handshake->offered_group_id = group_id; in ssl_tls13_write_key_share_ext()
433 if (found == 0 || selected_group == ssl->handshake->offered_group_id) { in ssl_tls13_parse_hrr_key_share_ext()
442 ssl->handshake->offered_group_id = selected_group; in ssl_tls13_parse_hrr_key_share_ext()
483 offered_group = ssl->handshake->offered_group_id; in ssl_tls13_parse_key_share_ext()
536 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_parse_cookie_ext() local
546 mbedtls_free(handshake->cookie); in ssl_tls13_parse_cookie_ext()
547 handshake->cookie_len = 0; in ssl_tls13_parse_cookie_ext()
548 handshake->cookie = mbedtls_calloc(1, cookie_len); in ssl_tls13_parse_cookie_ext()
549 if (handshake->cookie == NULL) { in ssl_tls13_parse_cookie_ext()
556 memcpy(handshake->cookie, p, cookie_len); in ssl_tls13_parse_cookie_ext()
557 handshake->cookie_len = cookie_len; in ssl_tls13_parse_cookie_ext()
570 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_write_cookie_ext() local
572 if (handshake->cookie == NULL) { in ssl_tls13_write_cookie_ext()
578 handshake->cookie, in ssl_tls13_write_cookie_ext()
579 handshake->cookie_len); in ssl_tls13_write_cookie_ext()
581 MBEDTLS_SSL_CHK_BUF_PTR(p, end, handshake->cookie_len + 6); in ssl_tls13_write_cookie_ext()
586 MBEDTLS_PUT_UINT16_BE(handshake->cookie_len + 2, p, 2); in ssl_tls13_write_cookie_ext()
587 MBEDTLS_PUT_UINT16_BE(handshake->cookie_len, p, 4); in ssl_tls13_write_cookie_ext()
591 memcpy(p, handshake->cookie, handshake->cookie_len); in ssl_tls13_write_cookie_ext()
593 *out_len = handshake->cookie_len + 6; in ssl_tls13_write_cookie_ext()
686 return ssl->handshake->resume && in ssl_tls13_has_configured_ticket()
697 return ssl->handshake->resume && in ssl_tls13_early_data_has_valid_ticket()
1087 ssl->handshake->selected_identity = (uint16_t) selected_identity; in ssl_tls13_parse_server_pre_shared_key_ext()
1114 if (mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac) in ssl_tls13_parse_server_pre_shared_key_ext()
1197 if (!ssl->handshake->hello_retry_request_flag) { in mbedtls_ssl_tls13_write_client_hello_exts()
1279 ssl->handshake->ciphersuite_info = ciphersuite_info; in mbedtls_ssl_tls13_finalize_client_hello()
1282 ssl->handshake->key_exchange_mode = in mbedtls_ssl_tls13_finalize_client_hello()
1310 ssl, ssl->handshake->transform_earlydata); in mbedtls_ssl_tls13_finalize_client_hello()
1451 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_preprocess_server_hello() local
1466 if (handshake->min_tls_version > MBEDTLS_SSL_VERSION_TLS1_2 || ret) { in ssl_tls13_preprocess_server_hello()
1498 handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_preprocess_server_hello()
1512 if (handshake->hello_retry_request_flag) { in ssl_tls13_preprocess_server_hello()
1534 handshake->hello_retry_request_flag = 1; in ssl_tls13_preprocess_server_hello()
1599 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_parse_server_hello() local
1646 memcpy(&handshake->randbytes[MBEDTLS_CLIENT_HELLO_RANDOM_LEN], p, in ssl_tls13_parse_server_hello()
1689 else if ((!is_hrr) && handshake->hello_retry_request_flag && in ssl_tls13_parse_server_hello()
1703 handshake->ciphersuite_info = ciphersuite_info; in ssl_tls13_parse_server_hello()
1741 handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_parse_server_hello()
1830 MBEDTLS_SSL_PRINT_EXTS(3, hs_msg_type, handshake->received_extensions); in ssl_tls13_parse_server_hello()
1866 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_postprocess_server_hello() local
1876 switch (handshake->received_extensions & in ssl_tls13_postprocess_server_hello()
1881 handshake->key_exchange_mode = in ssl_tls13_postprocess_server_hello()
1887 handshake->key_exchange_mode = in ssl_tls13_postprocess_server_hello()
1894 handshake->key_exchange_mode = in ssl_tls13_postprocess_server_hello()
1906 ssl, handshake->key_exchange_mode)) { in ssl_tls13_postprocess_server_hello()
1910 ssl_tls13_get_kex_mode_str(handshake->key_exchange_mode))); in ssl_tls13_postprocess_server_hello()
1916 ssl_tls13_get_kex_mode_str(handshake->key_exchange_mode))); in ssl_tls13_postprocess_server_hello()
1929 handshake->key_exchange_mode == in ssl_tls13_postprocess_server_hello()
1949 mbedtls_ssl_set_inbound_transform(ssl, handshake->transform_handshake); in ssl_tls13_postprocess_server_hello()
1981 ssl->session_negotiate->ciphersuite = ssl->handshake->ciphersuite_info->id; in ssl_tls13_postprocess_hrr()
2077 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_parse_encrypted_extensions() local
2088 handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_parse_encrypted_extensions()
2164 if ((handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(RECORD_SIZE_LIMIT)) && in ssl_tls13_parse_encrypted_extensions()
2165 (handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(MAX_FRAGMENT_LENGTH))) { in ssl_tls13_parse_encrypted_extensions()
2176 handshake->received_extensions); in ssl_tls13_parse_encrypted_extensions()
2195 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_process_encrypted_extensions() local
2208 if (handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(EARLY_DATA)) { in ssl_tls13_process_encrypted_extensions()
2237 handshake->selected_identity != 0 || in ssl_tls13_process_encrypted_extensions()
2238 handshake->ciphersuite_info->id != in ssl_tls13_process_encrypted_extensions()
2264 ssl->session_negotiate->ciphersuite = handshake->ciphersuite_info->id; in ssl_tls13_process_encrypted_extensions()
2407 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_parse_certificate_request() local
2422 handshake->certificate_request_context = in ssl_tls13_parse_certificate_request()
2424 if (handshake->certificate_request_context == NULL) { in ssl_tls13_parse_certificate_request()
2428 memcpy(handshake->certificate_request_context, p, in ssl_tls13_parse_certificate_request()
2444 handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_parse_certificate_request()
2487 handshake->received_extensions); in ssl_tls13_parse_certificate_request()
2500 if ((handshake->received_extensions & MBEDTLS_SSL_EXT_MASK(SIG_ALG)) == 0) { in ssl_tls13_parse_certificate_request()
2506 ssl->handshake->client_auth = 1; in ssl_tls13_parse_certificate_request()
2641 mbedtls_ssl_set_outbound_transform(ssl, ssl->handshake->transform_handshake); in ssl_tls13_write_client_certificate()
2644 if (ssl->handshake->client_auth) { in ssl_tls13_write_client_certificate()
2772 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_parse_new_session_ticket_exts() local
2776 handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in ssl_tls13_parse_new_session_ticket_exts()
2821 handshake->received_extensions); in ssl_tls13_parse_new_session_ticket_exts()
3166 ssl, ssl->handshake->transform_earlydata); in mbedtls_ssl_tls13_handshake_client_step()