Remove usage of PSA_ERROR_INVALID_KEY_POLICY
use PSA_ERROR_INVALID_ARGUMENT instead of INVALID_KEY_POLICY error
This commit is contained in:
parent
d926b88085
commit
5feda72d7a
2 changed files with 1 additions and 3 deletions
|
@ -89,8 +89,6 @@ typedef enum {
|
|||
PSA_ERROR_INVALID_SIGNATURE,
|
||||
/** The decrypted padding is incorrect. */
|
||||
PSA_ERROR_INVALID_PADDING,
|
||||
/** The key policy is incorrect. */
|
||||
PSA_ERROR_INVALID_KEY_POLICY,
|
||||
/** An error occurred that does not correspond to any defined
|
||||
failure cause. */
|
||||
PSA_ERROR_UNKNOWN_ERROR,
|
||||
|
|
|
@ -1330,7 +1330,7 @@ psa_status_t psa_set_key_policy(psa_key_slot_t key,
|
|||
if( ( policy->usage & ~( PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT
|
||||
| PSA_KEY_USAGE_DECRYPT | PSA_KEY_USAGE_SIGN
|
||||
| PSA_KEY_USAGE_VERIFY ) ) != 0 )
|
||||
return( PSA_ERROR_INVALID_KEY_POLICY );
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
|
||||
slot->policy = *policy;
|
||||
|
||||
|
|
Loading…
Reference in a new issue