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:
Manuel Pégourié-Gonnard 2021-11-17 13:09:37 +01:00 committed by GitHub
commit 5a57a51ea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -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 );