• Home
  • Raw
  • Download

Lines Matching refs:handshake

177         if( ! mbedtls_svc_key_id_is_null( ssl->handshake->psk_opaque ) )  in ssl_use_opaque_psk()
301 mbedtls_ssl_sig_hash_set_add( &ssl->handshake->hash_algs, sig_cur, md_cur ); in ssl_parse_signature_algorithms_ext()
345 if( ssl->handshake->curves != NULL ) in ssl_parse_supported_elliptic_curves()
366 ssl->handshake->curves = curves; in ssl_parse_supported_elliptic_curves()
409 ssl->handshake->ecdh_ctx.point_format = p[0]; in ssl_parse_supported_point_formats()
412 mbedtls_ecjpake_set_point_format( &ssl->handshake->ecjpake_ctx, in ssl_parse_supported_point_formats()
435 if( mbedtls_ecjpake_check( &ssl->handshake->ecjpake_ctx ) != 0 ) in ssl_parse_ecjpake_kkpp()
441 if( ( ret = mbedtls_ecjpake_read_round_one( &ssl->handshake->ecjpake_ctx, in ssl_parse_ecjpake_kkpp()
451 ssl->handshake->cli_exts |= MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK; in ssl_parse_ecjpake_kkpp()
537 ssl->handshake->cid_in_use = MBEDTLS_SSL_CID_ENABLED; in ssl_parse_cid_ext()
538 ssl->handshake->peer_cid_len = (uint8_t) peer_cid_len; in ssl_parse_cid_ext()
539 memcpy( ssl->handshake->peer_cid, buf, peer_cid_len ); in ssl_parse_cid_ext()
589 ssl->handshake->extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED; in ssl_parse_extended_ms_ext()
613 ssl->handshake->new_session_ticket = 1; in ssl_parse_session_ticket_ext()
661 ssl->handshake->resume = 1; in ssl_parse_session_ticket_ext()
664 ssl->handshake->new_session_ticket = 0; in ssl_parse_session_ticket_ext()
917 if( ssl->handshake->sni_key_cert != NULL ) in ssl_pick_cert()
918 list = ssl->handshake->sni_key_cert; in ssl_pick_cert()
964 ssl_check_key_curve( &cur->cert->pk, ssl->handshake->curves ) != 0 ) in ssl_pick_cert()
998 ssl->handshake->key_cert = cur; in ssl_pick_cert()
1000 ssl->handshake->key_cert->cert ); in ssl_pick_cert()
1047 ( ssl->handshake->cli_exts & MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK ) == 0 ) in ssl_ciphersuite_match()
1058 ( ssl->handshake->curves == NULL || in ssl_ciphersuite_match()
1059 ssl->handshake->curves[0] == NULL ) ) in ssl_ciphersuite_match()
1086 … mbedtls_ssl_sig_hash_set_find( &ssl->handshake->hash_algs, sig_type ) == MBEDTLS_MD_NONE ) in ssl_ciphersuite_match()
1280 ssl->handshake->update_checksum( ssl, buf, msg_len ); in ssl_parse_client_hello()
1329 if( cli_msg_seq != ssl->handshake->in_msg_seq ) in ssl_parse_client_hello()
1333 ssl->handshake->in_msg_seq ) ); in ssl_parse_client_hello()
1337 ssl->handshake->in_msg_seq++; in ssl_parse_client_hello()
1344 ssl->handshake->out_msg_seq = cli_msg_seq; in ssl_parse_client_hello()
1345 ssl->handshake->in_msg_seq = cli_msg_seq + 1; in ssl_parse_client_hello()
1400 ssl->handshake->max_major_ver = ssl->major_ver; in ssl_parse_client_hello()
1401 ssl->handshake->max_minor_ver = ssl->minor_ver; in ssl_parse_client_hello()
1428 memcpy( ssl->handshake->randbytes, buf + 2, 32 ); in ssl_parse_client_hello()
1484 ssl->handshake->verify_cookie_len = 1; in ssl_parse_client_hello()
1489 ssl->handshake->verify_cookie_len = 0; in ssl_parse_client_hello()
1659 ssl->handshake->cli_exts |= MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT; in ssl_parse_client_hello()
1771 mbedtls_ssl_sig_hash_set_const_hash( &ssl->handshake->hash_algs, md_default ); in ssl_parse_client_hello()
1904 ssl->handshake->ciphersuite_info = ciphersuite_info; in ssl_parse_client_hello()
1922 mbedtls_md_type_t md_alg = mbedtls_ssl_sig_hash_set_find( &ssl->handshake->hash_algs, in ssl_parse_client_hello()
1953 if( ssl->handshake->cid_in_use == MBEDTLS_SSL_CID_DISABLED ) in ssl_write_cid_ext()
2036 if( ssl->handshake->extended_ms == MBEDTLS_SSL_EXTENDED_MS_DISABLED ) in ssl_write_extended_ms_ext()
2062 if( ssl->handshake->new_session_ticket == 0 ) in ssl_write_session_ticket_ext()
2156 if( ( ssl->handshake->cli_exts & in ssl_write_supported_point_formats_ext()
2191 if( ssl->handshake->ciphersuite_info->key_exchange != in ssl_write_ecjpake_kkpp_ext()
2206 ret = mbedtls_ecjpake_write_round_one( &ssl->handshake->ecjpake_ctx, in ssl_write_ecjpake_kkpp_ext()
2404 if( ssl->handshake->resume == 1 ) in ssl_handle_id_based_session_resumption()
2437 ssl->handshake->resume = 1; in ssl_handle_id_based_session_resumption()
2457 ssl->handshake->verify_cookie_len != 0 ) in ssl_write_server_hello()
2508 memcpy( ssl->handshake->randbytes + 32, buf + 6, 32 ); in ssl_write_server_hello()
2514 if( ssl->handshake->resume == 0 ) in ssl_write_server_hello()
2527 if( ssl->handshake->new_session_ticket != 0 ) in ssl_write_server_hello()
2571 ssl->handshake->resume ? "a" : "no" ) ); in ssl_write_server_hello()
2662 ssl->handshake->ciphersuite_info; in ssl_write_certificate_request()
2681 ssl->handshake->ciphersuite_info; in ssl_write_certificate_request()
2694 if( ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET ) in ssl_write_certificate_request()
2695 authmode = ssl->handshake->sni_authmode; in ssl_write_certificate_request()
2801 if( ssl->handshake->sni_ca_chain != NULL ) in ssl_write_certificate_request()
2802 crt = ssl->handshake->sni_ca_chain; in ssl_write_certificate_request()
2856 if( ( ret = mbedtls_ecdh_get_params( &ssl->handshake->ecdh_ctx, in ssl_get_ecdh_params_from_cert()
2886 ssl->handshake->async_in_progress = 0; in ssl_resume_server_key_exchange()
2902 ssl->handshake->ciphersuite_info; in ssl_prepare_server_key_exchange()
2941 &ssl->handshake->ecjpake_ctx, in ssl_prepare_server_key_exchange()
2995 if( ( ret = mbedtls_dhm_set_group( &ssl->handshake->dhm_ctx, in ssl_prepare_server_key_exchange()
3004 &ssl->handshake->dhm_ctx, in ssl_prepare_server_key_exchange()
3005 (int) mbedtls_dhm_get_len( &ssl->handshake->dhm_ctx ), in ssl_prepare_server_key_exchange()
3019 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: X ", &ssl->handshake->dhm_ctx.X ); in ssl_prepare_server_key_exchange()
3020 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: P ", &ssl->handshake->dhm_ctx.P ); in ssl_prepare_server_key_exchange()
3021 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: G ", &ssl->handshake->dhm_ctx.G ); in ssl_prepare_server_key_exchange()
3022 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GX", &ssl->handshake->dhm_ctx.GX ); in ssl_prepare_server_key_exchange()
3049 for( curve = ssl->handshake->curves; *curve != NULL; curve++ ) in ssl_prepare_server_key_exchange()
3062 if( ( ret = mbedtls_ecdh_setup( &ssl->handshake->ecdh_ctx, in ssl_prepare_server_key_exchange()
3070 &ssl->handshake->ecdh_ctx, &len, in ssl_prepare_server_key_exchange()
3085 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_prepare_server_key_exchange()
3124 ( md_alg = mbedtls_ssl_sig_hash_set_find( &ssl->handshake->hash_algs, in ssl_prepare_server_key_exchange()
3205 ssl->handshake->async_in_progress = 1; in ssl_prepare_server_key_exchange()
3208 ssl->handshake->async_in_progress = 1; in ssl_prepare_server_key_exchange()
3255 ssl->handshake->ciphersuite_info; in ssl_write_server_key_exchange()
3286 if( ssl->handshake->async_in_progress != 0 ) in ssl_write_server_key_exchange()
3409 if( ( ret = mbedtls_dhm_read_public( &ssl->handshake->dhm_ctx, *p, n ) ) != 0 ) in ssl_parse_client_dh_public()
3417 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GY", &ssl->handshake->dhm_ctx.GY ); in ssl_parse_client_dh_public()
3437 ssl->handshake->async_in_progress = 0; in ssl_resume_decrypt_pms()
3460 if( ssl->handshake->async_in_progress != 0 ) in ssl_decrypt_encrypted_pms()
3505 ssl->handshake->async_in_progress = 1; in ssl_decrypt_encrypted_pms()
3511 ssl->handshake->async_in_progress = 1; in ssl_decrypt_encrypted_pms()
3538 unsigned char *pms = ssl->handshake->premaster + pms_offset; in ssl_parse_encrypted_pms()
3565 mbedtls_ssl_write_version( ssl->handshake->max_major_ver, in ssl_parse_encrypted_pms()
3566 ssl->handshake->max_minor_ver, in ssl_parse_encrypted_pms()
3602 if( sizeof( ssl->handshake->premaster ) < pms_offset || in ssl_parse_encrypted_pms()
3603 sizeof( ssl->handshake->premaster ) - pms_offset < 48 ) in ssl_parse_encrypted_pms()
3608 ssl->handshake->pmslen = 48; in ssl_parse_encrypted_pms()
3612 for( i = 0; i < ssl->handshake->pmslen; i++ ) in ssl_parse_encrypted_pms()
3687 ciphersuite_info = ssl->handshake->ciphersuite_info; in ssl_parse_client_key_exchange()
3696 ( ssl->handshake->async_in_progress != 0 ) ) in ssl_parse_client_key_exchange()
3741 if( ( ret = mbedtls_dhm_calc_secret( &ssl->handshake->dhm_ctx, in ssl_parse_client_key_exchange()
3742 ssl->handshake->premaster, in ssl_parse_client_key_exchange()
3744 &ssl->handshake->pmslen, in ssl_parse_client_key_exchange()
3751 MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: K ", &ssl->handshake->dhm_ctx.K ); in ssl_parse_client_key_exchange()
3764 if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3771 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3774 if( ( ret = mbedtls_ecdh_calc_secret( &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3775 &ssl->handshake->pmslen, in ssl_parse_client_key_exchange()
3776 ssl->handshake->premaster, in ssl_parse_client_key_exchange()
3784 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3827 if ( ssl->handshake->async_in_progress != 0 ) in ssl_parse_client_key_exchange()
3910 if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3923 MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx, in ssl_parse_client_key_exchange()
3949 ret = mbedtls_ecjpake_read_round_two( &ssl->handshake->ecjpake_ctx, in ssl_parse_client_key_exchange()
3957 ret = mbedtls_ecjpake_derive_secret( &ssl->handshake->ecjpake_ctx, in ssl_parse_client_key_exchange()
3958 ssl->handshake->premaster, 32, &ssl->handshake->pmslen, in ssl_parse_client_key_exchange()
3990 ssl->handshake->ciphersuite_info; in ssl_parse_certificate_verify()
4017 ssl->handshake->ciphersuite_info; in ssl_parse_certificate_verify()
4066 peer_pk = &ssl->handshake->peer_pubkey; in ssl_parse_certificate_verify()
4160 ssl->handshake->calc_verify( ssl, hash, &dummy_hlen ); in ssl_parse_certificate_verify()
4220 ssl->handshake->new_session_ticket = 0; in ssl_write_new_session_ticket()
4322 if( ssl->handshake->new_session_ticket != 0 ) in mbedtls_ssl_handshake_server_step()