mirror of
https://github.com/cuberite/polarssl.git
synced 2025-10-04 11:09:00 -04:00
Use new PSA to mbedtls PK error mapping functions in rsa_sign_wrap()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
66fa769ae8
commit
db69c5213f
@ -238,7 +238,7 @@ static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
|||||||
&key_id );
|
&key_id );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
{
|
{
|
||||||
ret = mbedtls_psa_err_translate_pk( status );
|
ret = mbedtls_pk_error_from_psa( status );
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
|||||||
sig, sig_size, sig_len );
|
sig, sig_size, sig_len );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
{
|
{
|
||||||
ret = mbedtls_psa_err_translate_pk( status );
|
ret = mbedtls_pk_error_from_psa_rsa( status );
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
|||||||
cleanup:
|
cleanup:
|
||||||
status = psa_destroy_key( key_id );
|
status = psa_destroy_key( key_id );
|
||||||
if( ret == 0 && status != PSA_SUCCESS )
|
if( ret == 0 && status != PSA_SUCCESS )
|
||||||
ret = mbedtls_psa_err_translate_pk( status );
|
ret = mbedtls_pk_error_from_psa( status );
|
||||||
|
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user