Skip to content

Commit

Permalink
Merge pull request #829 from cisco/feature/padding
Browse files Browse the repository at this point in the history
Add padding call for decprim
  • Loading branch information
abkarcher authored Apr 5, 2024
2 parents 9a34248 + 2a0350d commit 0b699e6
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 0b699e6

Please sign in to comment.