diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-02-15 16:58:06 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-02-15 16:58:06 +0000 |
commit | c81f8f59bebf55e6cb269569e8164082aa858eb1 (patch) | |
tree | a4340c36dcee8d8956e0e06da4380f43e6547cfa /fips | |
parent | 225a9e296b9c0bb57208241d9bcb7be79a9b8b12 (diff) |
Use SHA-256 in fips_test_suite.
Diffstat (limited to 'fips')
-rw-r--r-- | fips/fips_test_suite.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fips/fips_test_suite.c b/fips/fips_test_suite.c index 392a889ca0..c02168c309 100644 --- 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 (!FIPS_digestinit(&mctx, EVP_sha1())) + if (!FIPS_digestinit(&mctx, EVP_sha256())) 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 (!FIPS_digestinit(&mctx, EVP_sha1())) + if (!FIPS_digestinit(&mctx, EVP_sha256())) 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 (!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); - if (!FIPS_digestinit(&mctx, EVP_sha1())) + if (!FIPS_digestinit(&mctx, EVP_sha256())) 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_sha1())) + if (!FIPS_digestinit(&mctx, EVP_sha256())) goto end; if (!FIPS_digestupdate(&mctx, input_ptext, sizeof(input_ptext) - 1)) goto end; |