Lines Matching refs:role
535 dtls_debug("key_block (%d bytes):\n", dtls_kb_size(config, peer->role)); in dtls_debug_keyblock()
537 dtls_kb_client_mac_secret(config, peer->role), in dtls_debug_keyblock()
538 dtls_kb_mac_secret_size(config, peer->role)); in dtls_debug_keyblock()
541 dtls_kb_server_mac_secret(config, peer->role), in dtls_debug_keyblock()
542 dtls_kb_mac_secret_size(config, peer->role)); in dtls_debug_keyblock()
545 dtls_kb_client_write_key(config, peer->role), in dtls_debug_keyblock()
546 dtls_kb_key_size(config, peer->role)); in dtls_debug_keyblock()
549 dtls_kb_server_write_key(config, peer->role), in dtls_debug_keyblock()
550 dtls_kb_key_size(config, peer->role)); in dtls_debug_keyblock()
553 dtls_kb_client_iv(config, peer->role), in dtls_debug_keyblock()
554 dtls_kb_iv_size(config, peer->role)); in dtls_debug_keyblock()
557 dtls_kb_server_iv(config, peer->role), in dtls_debug_keyblock()
558 dtls_kb_iv_size(config, peer->role)); in dtls_debug_keyblock()
603 dtls_peer_type role) { in calculate_key_block() argument
688 dtls_kb_size(security, role)); in calculate_key_block()
1131 if (peer->role == DTLS_CLIENT) { in check_finished()
1286 memcpy(nonce, dtls_kb_local_iv(security, peer->role), in dtls_prepare_record()
1287 dtls_kb_iv_size(security, peer->role)); in dtls_prepare_record()
1288 memcpy(nonce + dtls_kb_iv_size(security, peer->role), start, 8); /* epoch + seq_num */ in dtls_prepare_record()
1291 dtls_debug_dump("key:", dtls_kb_local_write_key(security, peer->role), in dtls_prepare_record()
1292 dtls_kb_key_size(security, peer->role)); in dtls_prepare_record()
1304 dtls_kb_local_write_key(security, peer->role), in dtls_prepare_record()
1305 dtls_kb_key_size(security, peer->role), in dtls_prepare_record()
2858 &peer->session, peer->role); in check_server_hellodone()
2908 memcpy(nonce, dtls_kb_remote_iv(security, peer->role), in decrypt_verify()
2909 dtls_kb_iv_size(security, peer->role)); in decrypt_verify()
2912 memcpy(nonce + dtls_kb_iv_size(security, peer->role), *cleartext, 8); in decrypt_verify()
2917 dtls_debug_dump("key", dtls_kb_remote_write_key(security, peer->role), in decrypt_verify()
2918 dtls_kb_key_size(security, peer->role)); in decrypt_verify()
2931 dtls_kb_remote_write_key(security, peer->role), in decrypt_verify()
2932 dtls_kb_key_size(security, peer->role), in decrypt_verify()
2976 if (peer->role == DTLS_CLIENT) { in dtls_renegotiate()
2984 } else if (peer->role == DTLS_SERVER) { in dtls_renegotiate()
2993 const dtls_peer_type role, const dtls_state_t state, in handle_handshake_msg() argument
3053 if ((role == DTLS_CLIENT && state != DTLS_STATE_WAIT_SERVERCERTIFICATE) || in handle_handshake_msg()
3054 (role == DTLS_SERVER && state != DTLS_STATE_WAIT_CLIENTCERTIFICATE)) { in handle_handshake_msg()
3062 if (role == DTLS_CLIENT) { in handle_handshake_msg()
3064 } else if (role == DTLS_SERVER){ in handle_handshake_msg()
3142 if (role == DTLS_SERVER) { in handle_handshake_msg()
3253 peer->role = DTLS_SERVER; in handle_handshake_msg()
3348 const dtls_peer_type role, const dtls_state_t state, in handle_handshake() argument
3373 return handle_handshake_msg(ctx, peer, session, role, state, data, in handle_handshake()
3425 res = handle_handshake_msg(ctx, peer, session, role, state, data, data_length); in handle_handshake()
3439 … res = handle_handshake_msg(ctx, peer, session, role, peer->state, node->data, node->length); in handle_handshake()
3478 if (peer->role == DTLS_SERVER) { in handle_ccs()
3480 &peer->session, peer->role); in handle_ccs()
3612 dtls_peer_type role; in dtls_handle_message() local
3629 role = peer->role; in dtls_handle_message()
3636 role = DTLS_SERVER; in dtls_handle_message()
3693 if (role == DTLS_SERVER && state == DTLS_STATE_WAIT_FINISHED) { in dtls_handle_message()
3704 err = handle_handshake(ctx, peer, session, role, state, data, data_length); in dtls_handle_message()
3840 peer->role = DTLS_CLIENT; in dtls_connect_peer()