projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
225a9e2
)
Use SHA-256 in fips_test_suite.
author
Dr. Stephen Henson
<steve@openssl.org>
Tue, 15 Feb 2011 16:58:06 +0000
(16:58 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Tue, 15 Feb 2011 16:58:06 +0000
(16:58 +0000)
fips/fips_test_suite.c
patch
|
blob
|
history
diff --git
a/fips/fips_test_suite.c
b/fips/fips_test_suite.c
index 392a889ca0517d872f5befc61bbfa3fa369da2da..c02168c3096392ad7ccb2869d26c6907720d20b2 100644
(file)
--- a/
fips/fips_test_suite.c
+++ b/
fips/fips_test_suite.c
@@
-116,7
+116,7
@@
static int FIPS_dsa_test(int bad)
if (bad)
BN_add_word(dsa->pub_key, 1);
if (bad)
BN_add_word(dsa->pub_key, 1);
- if (!FIPS_digestinit(&mctx, EVP_sha
1
()))
+ if (!FIPS_digestinit(&mctx, EVP_sha
256
()))
goto end;
if (!FIPS_digestupdate(&mctx, dgst, sizeof(dgst) - 1))
goto end;
goto end;
if (!FIPS_digestupdate(&mctx, dgst, sizeof(dgst) - 1))
goto end;
@@
-124,7
+124,7
@@
static int FIPS_dsa_test(int bad)
if (!sig)
goto end;
if (!sig)
goto end;
- if (!FIPS_digestinit(&mctx, EVP_sha
1
()))
+ if (!FIPS_digestinit(&mctx, EVP_sha
256
()))
goto end;
if (!FIPS_digestupdate(&mctx, dgst, sizeof(dgst) - 1))
goto end;
goto end;
if (!FIPS_digestupdate(&mctx, dgst, sizeof(dgst) - 1))
goto end;
@@
-160,20
+160,20
@@
static int FIPS_rsa_test(int bad)
if (!key || !bn)
return 0;
BN_set_word(bn, 65537);
if (!key || !bn)
return 0;
BN_set_word(bn, 65537);
- if (!RSA_generate_key_ex(key,
1024
,bn,NULL))
+ if (!RSA_generate_key_ex(key,
2048
,bn,NULL))
return 0;
BN_free(bn);
if (bad)
BN_add_word(key->n, 1);
return 0;
BN_free(bn);
if (bad)
BN_add_word(key->n, 1);
- if (!FIPS_digestinit(&mctx, EVP_sha
1
()))
+ if (!FIPS_digestinit(&mctx, EVP_sha
256
()))
goto end;
if (!FIPS_digestupdate(&mctx, input_ptext, sizeof(input_ptext) - 1))
goto end;
if (!FIPS_rsa_sign_ctx(key, &mctx, RSA_PKCS1_PADDING, 0, NULL, buf, &slen))
goto end;
goto end;
if (!FIPS_digestupdate(&mctx, input_ptext, sizeof(input_ptext) - 1))
goto end;
if (!FIPS_rsa_sign_ctx(key, &mctx, RSA_PKCS1_PADDING, 0, NULL, buf, &slen))
goto end;
- if (!FIPS_digestinit(&mctx, EVP_sha
1
()))
+ if (!FIPS_digestinit(&mctx, EVP_sha
256
()))
goto end;
if (!FIPS_digestupdate(&mctx, input_ptext, sizeof(input_ptext) - 1))
goto end;
goto end;
if (!FIPS_digestupdate(&mctx, input_ptext, sizeof(input_ptext) - 1))
goto end;