Lines Matching refs:attributes
15 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
24 MBEDTLS_SVC_KEY_ID_GET_KEY_ID( psa_get_key_id( &attributes ) ), 0 );
26 MBEDTLS_SVC_KEY_ID_GET_OWNER_ID( psa_get_key_id( &attributes ) ), 0 );
27 TEST_EQUAL( psa_get_key_lifetime( &attributes ), 0 );
28 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 0 );
29 TEST_EQUAL( psa_get_key_algorithm( &attributes ), 0 );
30 TEST_EQUAL( psa_get_key_type( &attributes ), 0 );
31 TEST_EQUAL( psa_get_key_bits( &attributes ), 0 );
33 psa_set_key_id( &attributes, id );
34 psa_set_key_lifetime( &attributes, lifetime );
35 psa_set_key_usage_flags( &attributes, usage_flags );
36 psa_set_key_algorithm( &attributes, alg );
37 psa_set_key_type( &attributes, type );
38 psa_set_key_bits( &attributes, bits );
41 psa_get_key_id( &attributes ), id ) );
42 TEST_EQUAL( psa_get_key_lifetime( &attributes ), lifetime );
43 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), usage_flags );
44 TEST_EQUAL( psa_get_key_algorithm( &attributes ), alg );
45 TEST_EQUAL( psa_get_key_type( &attributes ), type );
46 TEST_EQUAL( psa_get_key_bits( &attributes ), bits );
48 psa_reset_key_attributes( &attributes );
51 MBEDTLS_SVC_KEY_ID_GET_KEY_ID( psa_get_key_id( &attributes ) ), 0 );
53 MBEDTLS_SVC_KEY_ID_GET_OWNER_ID( psa_get_key_id( &attributes ) ), 0 );
54 TEST_EQUAL( psa_get_key_lifetime( &attributes ), 0 );
55 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 0 );
56 TEST_EQUAL( psa_get_key_algorithm( &attributes ), 0 );
57 TEST_EQUAL( psa_get_key_type( &attributes ), 0 );
58 TEST_EQUAL( psa_get_key_bits( &attributes ), 0 );
68 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
79 psa_set_key_id( &attributes, id1 );
81 psa_set_key_lifetime( &attributes, lifetime );
83 psa_set_key_id( &attributes, id2 );
86 psa_get_key_id( &attributes ), expected_id ) );
87 TEST_EQUAL( psa_get_key_lifetime( &attributes ), expected_lifetime );
95 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
98 TEST_EQUAL( psa_get_key_slot_number( &attributes, &slot_number ),
102 psa_set_key_slot_number( &attributes, 0 );
103 PSA_ASSERT( psa_get_key_slot_number( &attributes, &slot_number ) );
107 psa_set_key_slot_number( &attributes, 42 );
108 PSA_ASSERT( psa_get_key_slot_number( &attributes, &slot_number ) );
112 psa_clear_key_slot_number( &attributes );
113 TEST_EQUAL( psa_get_key_slot_number( &attributes, &slot_number ),
117 psa_clear_key_slot_number( &attributes );
118 TEST_EQUAL( psa_get_key_slot_number( &attributes, &slot_number ),
122 psa_set_key_slot_number( &attributes, 42 );
123 PSA_ASSERT( psa_get_key_slot_number( &attributes, &slot_number ) );
125 psa_reset_key_attributes( &attributes );
126 TEST_EQUAL( psa_get_key_slot_number( &attributes, &slot_number ),