Lines Matching refs:handshake
600 dtls_handshake_parameters_t *handshake, in calculate_key_block() argument
615 switch (handshake->cipher) { in calculate_key_block()
622 handshake->keyx.psk.identity, in calculate_key_block()
623 handshake->keyx.psk.id_length, in calculate_key_block()
647 pre_master_len = dtls_ecdh_pre_master_secret(handshake->keyx.ecdsa.own_eph_priv, in calculate_key_block()
648 handshake->keyx.ecdsa.other_eph_pub_x, in calculate_key_block()
649 handshake->keyx.ecdsa.other_eph_pub_y, in calculate_key_block()
650 sizeof(handshake->keyx.ecdsa.own_eph_priv), in calculate_key_block()
665 dtls_debug_dump("client_random", handshake->tmp.random.client, DTLS_RANDOM_LENGTH); in calculate_key_block()
666 dtls_debug_dump("server_random", handshake->tmp.random.server, DTLS_RANDOM_LENGTH); in calculate_key_block()
671 handshake->tmp.random.client, DTLS_RANDOM_LENGTH, in calculate_key_block()
672 handshake->tmp.random.server, DTLS_RANDOM_LENGTH, in calculate_key_block()
685 handshake->tmp.random.server, DTLS_RANDOM_LENGTH, in calculate_key_block()
686 handshake->tmp.random.client, DTLS_RANDOM_LENGTH, in calculate_key_block()
690 memcpy(handshake->tmp.master_secret, master_secret, DTLS_MASTER_SECRET_LENGTH); in calculate_key_block()
693 security->cipher = handshake->cipher; in calculate_key_block()
694 security->compression = handshake->compression; in calculate_key_block()
785 dtls_handshake_parameters_t *handshake = peer->handshake_params; in dtls_check_tls_extension() local
789 if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher)) { in dtls_check_tls_extension()
865 if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && client_hello) { in dtls_check_tls_extension()
871 } else if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && !client_hello) { in dtls_check_tls_extension()
1006 dtls_handshake_parameters_t *handshake, in check_client_keyexchange() argument
1010 if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher)) { in check_client_keyexchange()
1030 memcpy(handshake->keyx.ecdsa.other_eph_pub_x, data, in check_client_keyexchange()
1031 sizeof(handshake->keyx.ecdsa.other_eph_pub_x)); in check_client_keyexchange()
1032 data += sizeof(handshake->keyx.ecdsa.other_eph_pub_x); in check_client_keyexchange()
1034 memcpy(handshake->keyx.ecdsa.other_eph_pub_y, data, in check_client_keyexchange()
1035 sizeof(handshake->keyx.ecdsa.other_eph_pub_y)); in check_client_keyexchange()
1036 data += sizeof(handshake->keyx.ecdsa.other_eph_pub_y); in check_client_keyexchange()
1040 if (is_tls_psk_with_aes_128_ccm_8(handshake->cipher)) { in check_client_keyexchange()
1062 handshake->keyx.psk.id_length = id_length; in check_client_keyexchange()
1063 memcpy(handshake->keyx.psk.identity, data, id_length); in check_client_keyexchange()
1745 dtls_handshake_parameters_t *handshake = peer->handshake_params; in dtls_send_server_hello() local
1748 ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher); in dtls_send_server_hello()
1762 dtls_int_to_uint32(handshake->tmp.random.server, now / CLOCK_SECOND); in dtls_send_server_hello()
1763 dtls_prng(handshake->tmp.random.server + 4, 28); in dtls_send_server_hello()
1765 memcpy(p, handshake->tmp.random.server, DTLS_RANDOM_LENGTH); in dtls_send_server_hello()
1770 if (handshake->cipher != TLS_NULL_WITH_NULL_NULL) { in dtls_send_server_hello()
1772 dtls_int_to_uint16(p, handshake->cipher); in dtls_send_server_hello()
1776 *p++ = compression_methods[handshake->compression]; in dtls_send_server_hello()
2168 dtls_handshake_parameters_t *handshake = peer->handshake_params; in dtls_send_client_key_exchange() local
2172 switch (handshake->cipher) { in dtls_send_client_key_exchange()
2178 handshake->keyx.psk.identity, handshake->keyx.psk.id_length, in dtls_send_client_key_exchange()
2181 sizeof(handshake->keyx.psk.identity))); in dtls_send_client_key_exchange()
2188 memset(&handshake->keyx.psk, 0, sizeof(dtls_handshake_parameters_psk_t)); in dtls_send_client_key_exchange()
2192 handshake->keyx.psk.id_length = (unsigned int)len; in dtls_send_client_key_exchange()
2193 memcpy(handshake->keyx.psk.identity, p + sizeof(uint16), len); in dtls_send_client_key_exchange()
2195 dtls_int_to_uint16(p, handshake->keyx.psk.id_length); in dtls_send_client_key_exchange()
2198 memcpy(p, handshake->keyx.psk.identity, handshake->keyx.psk.id_length); in dtls_send_client_key_exchange()
2199 p += handshake->keyx.psk.id_length; in dtls_send_client_key_exchange()
2316 dtls_handshake_parameters_t *handshake = peer->handshake_params; in dtls_send_client_hello() local
2341 dtls_int_to_uint32(handshake->tmp.random.client, now / CLOCK_SECOND); in dtls_send_client_hello()
2342 dtls_prng(handshake->tmp.random.client + sizeof(uint32), in dtls_send_client_hello()
2346 memcpy(p, handshake->tmp.random.client, DTLS_RANDOM_LENGTH); in dtls_send_client_hello()
2464 dtls_handshake_parameters_t *handshake = peer->handshake_params; in check_server_hello() local
2496 memcpy(handshake->tmp.random.server, data, DTLS_RANDOM_LENGTH); in check_server_hello()
2506 handshake->cipher = dtls_uint16_to_int(data); in check_server_hello()
2507 if (!known_cipher(ctx, handshake->cipher, 1)) { in check_server_hello()
2813 dtls_handshake_parameters_t *handshake = peer->handshake_params; in check_server_hellodone() local
2820 if (handshake->do_client_auth) { in check_server_hellodone()
2846 if (handshake->do_client_auth) { in check_server_hellodone()
2857 res = calculate_key_block(ctx, handshake, peer, in check_server_hellodone()
3461 dtls_handshake_parameters_t *handshake = peer->handshake_params; in handle_ccs() local
3479 err = calculate_key_block(ctx, handshake, peer, in handle_ccs()