Lines Matching refs:attributes

160     psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;  in mbedtls_pk_setup_opaque()  local
167 if (PSA_SUCCESS != psa_get_key_attributes(key, &attributes)) { in mbedtls_pk_setup_opaque()
170 type = psa_get_key_type(&attributes); in mbedtls_pk_setup_opaque()
171 psa_reset_key_attributes(&attributes); in mbedtls_pk_setup_opaque()
314 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in mbedtls_pk_can_do_ext() local
317 status = psa_get_key_attributes(ctx->priv_id, &attributes); in mbedtls_pk_can_do_ext()
322 psa_algorithm_t key_alg = psa_get_key_algorithm(&attributes); in mbedtls_pk_can_do_ext()
329 psa_algorithm_t key_alg2 = psa_get_key_enrollment_algorithm(&attributes); in mbedtls_pk_can_do_ext()
331 key_usage = psa_get_key_usage_flags(&attributes); in mbedtls_pk_can_do_ext()
332 psa_reset_key_attributes(&attributes); in mbedtls_pk_can_do_ext()
402 psa_key_attributes_t *attributes) in mbedtls_pk_get_psa_attributes() argument
446 psa_set_key_type(attributes, (want_private ? in mbedtls_pk_get_psa_attributes()
449 psa_set_key_bits(attributes, mbedtls_pk_get_bitlen(pk)); in mbedtls_pk_get_psa_attributes()
450 psa_set_key_algorithm(attributes, in mbedtls_pk_get_psa_attributes()
504 psa_set_key_type(attributes, (want_private ? in mbedtls_pk_get_psa_attributes()
507 psa_set_key_bits(attributes, bits); in mbedtls_pk_get_psa_attributes()
508 psa_set_key_algorithm(attributes, alg); in mbedtls_pk_get_psa_attributes()
563 psa_set_key_type(attributes, new_type); in mbedtls_pk_get_psa_attributes()
564 psa_set_key_bits(attributes, psa_get_key_bits(&old_attributes)); in mbedtls_pk_get_psa_attributes()
565 psa_set_key_algorithm(attributes, psa_get_key_algorithm(&old_attributes)); in mbedtls_pk_get_psa_attributes()
574 psa_set_key_usage_flags(attributes, more_usage); in mbedtls_pk_get_psa_attributes()
581 psa_set_key_enrollment_algorithm(attributes, PSA_ALG_NONE); in mbedtls_pk_get_psa_attributes()
589 const psa_key_attributes_t *attributes, in export_import_into_psa() argument
600 status = psa_import_key(attributes, key_buffer, key_length, new_key_id); in export_import_into_psa()
606 const psa_key_attributes_t *attributes, in copy_into_psa() argument
611 psa_status_t status = psa_copy_key(old_key_id, attributes, new_key_id); in copy_into_psa()
632 if (old_type != psa_get_key_type(attributes)) { in copy_into_psa()
635 status = export_import_into_psa(old_key_id, attributes, new_key_id); in copy_into_psa()
642 const psa_key_attributes_t *attributes, in import_pair_into_psa() argument
649 if (psa_get_key_type(attributes) != PSA_KEY_TYPE_RSA_KEY_PAIR) { in import_pair_into_psa()
662 ret = PSA_PK_TO_MBEDTLS_ERR(psa_import_key(attributes, in import_pair_into_psa()
680 psa_key_type_t to_type = psa_get_key_type(attributes); in import_pair_into_psa()
698 return copy_into_psa(pk->priv_id, attributes, key_id); in import_pair_into_psa()
716 ret = PSA_PK_TO_MBEDTLS_ERR(psa_import_key(attributes, in import_pair_into_psa()
727 return copy_into_psa(pk->priv_id, attributes, key_id); in import_pair_into_psa()
736 const psa_key_attributes_t *attributes, in import_public_into_psa() argument
739 psa_key_type_t psa_type = psa_get_key_type(attributes); in import_public_into_psa()
833 return PSA_PK_TO_MBEDTLS_ERR(psa_import_key(attributes, in import_public_into_psa()
839 const psa_key_attributes_t *attributes, in mbedtls_pk_import_into_psa() argument
852 int want_public = PSA_KEY_TYPE_IS_PUBLIC_KEY(psa_get_key_type(attributes)); in mbedtls_pk_import_into_psa()
854 return import_public_into_psa(pk, attributes, key_id); in mbedtls_pk_import_into_psa()
856 return import_pair_into_psa(pk, attributes, key_id); in mbedtls_pk_import_into_psa()
1158 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in mbedtls_pk_verify_ext() local
1167 psa_set_key_type(&attributes, PSA_KEY_TYPE_RSA_PUBLIC_KEY); in mbedtls_pk_verify_ext()
1168 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_VERIFY_HASH); in mbedtls_pk_verify_ext()
1169 psa_set_key_algorithm(&attributes, psa_sig_alg); in mbedtls_pk_verify_ext()
1171 status = psa_import_key(&attributes, in mbedtls_pk_verify_ext()