mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-10-26 00:37:41 +03:00
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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user