From 2a0350d1be3441a9df9d8cc26ba9311fe558ebf2 Mon Sep 17 00:00:00 2001 From: Andrew Karcher <9059272+abkarcher@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:39:56 -0400 Subject: [PATCH] Add padding call for decprim --- app/app_rsa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/app_rsa.c b/app/app_rsa.c index d7b1c690..c8bc0888 100644 --- a/app/app_rsa.c +++ b/app/app_rsa.c @@ -450,6 +450,11 @@ int app_rsa_decprim_handler(ACVP_TEST_CASE *test_case) { goto err; } + if (EVP_PKEY_CTX_set_rsa_padding(dec_ctx, RSA_NO_PADDING) != 1) { + printf("Error setting padding in RSA decprim\n"); + goto err; + } + tc->pt_len = RSA_BUF_MAX; if (EVP_PKEY_decrypt(dec_ctx, tc->pt, (size_t *)&tc->pt_len, tc->cipher, tc->cipher_len) == 1) { tc->disposition = 1;