Lines Matching refs:attributes
53 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
55 psa_set_key_lifetime(&attributes, key_lifetime);
56 psa_set_key_type(&attributes, key_type);
57 psa_set_key_bits(&attributes, key_bits);
58 psa_set_key_usage_flags(&attributes, key_usage);
59 psa_set_key_algorithm(&attributes, key_alg);
60 psa_set_key_enrollment_algorithm(&attributes, key_alg2);
64 &attributes,
88 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
93 &attributes);
100 TEST_EQUAL(psa_get_key_lifetime(&attributes),
102 TEST_EQUAL(psa_get_key_type(&attributes),
104 TEST_EQUAL(psa_get_key_bits(&attributes),
106 TEST_EQUAL(psa_get_key_usage_flags(&attributes),
108 TEST_EQUAL(psa_get_key_algorithm(&attributes),
110 TEST_EQUAL(psa_get_key_enrollment_algorithm(&attributes),
126 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
132 psa_set_key_id(&attributes, key_id);
133 psa_set_key_type(&attributes, PSA_KEY_TYPE_RAW_DATA);
135 TEST_EQUAL(psa_import_key(&attributes, data, data_length, &key_id),
159 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
163 psa_set_key_id(&attributes, key_id);
164 psa_set_key_type(&attributes, first_type);
166 PSA_ASSERT(psa_import_key(&attributes, first_data->x, first_data->len,
187 psa_set_key_id(&attributes, key_id);
188 psa_set_key_type(&attributes, second_type);
189 PSA_ASSERT(psa_import_key(&attributes, second_data->x, second_data->len,
208 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
212 psa_set_key_id(&attributes, key_id);
213 psa_set_key_type(&attributes, type);
214 TEST_EQUAL(psa_import_key(&attributes, data->x, data->len, &returned_key_id),
231 psa_reset_key_attributes(&attributes);
232 PSA_ASSERT(psa_get_key_attributes(key_id, &attributes));
233 TEST_ASSERT(mbedtls_svc_key_id_equal(psa_get_key_id(&attributes),
235 TEST_EQUAL(psa_get_key_lifetime(&attributes),
237 TEST_EQUAL(psa_get_key_type(&attributes), type);
238 TEST_EQUAL(psa_get_key_usage_flags(&attributes), 0);
239 TEST_EQUAL(psa_get_key_algorithm(&attributes), 0);
245 * Key attributes may have been returned by psa_get_key_attributes()
248 psa_reset_key_attributes(&attributes);
266 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
272 psa_set_key_id(&attributes, key_id);
273 psa_set_key_type(&attributes, type);
274 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_EXPORT);
277 PSA_ASSERT(psa_import_key(&attributes, data->x, data->len,
288 psa_reset_key_attributes(&attributes);
289 PSA_ASSERT(psa_get_key_attributes(key_id, &attributes));
291 psa_get_key_id(&attributes), key_id));
292 TEST_EQUAL(psa_get_key_lifetime(&attributes),
294 TEST_EQUAL(psa_get_key_type(&attributes), type);
295 TEST_EQUAL(psa_get_key_bits(&attributes), (size_t) expected_bits);
296 TEST_EQUAL(psa_get_key_usage_flags(&attributes), PSA_KEY_USAGE_EXPORT);
297 TEST_EQUAL(psa_get_key_algorithm(&attributes), 0);
316 * Key attributes may have been returned by psa_get_key_attributes()
319 psa_reset_key_attributes(&attributes);