Check psa_destroy_key() return in rsa_verify_wrap()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
5b32038ff0
commit
cf5a215a43
1 changed files with 4 additions and 1 deletions
|
@ -716,7 +716,10 @@ static int ecdsa_verify_wrap( void *ctx_arg, mbedtls_md_type_t md_alg,
|
||||||
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 /* MBEDTLS_USE_PSA_CRYPTO */
|
#else /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue