From 4dacf58d6d12e0a1a0c5f2849bb905d9fae32893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 10 Jun 2022 12:50:00 +0200 Subject: [PATCH] Take advantage of now-public macro in pk.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used to be private, hence the duplication, but that's been fixed in the meantime, I guess we just missed this occurrence. Signed-off-by: Manuel Pégourié-Gonnard --- library/pk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/pk.c b/library/pk.c index 1ae041db84..a73fa56f50 100644 --- a/library/pk.c +++ b/library/pk.c @@ -484,8 +484,7 @@ int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options, #if defined(MBEDTLS_USE_PSA_CRYPTO) if( pss_opts->mgf1_hash_id == md_alg ) { - /* see RSA_PUB_DER_MAX_BYTES in pkwrite.c */ - unsigned char buf[ 38 + 2 * MBEDTLS_MPI_MAX_SIZE ]; + unsigned char buf[MBEDTLS_PK_RSA_PUB_DER_MAX_BYTES]; unsigned char *p; int key_len; size_t signature_length;