Skip to content

Commit

Permalink
Merge pull request #5944 from JacobBarthelmeh/Testing
Browse files Browse the repository at this point in the history
fix for older selftest that returns bad padding instead of salt len e…
  • Loading branch information
dgarske authored Dec 30, 2022
2 parents 251b896 + 4a23edd commit b438523
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -14833,15 +14833,19 @@ static int rsa_pss_test(WC_RNG* rng, RsaKey* key)
(!defined(HAVE_SELFTEST_VERSION) || (HAVE_SELFTEST_VERSION < 2))
ret = wc_RsaPSS_CheckPadding_ex(digest, digestSz, plain, plainSz,
hash[0], len);
if (ret != PSS_SALTLEN_E)
ERROR_OUT(-7745, exit_rsa_pss);
#elif defined(HAVE_SELFTEST) && (HAVE_SELFTEST_VERSION == 2)
ret = wc_RsaPSS_CheckPadding_ex(digest, digestSz, plain, plainSz,
hash[0], len, 0);
if (ret != BAD_PADDING_E)
ERROR_OUT(-7745, exit_rsa_pss);
#else
ret = wc_RsaPSS_CheckPadding_ex2(digest, digestSz, plain, plainSz, hash[0],
len, 0, HEAP_HINT);
#endif
if (ret != PSS_SALTLEN_E)
ERROR_OUT(-7745, exit_rsa_pss);
#endif

ret = 0;
#endif /* WOLFSSL_SE050 */
Expand Down

0 comments on commit b438523

Please sign in to comment.