Check psa_destroy_key() return in rsa_sign_wrap()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
e4f28688fd
commit
48a9833cdf
1 changed files with 4 additions and 1 deletions
|
@ -254,7 +254,10 @@ static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
|||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
psa_destroy_key( key_id );
|
||||
status = psa_destroy_key( key_id );
|
||||
if( ret == 0 && status != PSA_SUCCESS )
|
||||
ret = mbedtls_psa_err_translate_pk( status );
|
||||
|
||||
return( ret );
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue