Check psa_destroy_key() return in rsa_encrypt_wrap()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
ac014ca5d9
commit
7dd3b20d36
1 changed files with 4 additions and 1 deletions
|
@ -298,7 +298,10 @@ static int rsa_encrypt_wrap( void *ctx,
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
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 );
|
return( ret );
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue