Skip to content

Commit

Permalink
Add padding call for decprim
Browse files Browse the repository at this point in the history
  • Loading branch information
abkarcher committed Apr 5, 2024
1 parent 9a34248 commit 2a0350d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/app_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2a0350d

Please sign in to comment.