Lines Matching refs:handshake

175         if( ! mbedtls_svc_key_id_is_null( ssl->handshake->psk_opaque ) )  in ssl_use_opaque_psk()
299 mbedtls_ssl_sig_hash_set_add( &ssl->handshake->hash_algs, sig_cur, md_cur ); in ssl_parse_signature_algorithms_ext()
343 if( ssl->handshake->curves != NULL ) in ssl_parse_supported_elliptic_curves()
364 ssl->handshake->curves = curves; in ssl_parse_supported_elliptic_curves()
407 ssl->handshake->ecdh_ctx.point_format = p[0]; in ssl_parse_supported_point_formats()
410 mbedtls_ecjpake_set_point_format( &ssl->handshake->ecjpake_ctx, in ssl_parse_supported_point_formats()
433 if( mbedtls_ecjpake_check( &ssl->handshake->ecjpake_ctx ) != 0 ) in ssl_parse_ecjpake_kkpp()
439 if( ( ret = mbedtls_ecjpake_read_round_one( &ssl->handshake->ecjpake_ctx, in ssl_parse_ecjpake_kkpp()
449 ssl->handshake->cli_exts |= MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK; in ssl_parse_ecjpake_kkpp()
535 ssl->handshake->cid_in_use = MBEDTLS_SSL_CID_ENABLED; in ssl_parse_cid_ext()
536 ssl->handshake->peer_cid_len = (uint8_t) peer_cid_len; in ssl_parse_cid_ext()
537 memcpy( ssl->handshake->peer_cid, buf, peer_cid_len ); in ssl_parse_cid_ext()
587 ssl->handshake->extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED; in ssl_parse_extended_ms_ext()
611 ssl->handshake->new_session_ticket = 1; in ssl_parse_session_ticket_ext()
659 ssl->handshake->resume = 1; in ssl_parse_session_ticket_ext()
662 ssl->handshake->new_session_ticket = 0; in ssl_parse_session_ticket_ext()
915 if( ssl->handshake->sni_key_cert != NULL ) in ssl_pick_cert()
916 list = ssl->handshake->sni_key_cert; in ssl_pick_cert()
962 ssl_check_key_curve( &cur->cert->pk, ssl->handshake->curves ) != 0 ) in ssl_pick_cert()
996 ssl->handshake->key_cert = cur; in ssl_pick_cert()
998 ssl->handshake->key_cert->cert ); in ssl_pick_cert()
1045 ( ssl->handshake->cli_exts & MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK ) == 0 ) in ssl_ciphersuite_match()
1056 ( ssl->handshake->curves == NULL || in ssl_ciphersuite_match()
1057 ssl->handshake->curves[0] == NULL ) ) in ssl_ciphersuite_match()
1084 … mbedtls_ssl_sig_hash_set_find( &ssl->handshake->hash_algs, sig_type ) == MBEDTLS_MD_NONE ) in ssl_ciphersuite_match()
1278 ssl->handshake->update_checksum( ssl, buf, msg_len ); in ssl_parse_client_hello()
1327 if( cli_msg_seq != ssl->handshake->in_msg_seq ) in ssl_parse_client_hello()
1331 ssl->handshake->in_msg_seq ) ); in ssl_parse_client_hello()
1335 ssl->handshake->in_msg_seq++; in ssl_parse_client_hello()
1342 ssl->handshake->out_msg_seq = cli_msg_seq; in ssl_parse_client_hello()
1343 ssl->handshake->in_msg_seq = cli_msg_seq + 1; in ssl_parse_client_hello()
1398 ssl->handshake->max_major_ver = ssl->major_ver; in ssl_parse_client_hello()
1399 ssl->handshake->max_minor_ver = ssl->minor_ver; in ssl_parse_client_hello()
1426 memcpy( ssl->handshake->randbytes, buf + 2, 32 ); in ssl_parse_client_hello()
1482 ssl->handshake->verify_cookie_len = 1; in ssl_parse_client_hello()
1487 ssl->handshake->verify_cookie_len = 0; in ssl_parse_client_hello()
1657 ssl->handshake->cli_exts |= MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT; in ssl_parse_client_hello()
1769 mbedtls_ssl_sig_hash_set_const_hash( &ssl->handshake->hash_algs, md_default ); in ssl_parse_client_hello()
1902 ssl->handshake->ciphersuite_info = ciphersuite_info; in ssl_parse_client_hello()
1920 mbedtls_md_type_t md_alg = mbedtls_ssl_sig_hash_set_find( &ssl->handshake->hash_algs, in ssl_parse_client_hello()
1951 if( ssl->handshake->cid_in_use == MBEDTLS_SSL_CID_DISABLED ) in ssl_write_cid_ext()
2034 if( ssl->handshake->extended_ms == MBEDTLS_SSL_EXTENDED_MS_DISABLED ) in ssl_write_extended_ms_ext()
2060 if( ssl->handshake->new_session_ticket == 0 ) in ssl_write_session_ticket_ext()
2154 if( ( ssl->handshake->cli_exts & in ssl_write_supported_point_formats_ext()
2189 if( ssl->handshake->ciphersuite_info->key_exchange != in ssl_write_ecjpake_kkpp_ext()
2204 ret = mbedtls_ecjpake_write_round_one( &ssl->handshake->ecjpake_ctx, in ssl_write_ecjpake_kkpp_ext()
2402 if( ssl->handshake->resume == 1 ) in ssl_handle_id_based_session_resumption()
2435 ssl->handshake->resume = 1; in ssl_handle_id_based_session_resumption()
2455 ssl->handshake->verify_cookie_len != 0 ) in ssl_write_server_hello()
2506 memcpy( ssl->handshake->randbytes + 32, buf + 6, 32 ); in ssl_write_server_hello()
2512 if( ssl->handshake->resume == 0 ) in ssl_write_server_hello()
2525 if( ssl->handshake->new_session_ticket != 0 ) in ssl_write_server_hello()
2569 ssl->handshake->resume ? "a" : "no" ) ); in ssl_write_server_hello()
2660 ssl->handshake->ciphersuite_info; in ssl_write_certificate_request()
2679 ssl->handshake->ciphersuite_info; in ssl_write_certificate_request()
2692 if( ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET ) in ssl_write_certificate_request()
2693 authmode = ssl->handshake->sni_authmode; in ssl_write_certificate_request()
2799 if( ssl->handshake->sni_ca_chain != NULL ) in ssl_write_certificate_request()
2800 crt = ssl->handshake->sni_ca_chain; in ssl_write_certificate_request()
2854 if( ( ret = mbedtls_ecdh_get_params( &ssl->handshake->ecdh_ctx, in ssl_get_ecdh_params_from_cert()
2884 ssl->handshake->async_in_progress = 0; in ssl_resume_server_key_exchange()
2900 ssl->handshake->ciphersuite_info; in ssl_prepare_server_key_exchange()
2939 &ssl->handshake->ecjpake_ctx, in ssl_prepare_server_key_exchange()
2993 if( ( ret = mbedtls_dhm_set_group( &ssl->handshake->dhm_ctx, in ssl_prepare_server_key_exchange()
3002 &ssl->handshake->dhm_ctx, in ssl_prepare_server_key_exchange()
3003 (int) mbedtls_dhm_get_len( &ssl->handshake->dhm_ctx ), in ssl_prepare_server_key_exchange()
3017 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: X ", &ssl->handshake->dhm_ctx.X ); in ssl_prepare_server_key_exchange()
3018 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: P ", &ssl->handshake->dhm_ctx.P ); in ssl_prepare_server_key_exchange()
3019 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: G ", &ssl->handshake->dhm_ctx.G ); in ssl_prepare_server_key_exchange()
3020 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GX", &ssl->handshake->dhm_ctx.GX ); in ssl_prepare_server_key_exchange()
3047 for( curve = ssl->handshake->curves; *curve != NULL; curve++ ) in ssl_prepare_server_key_exchange()
3060 if( ( ret = mbedtls_ecdh_setup( &ssl->handshake->ecdh_ctx, in ssl_prepare_server_key_exchange()
3068 &ssl->handshake->ecdh_ctx, &len, in ssl_prepare_server_key_exchange()
3083 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_prepare_server_key_exchange()
3118 ( md_alg = mbedtls_ssl_sig_hash_set_find( &ssl->handshake->hash_algs, in ssl_prepare_server_key_exchange()
3199 ssl->handshake->async_in_progress = 1; in ssl_prepare_server_key_exchange()
3202 ssl->handshake->async_in_progress = 1; in ssl_prepare_server_key_exchange()
3249 ssl->handshake->ciphersuite_info; in ssl_write_server_key_exchange()
3280 if( ssl->handshake->async_in_progress != 0 ) in ssl_write_server_key_exchange()
3403 if( ( ret = mbedtls_dhm_read_public( &ssl->handshake->dhm_ctx, *p, n ) ) != 0 ) in ssl_parse_client_dh_public()
3411 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GY", &ssl->handshake->dhm_ctx.GY ); in ssl_parse_client_dh_public()
3431 ssl->handshake->async_in_progress = 0; in ssl_resume_decrypt_pms()
3454 if( ssl->handshake->async_in_progress != 0 ) in ssl_decrypt_encrypted_pms()
3499 ssl->handshake->async_in_progress = 1; in ssl_decrypt_encrypted_pms()
3505 ssl->handshake->async_in_progress = 1; in ssl_decrypt_encrypted_pms()
3532 unsigned char *pms = ssl->handshake->premaster + pms_offset; in ssl_parse_encrypted_pms()
3559 mbedtls_ssl_write_version( ssl->handshake->max_major_ver, in ssl_parse_encrypted_pms()
3560 ssl->handshake->max_minor_ver, in ssl_parse_encrypted_pms()
3605 if( sizeof( ssl->handshake->premaster ) < pms_offset || in ssl_parse_encrypted_pms()
3606 sizeof( ssl->handshake->premaster ) - pms_offset < 48 ) in ssl_parse_encrypted_pms()
3611 ssl->handshake->pmslen = 48; in ssl_parse_encrypted_pms()
3615 for( i = 0; i < ssl->handshake->pmslen; i++ ) in ssl_parse_encrypted_pms()
3690 ciphersuite_info = ssl->handshake->ciphersuite_info; in ssl_parse_client_key_exchange()
3699 ( ssl->handshake->async_in_progress != 0 ) ) in ssl_parse_client_key_exchange()
3744 if( ( ret = mbedtls_dhm_calc_secret( &ssl->handshake->dhm_ctx, in ssl_parse_client_key_exchange()
3745 ssl->handshake->premaster, in ssl_parse_client_key_exchange()
3747 &ssl->handshake->pmslen, in ssl_parse_client_key_exchange()
3754 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: K ", &ssl->handshake->dhm_ctx.K ); in ssl_parse_client_key_exchange()
3767 if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3774 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3777 if( ( ret = mbedtls_ecdh_calc_secret( &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3778 &ssl->handshake->pmslen, in ssl_parse_client_key_exchange()
3779 ssl->handshake->premaster, in ssl_parse_client_key_exchange()
3787 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3830 if ( ssl->handshake->async_in_progress != 0 ) in ssl_parse_client_key_exchange()
3913 if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3926 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3952 ret = mbedtls_ecjpake_read_round_two( &ssl->handshake->ecjpake_ctx, in ssl_parse_client_key_exchange()
3960 ret = mbedtls_ecjpake_derive_secret( &ssl->handshake->ecjpake_ctx, in ssl_parse_client_key_exchange()
3961 ssl->handshake->premaster, 32, &ssl->handshake->pmslen, in ssl_parse_client_key_exchange()
3993 ssl->handshake->ciphersuite_info; in ssl_parse_certificate_verify()
4020 ssl->handshake->ciphersuite_info; in ssl_parse_certificate_verify()
4069 peer_pk = &ssl->handshake->peer_pubkey; in ssl_parse_certificate_verify()
4163 ssl->handshake->calc_verify( ssl, hash, &dummy_hlen ); in ssl_parse_certificate_verify()
4223 ssl->handshake->new_session_ticket = 0; in ssl_write_new_session_ticket()
4325 if( ssl->handshake->new_session_ticket != 0 ) in mbedtls_ssl_handshake_server_step()