Home
last modified time | relevance | path

Searched refs:handshake (Results 1 – 23 of 23) sorted by relevance

/mbedtls-latest/library/
Dssl_tls12_client.c141 if (ssl->handshake->psa_pake_ctx_is_ok != 1) { in ssl_write_ecjpake_kkpp_ext()
145 if (mbedtls_ecjpake_check(&ssl->handshake->ecjpake_ctx) != 0) { in ssl_write_ecjpake_kkpp_ext()
163 if (ssl->handshake->ecjpake_cache == NULL || in ssl_write_ecjpake_kkpp_ext()
164 ssl->handshake->ecjpake_cache_len == 0) { in ssl_write_ecjpake_kkpp_ext()
168 ret = mbedtls_psa_ecjpake_write_round(&ssl->handshake->psa_pake_ctx, in ssl_write_ecjpake_kkpp_ext()
172 psa_destroy_key(ssl->handshake->psa_pake_password); in ssl_write_ecjpake_kkpp_ext()
173 psa_pake_abort(&ssl->handshake->psa_pake_ctx); in ssl_write_ecjpake_kkpp_ext()
178 ret = mbedtls_ecjpake_write_round_one(&ssl->handshake->ecjpake_ctx, in ssl_write_ecjpake_kkpp_ext()
188 ssl->handshake->ecjpake_cache = mbedtls_calloc(1, kkpp_len); in ssl_write_ecjpake_kkpp_ext()
189 if (ssl->handshake->ecjpake_cache == NULL) { in ssl_write_ecjpake_kkpp_ext()
[all …]
Dssl_tls12_server.c205 if (ssl->handshake->curves_tls_id != NULL) { in ssl_parse_supported_groups_ext()
226 ssl->handshake->curves_tls_id = curves_tls_id; in ssl_parse_supported_groups_ext()
267 ssl->handshake->ecdh_ctx.point_format = p[0]; in ssl_parse_supported_point_formats()
271 mbedtls_ecjpake_set_point_format(&ssl->handshake->ecjpake_ctx, in ssl_parse_supported_point_formats()
297 if (ssl->handshake->psa_pake_ctx_is_ok != 1) in ssl_parse_ecjpake_kkpp()
299 if (mbedtls_ecjpake_check(&ssl->handshake->ecjpake_ctx) != 0) in ssl_parse_ecjpake_kkpp()
308 &ssl->handshake->psa_pake_ctx, buf, len, in ssl_parse_ecjpake_kkpp()
310 psa_destroy_key(ssl->handshake->psa_pake_password); in ssl_parse_ecjpake_kkpp()
311 psa_pake_abort(&ssl->handshake->psa_pake_ctx); in ssl_parse_ecjpake_kkpp()
322 if ((ret = mbedtls_ecjpake_read_round_one(&ssl->handshake->ecjpake_ctx, in ssl_parse_ecjpake_kkpp()
[all …]
Dssl_tls13_keys.c674 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_key_schedule_stage_application() local
676 (mbedtls_md_type_t) handshake->ciphersuite_info->mac); in ssl_tls13_key_schedule_stage_application()
683 handshake->tls13_master_secrets.handshake, in ssl_tls13_key_schedule_stage_application()
685 handshake->tls13_master_secrets.app); in ssl_tls13_key_schedule_stage_application()
693 handshake->tls13_master_secrets.app, PSA_HASH_LENGTH(hash_alg)); in ssl_tls13_key_schedule_stage_application()
786 &ssl->handshake->tls13_hs_secrets; in mbedtls_ssl_tls13_calculate_verify_data()
788 mbedtls_md_type_t const md_type = (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac; in mbedtls_ssl_tls13_calculate_verify_data()
791 (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac); in mbedtls_ssl_tls13_calculate_verify_data()
1147 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_tls13_generate_early_key() local
1149 handshake->ciphersuite_info; in ssl_tls13_generate_early_key()
[all …]
Dssl_tls13_client.c52 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()
351 ssl->handshake->offered_group_id = group_id; in ssl_tls13_write_key_share_ext()
432 if (found == 0 || selected_group == ssl->handshake->offered_group_id) { in ssl_tls13_parse_hrr_key_share_ext()
441 ssl->handshake->offered_group_id = selected_group; in ssl_tls13_parse_hrr_key_share_ext()
482 offered_group = ssl->handshake->offered_group_id; in ssl_tls13_parse_key_share_ext()
[all …]
Dssl_tls.c789 ssl->handshake->update_checksum = ssl_update_checksum_sha384; in mbedtls_ssl_optimize_checksum()
794 ssl->handshake->update_checksum = ssl_update_checksum_sha256; in mbedtls_ssl_optimize_checksum()
815 return ssl->handshake->update_checksum(ssl, hs_hdr, sizeof(hs_hdr)); in mbedtls_ssl_add_hs_hdr_to_checksum()
828 return ssl->handshake->update_checksum(ssl, msg, msg_len); in mbedtls_ssl_add_hs_msg_to_checksum()
845 status = psa_hash_abort(&ssl->handshake->fin_sha256_psa); in mbedtls_ssl_reset_checksum()
849 status = psa_hash_setup(&ssl->handshake->fin_sha256_psa, PSA_ALG_SHA_256); in mbedtls_ssl_reset_checksum()
854 mbedtls_md_free(&ssl->handshake->fin_sha256); in mbedtls_ssl_reset_checksum()
855 mbedtls_md_init(&ssl->handshake->fin_sha256); in mbedtls_ssl_reset_checksum()
856 ret = mbedtls_md_setup(&ssl->handshake->fin_sha256, in mbedtls_ssl_reset_checksum()
862 ret = mbedtls_md_starts(&ssl->handshake->fin_sha256); in mbedtls_ssl_reset_checksum()
[all …]
Dssl_tls13_server.c147 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()
[all …]
Dssl_tls13_generic.c370 (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac, in mbedtls_ssl_tls13_process_certificate_verify()
459 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in mbedtls_ssl_tls13_parse_certificate() local
563 handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE; in mbedtls_ssl_tls13_parse_certificate()
601 handshake->received_extensions); in mbedtls_ssl_tls13_parse_certificate()
641 const int authmode = ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET in ssl_tls13_validate_certificate()
642 ? ssl->handshake->sni_authmode in ssl_tls13_validate_certificate()
768 ssl->handshake->certificate_request_context; in ssl_tls13_write_certificate_body()
770 ssl->handshake->certificate_request_context_len; in ssl_tls13_write_certificate_body()
819 3, MBEDTLS_SSL_HS_CERTIFICATE, ssl->handshake->sent_extensions); in ssl_tls13_write_certificate_body()
913 uint16_t *sig_alg = ssl->handshake->received_sig_algs; in ssl_tls13_write_certificate_verify_body()
[all …]
Dssl_client.c357 ssl->handshake->min_tls_version, in ssl_write_client_hello_cipher_suites()
443 mbedtls_ssl_handshake_params *handshake = ssl->handshake; in ssl_write_client_hello_body() local
455 (handshake->min_tls_version <= MBEDTLS_SSL_VERSION_TLS1_2) in ssl_write_client_hello_body()
461 (handshake->min_tls_version <= MBEDTLS_SSL_VERSION_TLS1_3) in ssl_write_client_hello_body()
485 memcpy(p, handshake->randbytes, MBEDTLS_CLIENT_HELLO_RANDOM_LEN); in ssl_write_client_hello_body()
527 if (handshake->cookie != NULL) { in ssl_write_client_hello_body()
529 handshake->cookie, in ssl_write_client_hello_body()
530 handshake->cookie_len); in ssl_write_client_hello_body()
531 cookie_len = handshake->cookie_len; in ssl_write_client_hello_body()
537 memcpy(p, handshake->cookie, cookie_len); in ssl_write_client_hello_body()
[all …]
Dssl_msg.c485 if (ssl->handshake->retransmit_timeout >= ssl->conf->hs_timeout_max) { in ssl_double_retransmit_timeout()
495 if (ssl->handshake->retransmit_timeout != ssl->conf->hs_timeout_min) { in ssl_double_retransmit_timeout()
496 ssl->handshake->mtu = 508; in ssl_double_retransmit_timeout()
497 MBEDTLS_SSL_DEBUG_MSG(2, ("mtu autoreduction to %d bytes", ssl->handshake->mtu)); in ssl_double_retransmit_timeout()
500 new_timeout = 2 * ssl->handshake->retransmit_timeout; in ssl_double_retransmit_timeout()
503 if (new_timeout < ssl->handshake->retransmit_timeout || in ssl_double_retransmit_timeout()
508 ssl->handshake->retransmit_timeout = new_timeout; in ssl_double_retransmit_timeout()
510 (unsigned long) ssl->handshake->retransmit_timeout)); in ssl_double_retransmit_timeout()
517 ssl->handshake->retransmit_timeout = ssl->conf->hs_timeout_min; in ssl_reset_retransmit_timeout()
519 (unsigned long) ssl->handshake->retransmit_timeout)); in ssl_reset_retransmit_timeout()
[all …]
Dssl_misc.h1007 unsigned char handshake[MBEDTLS_TLS1_3_MD_MAX_SIZE]; member
1525 if (!mbedtls_svc_key_id_is_null(ssl->handshake->psk_opaque)) { in mbedtls_ssl_get_opaque_psk()
1526 return ssl->handshake->psk_opaque; in mbedtls_ssl_get_opaque_psk()
1545 if (ssl->handshake->psk != NULL && ssl->handshake->psk_len > 0) { in mbedtls_ssl_get_psk()
1546 *psk = ssl->handshake->psk; in mbedtls_ssl_get_psk()
1547 *psk_len = ssl->handshake->psk_len; in mbedtls_ssl_get_psk()
1654 if (ssl->handshake != NULL && ssl->handshake->key_cert != NULL) { in mbedtls_ssl_own_key()
1655 key_cert = ssl->handshake->key_cert; in mbedtls_ssl_own_key()
1667 if (ssl->handshake != NULL && ssl->handshake->key_cert != NULL) { in mbedtls_ssl_own_cert()
1668 key_cert = ssl->handshake->key_cert; in mbedtls_ssl_own_cert()
[all …]
/mbedtls-latest/tests/suites/
Dtest_suite_ssl.data107 TLS 1.2:Move client handshake to HELLO_REQUEST
111 TLS 1.2:Move client handshake to CLIENT_HELLO
115 TLS 1.2:Move client handshake to SERVER_HELLO
119 TLS 1.2:Move client handshake to SERVER_CERTIFICATE
123 TLS 1.2:Move client handshake to SERVER_KEY_EXCHANGE
127 TLS 1.2:Move client handshake to CERTIFICATE_REQUEST
131 TLS 1.2:Move client handshake to SERVER_HELLO_DONE
135 TLS 1.2:Move client handshake to CLIENT_CERTIFICATE
139 TLS 1.2:Move client handshake to CLIENT_KEY_EXCHANGE
143 TLS 1.2:Move client handshake to CERTIFICATE_VERIFY
[all …]
Dtest_suite_ssl.function2544 * handshake, force the TLS 1.2 version on endpoint under test.
2772 srv_pattern.pattern = cli_pattern.pattern = "found fragmented DTLS handshake";
2790 /* Test if the server received a fragmented handshake */
2794 /* Test if the client received a fragmented handshake */
3044 TEST_ASSERT(ssl.handshake != NULL && ssl.handshake->group_list != NULL);
3047 TEST_EQUAL(ssl.handshake->
3052 TEST_EQUAL(iana_tls_group_list[i], ssl.handshake->group_list[i]);
3350 (client.ssl).handshake->xxdh_psa_peerkey[0] ^= 0x02;
3647 * Run first handshake to get a ticket from the server.
3657 * Prepare for handshake with the ticket.
[all …]
/mbedtls-latest/docs/
Dtls13-early-data.md34 buffer and data_to_write_len the number of data bytes. The handshake may
37 completing the handshake before to write and send data to the server. The
43 data sent during the first flight of client messages while the handshake is in
78 early data and then as standard post-handshake application data could
115 * Make sure the handshake is completed as it is a requisite of
150 that a TLS 1.3 server might receive during the TLS 1.3 handshake.
Duse-psa-crypto.md46 - running handshake hash;
D3.0-migration-guide.md784 handshake transcript hashes which can be obtained from the raw data
/mbedtls-latest/docs/architecture/
Dtls13-support.md286 writing TLS handshake message) there is no need to define a macro for it.
340 Overview of handshake code organization
343 The TLS 1.3 handshake protocol is implemented as a state machine. The
349 handshake message.
355 bypassed if the handshake is based on a pre-shared key and thus does not
363 The names of the handlers processing/writing an handshake message are
380 message. The latter occurs when it is not known what the next handshake message
384 next handshake message has not been received yet.
386 * fetching stage: at this stage we are sure of the type of the handshake
389 handshake message may not have been received yet, the handler returns with
[all …]
/mbedtls-latest/tests/
DDescriptions.txt16 For each ciphersuite/version/side/authmode it performs a full handshake
/mbedtls-latest/
DChangeLog28 * A TLS handshake may now call psa_crypto_init() if TLS 1.3 is enabled.
108 optional authentication (required would abort the handshake with a fatal
158 * Fix TLS connections failing when the handshake selects TLS 1.3
270 Record size limits negotiated during handshake.
389 * Fix TLS server accepting TLS 1.2 handshake while TLS 1.2
631 be completely zeroized during TLS 1.2 handshake, in both server and client
661 * Fix a remotely exploitable heap buffer overflow in TLS handshake parsing.
710 * In TLS 1.3, fix handshake failure when a client in its ClientHello
711 proposes an handshake based on PSK only key exchange mode or at least
1225 TLS 1.3 handshake should now be configured with
[all …]
/mbedtls-latest/include/mbedtls/
Dssl.h1750 mbedtls_ssl_handshake_params *MBEDTLS_PRIVATE(handshake); /*!< params required only during
/mbedtls-latest/docs/architecture/psa-migration/
Dpsa-limitations.md78 client-side the only option is to offer named groups and break the handshake
/mbedtls-latest/programs/ssl/
Dssl_server2.c3344 goto handshake; in main()
3464 handshake: in main()
/mbedtls-latest/3rdparty/p256-m/p256-m/
DREADME.md181 The sum of these operations corresponds to a TLS handshake using ECDHE-ECDSA
/mbedtls-latest/tests/src/test_helpers/
Dssl_helpers.c2562 TEST_EQUAL(server_ep.ssl.handshake->new_session_tickets_count, 0); in mbedtls_test_get_tls13_ticket()