mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-09 21:44:28 +00:00
Use new PSA to mbedtls PK error mapping functions in pk_wrap.c
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
c921bfdf30
commit
3770e2483f
@ -282,7 +282,7 @@ static int rsa_encrypt_wrap( void *ctx,
|
|||||||
&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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,7 +290,7 @@ static int rsa_encrypt_wrap( void *ctx,
|
|||||||
NULL, 0, output, osize, olen);
|
NULL, 0, output, osize, olen);
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ static int rsa_encrypt_wrap( void *ctx,
|
|||||||
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 );
|
||||||
}
|
}
|
||||||
@ -797,7 +797,7 @@ static int ecdsa_verify_wrap( void *ctx_arg, 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