diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-04-12 15:38:34 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-04-12 15:38:34 +0000 |
commit | 3d607309e63ea88d5a8bd1caebeeca40a0dba0ca (patch) | |
tree | de14508e70b606283ef8204607c25adc33007d99 /fips/fips.c | |
parent | 49cb5e0b408d24fbd2fe197a18be64068cac1277 (diff) |
Update RSA selftest code to use a 2048 bit RSA and only a single KAT
for PSS+SHA256
Diffstat (limited to 'fips/fips.c')
-rw-r--r-- | fips/fips.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fips/fips.c b/fips/fips.c index 7e5b651f97..a4ed4f28fb 100644 --- a/fips/fips.c +++ b/fips/fips.c @@ -449,14 +449,20 @@ int fips_pkey_signature_test(EVP_PKEY *pkey, if (!esig) goto error; } -#if 0 - else if (!EVP_SignFinal(&mctx, sig, &siglen, pkey)) - goto error; -#endif if (kat && ((siglen != katlen) || memcmp(kat, sig, katlen))) goto error; - +#if 0 + { + /* Debug code to print out self test KAT discrepancies */ + unsigned int i; + fprintf(stderr, "%s=", fail_str); + for (i = 0; i < siglen; i++) + fprintf(stderr, "%02X", sig[i]); + fprintf(stderr, "\n"); + goto error; + } +#endif if (!FIPS_digestinit(&mctx, digest)) goto error; if (!FIPS_digestupdate(&mctx, tbs, tbslen)) @@ -474,10 +480,6 @@ int fips_pkey_signature_test(EVP_PKEY *pkey, { ret = FIPS_ecdsa_verify_ctx(pkey->pkey.ec, &mctx, esig); } -#if 0 - else - ret = EVP_VerifyFinal(&mctx, sig, siglen, pkey); -#endif error: if (dsig != NULL) |