Merge pull request #5180 from daverodgman/key_derivation_output_key_error_code
Improve PSA error return code for psa_key_derivation_output_key
This commit is contained in:
commit
5a57a51ea5
3 changed files with 5 additions and 2 deletions
|
@ -4763,6 +4763,9 @@ psa_status_t psa_key_derivation_output_key( const psa_key_attributes_t *attribut
|
|||
if( psa_get_key_bits( attributes ) == 0 )
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
|
||||
if( operation->alg == PSA_ALG_NONE )
|
||||
return( PSA_ERROR_BAD_STATE );
|
||||
|
||||
if( ! operation->can_output_key )
|
||||
return( PSA_ERROR_NOT_PERMITTED );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue