From 41e4ce4884a95235b04f1ef899de7881dba55310 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Wed, 19 May 2021 15:10:05 +0100 Subject: [PATCH] Removes RSA constants This commit removes the RSA constants MBEDTLS_RSA_PUBLIC and MBEDTLS_RSA_PRIVATE because they are now superfluous given that the mode parameter has been removed. Signed-off-by: Thomas Daubney --- include/mbedtls/rsa.h | 2 -- library/rsa.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/mbedtls/rsa.h b/include/mbedtls/rsa.h index dda0a61b8..ecf345e64 100644 --- a/include/mbedtls/rsa.h +++ b/include/mbedtls/rsa.h @@ -57,8 +57,6 @@ /* * RSA constants */ -#define MBEDTLS_RSA_PUBLIC 0 /**< Request private key operation. */ -#define MBEDTLS_RSA_PRIVATE 1 /**< Request public key operation. */ #define MBEDTLS_RSA_PKCS_V15 0 /**< Use PKCS#1 v1.5 encoding. */ #define MBEDTLS_RSA_PKCS_V21 1 /**< Use PKCS#1 v2.1 encoding. */ diff --git a/library/rsa.c b/library/rsa.c index 2f9438ad0..c3b54afda 100644 --- a/library/rsa.c +++ b/library/rsa.c @@ -2345,7 +2345,7 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx, * Apply RSA primitive to get what should be PKCS1 encoded hash. */ - ret = mbedtls_rsa_public( ctx, sig, encoded ); + ret = mbedtls_rsa_public( ctx, sig, encoded ); if( ret != 0 ) goto cleanup;