Lines Matching refs:alg2
619 psa_algorithm_t alg2 ) in psa_key_policy_algorithm_intersection() argument
622 if( alg1 == alg2 ) in psa_key_policy_algorithm_intersection()
627 PSA_ALG_IS_SIGN_HASH( alg2 ) && in psa_key_policy_algorithm_intersection()
628 ( alg1 & ~PSA_ALG_HASH_MASK ) == ( alg2 & ~PSA_ALG_HASH_MASK ) ) in psa_key_policy_algorithm_intersection()
631 return( alg2 ); in psa_key_policy_algorithm_intersection()
632 if( PSA_ALG_SIGN_GET_HASH( alg2 ) == PSA_ALG_ANY_HASH ) in psa_key_policy_algorithm_intersection()
638 if( PSA_ALG_IS_AEAD( alg1 ) && PSA_ALG_IS_AEAD( alg2 ) && in psa_key_policy_algorithm_intersection()
640 PSA_ALG_AEAD_WITH_SHORTENED_TAG( alg2, 0 ) ) ) in psa_key_policy_algorithm_intersection()
643 size_t alg2_len = PSA_ALG_AEAD_GET_TAG_LENGTH( alg2 ); in psa_key_policy_algorithm_intersection()
648 ( ( alg2 & PSA_ALG_AEAD_AT_LEAST_THIS_LENGTH_FLAG ) != 0 ) ) in psa_key_policy_algorithm_intersection()
657 return( alg2 ); in psa_key_policy_algorithm_intersection()
659 if( ( ( alg2 & PSA_ALG_AEAD_AT_LEAST_THIS_LENGTH_FLAG ) != 0 ) && in psa_key_policy_algorithm_intersection()
668 if( PSA_ALG_IS_MAC( alg1 ) && PSA_ALG_IS_MAC( alg2 ) && in psa_key_policy_algorithm_intersection()
670 PSA_ALG_FULL_LENGTH_MAC( alg2 ) ) ) in psa_key_policy_algorithm_intersection()
686 size_t alg2_len = PSA_MAC_LENGTH( key_type, 0, alg2 ); in psa_key_policy_algorithm_intersection()
691 ( ( alg2 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG ) != 0 ) ) in psa_key_policy_algorithm_intersection()
701 return( ( alg1_len <= alg2_len ) ? alg2 : 0 ); in psa_key_policy_algorithm_intersection()
703 if( ( alg2 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG ) != 0 ) in psa_key_policy_algorithm_intersection()
833 psa_key_algorithm_permits( key_type, policy->alg2, alg ) ) in psa_key_policy_permits()
866 psa_key_policy_algorithm_intersection( key_type, policy->alg2, in psa_restrict_key_policy()
867 constraint->alg2 ); in psa_restrict_key_policy()
870 if( intersection_alg2 == 0 && policy->alg2 != 0 && constraint->alg2 != 0 ) in psa_restrict_key_policy()
874 policy->alg2 = intersection_alg2; in psa_restrict_key_policy()