Lines Matching refs:psk
523 int psk; in known_cipher() local
526 psk = is_psk_supported(ctx); in known_cipher()
528 return (psk && is_tls_psk_with_aes_128_ccm_8(code)) || in known_cipher()
618 unsigned char psk[DTLS_PSK_MAX_KEY_LEN]; in calculate_key_block() local
622 handshake->keyx.psk.identity, in calculate_key_block()
623 handshake->keyx.psk.id_length, in calculate_key_block()
624 psk, DTLS_PSK_MAX_KEY_LEN); in calculate_key_block()
630 pre_master_len = dtls_psk_pre_master_secret(psk, len, in calculate_key_block()
634 dtls_debug_hexdump("psk", psk, len); in calculate_key_block()
636 memset(psk, 0, DTLS_PSK_MAX_KEY_LEN); in calculate_key_block()
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()
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()
2314 int psk; in dtls_send_client_hello() local
2319 psk = is_psk_supported(ctx); in dtls_send_client_hello()
2322 cipher_size = 2 + ((ecdsa) ? 2 : 0) + ((psk) ? 2 : 0); in dtls_send_client_hello()
2369 if (psk) { in dtls_send_client_hello()
2719 config->keyx.psk.id_length = len; in check_server_key_exchange_psk()
2720 memcpy(config->keyx.psk.identity, data, len); in check_server_key_exchange_psk()