From 3770e2483f7f9cf0101e9f3294d8fcf81705dcab Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Thu, 3 Mar 2022 16:37:33 +0100 Subject: [PATCH] Use new PSA to mbedtls PK error mapping functions in pk_wrap.c Signed-off-by: Neil Armstrong --- library/pk_wrap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/pk_wrap.c b/library/pk_wrap.c index 051af9820..d105e3985 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -282,7 +282,7 @@ static int rsa_encrypt_wrap( void *ctx, &key_id ); if( status != PSA_SUCCESS ) { - ret = mbedtls_psa_err_translate_pk( status ); + ret = mbedtls_pk_error_from_psa( status ); goto cleanup; } @@ -290,7 +290,7 @@ static int rsa_encrypt_wrap( void *ctx, NULL, 0, output, osize, olen); if( status != PSA_SUCCESS ) { - ret = mbedtls_psa_err_translate_pk( status ); + ret = mbedtls_pk_error_from_psa_rsa( status ); goto cleanup; } @@ -299,7 +299,7 @@ static int rsa_encrypt_wrap( void *ctx, cleanup: status = psa_destroy_key( key_id ); if( ret == 0 && status != PSA_SUCCESS ) - ret = mbedtls_psa_err_translate_pk( status ); + ret = mbedtls_pk_error_from_psa( status ); return( ret ); } @@ -797,7 +797,7 @@ static int ecdsa_verify_wrap( void *ctx_arg, mbedtls_md_type_t md_alg, cleanup: status = psa_destroy_key( key_id ); if( ret == 0 && status != PSA_SUCCESS ) - ret = mbedtls_psa_err_translate_pk( status ); + ret = mbedtls_pk_error_from_psa( status ); return( ret ); }