Lines Matching refs:attr

1121     if (PSA_KEY_TYPE_IS_PUBLIC_KEY(slot->attr.type)) {  in psa_get_and_lock_key_slot_with_policy()
1125 if ((slot->attr.policy.usage & usage) != usage) { in psa_get_and_lock_key_slot_with_policy()
1132 status = psa_key_policy_permits(&slot->attr.policy, in psa_get_and_lock_key_slot_with_policy()
1133 slot->attr.type, in psa_get_and_lock_key_slot_with_policy()
1180 if (psa_key_lifetime_is_external((*p_slot)->attr.lifetime) in psa_get_and_lock_transparent_key_slot_with_policy()
1182 … && PSA_KEY_LIFETIME_GET_LOCATION((*p_slot)->attr.lifetime) != TFM_BUILTIN_KEY_LOADER_KEY_LOCATION in psa_get_and_lock_transparent_key_slot_with_policy()
1345 if (PSA_KEY_LIFETIME_IS_READ_ONLY(slot->attr.lifetime)) { in psa_destroy_key()
1356 driver = psa_get_se_driver_entry(slot->attr.lifetime); in psa_destroy_key()
1364 psa_crypto_transaction.key.lifetime = slot->attr.lifetime; in psa_destroy_key()
1366 psa_crypto_transaction.key.id = slot->attr.id; in psa_destroy_key()
1390 if (!PSA_KEY_LIFETIME_IS_VOLATILE(slot->attr.lifetime)) { in psa_destroy_key()
1394 status = psa_destroy_persistent_key(slot->attr.id); in psa_destroy_key()
1449 *attributes = slot->attr; in psa_get_key_attributes()
1452 if (psa_get_se_driver_entry(slot->attr.lifetime) != NULL) { in psa_get_key_attributes()
1548 status = psa_driver_wrapper_export_key(&slot->attr, in psa_export_key()
1660 if (!PSA_KEY_TYPE_IS_ASYMMETRIC(slot->attr.type)) { in psa_export_public_key()
1666 &slot->attr, slot->key.data, slot->key.bytes, in psa_export_public_key()
1834 slot->attr = *attributes;
1837 slot->attr.id = volatile_key_id;
1839 slot->attr.id.key_id = volatile_key_id;
1871 psa_crypto_transaction.key.lifetime = slot->attr.lifetime;
1873 psa_crypto_transaction.key.id = slot->attr.id;
1942 if (!PSA_KEY_LIFETIME_IS_VOLATILE(slot->attr.lifetime)) {
1954 status = psa_save_persistent_key(&slot->attr,
1962 status = psa_save_persistent_key(&slot->attr,
1979 psa_destroy_persistent_key(slot->attr.id);
1992 *key = slot->attr.id;
2073 if (attributes->type != slot->attr.type) {
2079 if (attributes->bits != slot->attr.bits) {
2139 bits = slot->attr.bits;
2149 if (slot->attr.bits == 0) {
2150 slot->attr.bits = (psa_key_bits_t) bits;
2151 } else if (bits != slot->attr.bits) {
2255 actual_attributes.bits = source_slot->attr.bits;
2256 actual_attributes.type = source_slot->attr.type;
2259 status = psa_restrict_key_policy(source_slot->attr.type,
2261 &source_slot->attr.policy);
2271 if (PSA_KEY_LIFETIME_GET_LOCATION(target_slot->attr.lifetime) !=
2272 PSA_KEY_LIFETIME_GET_LOCATION(source_slot->attr.lifetime)) {
2666 status = psa_mac_finalize_alg_and_key_validation(alg, &slot->attr,
2676 &slot->attr,
2682 &slot->attr,
2862 status = psa_mac_finalize_alg_and_key_validation(alg, &slot->attr,
2874 &slot->attr,
3031 if (!PSA_KEY_TYPE_IS_KEY_PAIR(slot->attr.type)) {
3038 &slot->attr, slot->key.data, slot->key.bytes,
3044 &slot->attr, slot->key.data, slot->key.bytes,
3088 &slot->attr, slot->key.data, slot->key.bytes,
3093 &slot->attr, slot->key.data, slot->key.bytes,
3404 if (!(PSA_KEY_TYPE_IS_PUBLIC_KEY(slot->attr.type) ||
3405 PSA_KEY_TYPE_IS_KEY_PAIR(slot->attr.type))) {
3415 &slot->attr, slot->key.data, slot->key.bytes,
3463 if (!PSA_KEY_TYPE_IS_KEY_PAIR(slot->attr.type)) {
3473 &slot->attr, slot->key.data, slot->key.bytes,
3569 if (!PSA_KEY_TYPE_IS_KEY_PAIR(slot->attr.type)) {
3579 status = psa_driver_wrapper_sign_hash_start(operation, &slot->attr,
3736 status = psa_driver_wrapper_verify_hash_start(operation, &slot->attr,
4344 operation->default_iv_length = PSA_CIPHER_IV_LENGTH(slot->attr.type, alg);
4349 &slot->attr,
4355 &slot->attr,
4612 default_iv_length = PSA_CIPHER_IV_LENGTH(slot->attr.type, alg);
4634 &slot->attr, slot->key.data, slot->key.bytes,
4687 if (input_length < PSA_CIPHER_IV_LENGTH(slot->attr.type, alg)) {
4696 &slot->attr, slot->key.data, slot->key.bytes,
4824 &slot->attr, slot->key.data, slot->key.bytes,
4891 &slot->attr, slot->key.data, slot->key.bytes,
4997 &slot->attr,
5003 &slot->attr,
5012 operation->key_type = psa_get_key_type(&slot->attr);
6222 slot->attr.type);
6394 if (PSA_KEY_TYPE_IS_PUBLIC_KEY(slot->attr.type)) {
6400 if (PSA_KEY_TYPE_IS_ECC(slot->attr.type)) {
6401 psa_ecc_family_t curve = PSA_KEY_TYPE_ECC_GET_FAMILY(slot->attr.type);
6418 if (key_type_is_raw_bytes(slot->attr.type)) {
6432 if (slot->attr.type == PSA_KEY_TYPE_DES) {
6440 slot->attr.bits = (psa_key_bits_t) bits;
6442 if (psa_key_lifetime_is_external(slot->attr.lifetime)) {
6443 status = psa_driver_wrapper_get_key_buffer_size(&slot->attr,
6454 status = psa_driver_wrapper_import_key(&slot->attr,
6459 if (bits != slot->attr.bits) {
7518 step, slot->attr.type,
7597 return psa_driver_wrapper_key_agreement(&private_key->attr,
7723 PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE(slot->attr.type, slot->attr.bits);
8558 type = psa_get_key_type(&slot->attr);
8574 operation->data.inputs.attributes = slot->attr;