From 89132a6ab0773b88c7e4a92d2b2731de090240fd Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Wed, 4 May 2022 10:32:11 +0200 Subject: [PATCH] Fix call to mbedtls_pk_wrap_as_opaque(): use usage variable instead PSA_KEY_USAGE_SIGN_HASH Signed-off-by: Przemek Stekiel --- programs/ssl/ssl_client2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 65c7c63af..f273f8821 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -1747,8 +1747,7 @@ int main( int argc, char *argv[] ) } if( ( ret = mbedtls_pk_wrap_as_opaque( &pkey, &key_slot, psa_alg, - PSA_KEY_USAGE_SIGN_HASH, - psa_alg2 ) ) != 0 ) + usage, psa_alg2 ) ) != 0 ) { mbedtls_printf( " failed\n ! " "mbedtls_pk_wrap_as_opaque returned -0x%x\n\n", (unsigned int) -ret );