Lines Matching refs:policy

1009 static psa_status_t psa_key_policy_permits(const psa_key_policy_t *policy,  in psa_key_policy_permits()  argument
1023 if (psa_key_algorithm_permits(key_type, policy->alg, alg) || in psa_key_policy_permits()
1024 psa_key_algorithm_permits(key_type, policy->alg2, alg)) { in psa_key_policy_permits()
1051 psa_key_policy_t *policy, in psa_restrict_key_policy() argument
1055 psa_key_policy_algorithm_intersection(key_type, policy->alg, in psa_restrict_key_policy()
1058 psa_key_policy_algorithm_intersection(key_type, policy->alg2, in psa_restrict_key_policy()
1060 if (intersection_alg == 0 && policy->alg != 0 && constraint->alg != 0) { in psa_restrict_key_policy()
1063 if (intersection_alg2 == 0 && policy->alg2 != 0 && constraint->alg2 != 0) { in psa_restrict_key_policy()
1066 policy->usage &= constraint->usage; in psa_restrict_key_policy()
1067 policy->alg = intersection_alg; in psa_restrict_key_policy()
1068 policy->alg2 = intersection_alg2; in psa_restrict_key_policy()
1114 if ((slot->attr.policy.usage & usage) != usage) { in psa_get_and_lock_key_slot_with_policy()
1121 status = psa_key_policy_permits(&slot->attr.policy, in psa_get_and_lock_key_slot_with_policy()
1644 static psa_status_t psa_validate_key_policy(const psa_key_policy_t *policy) in psa_validate_key_policy() argument
1646 if ((policy->usage & ~(PSA_KEY_USAGE_EXPORT | in psa_validate_key_policy()
1703 status = psa_validate_key_policy(&attributes->policy); in psa_validate_key_attributes()
2204 &actual_attributes.policy, in psa_copy_key()
2205 &source_slot->attr.policy); in psa_copy_key()