From 7624a5ae5eade9b6253bca518c576791ed2524d5 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Tue, 12 Apr 2022 10:09:26 +0200 Subject: [PATCH] Allow RSA PK Opaque keys for RSA-PSS signing Signed-off-by: Neil Armstrong --- library/pk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/pk.c b/library/pk.c index 0f465cdb4..e238911a5 100644 --- a/library/pk.c +++ b/library/pk.c @@ -776,6 +776,8 @@ int mbedtls_pk_wrap_as_opaque( mbedtls_pk_context *pk, psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH ); psa_set_key_algorithm( &attributes, PSA_ALG_RSA_PKCS1V15_SIGN( hash_alg ) ); + psa_set_key_enrollment_algorithm( &attributes, + PSA_ALG_RSA_PSS( hash_alg ) ); /* import private key into PSA */ status = psa_import_key( &attributes,