psa_validate_key_policy() function
Validate that a key policy is internally well-formed. This function only rejects invalid policies. It does not validate the consistency of the policy with respect to other attributes of the key such as the key type.