From c4929fb8415503f75bf536258a6d2ea098f4c4ae Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 11 Jan 2005 16:54:35 +0000 Subject: [PATCH] Clear signed vs. unsigned conflicts. Change the fingerprint accordingly. --- fips/rsa/fingerprint.sha1 | 2 +- fips/rsa/fips_rsa_selftest.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fips/rsa/fingerprint.sha1 b/fips/rsa/fingerprint.sha1 index 21631d2664..569434700c 100644 --- a/fips/rsa/fingerprint.sha1 +++ b/fips/rsa/fingerprint.sha1 @@ -1,3 +1,3 @@ HMAC-SHA1(fips_rsa_eay.c)= eabab59a2f11f3da4c21e1144efe1684f5e8f1ec HMAC-SHA1(fips_rsa_gen.c)= 4bbc0afcade1ac53f469aaa89f84c413678254bf -HMAC-SHA1(fips_rsa_selftest.c)= c31301785f748b091a1a0bb20641116a448ff02d +HMAC-SHA1(fips_rsa_selftest.c)= 70553a5212e86f65b068564946d39b738a201e22 diff --git a/fips/rsa/fips_rsa_selftest.c b/fips/rsa/fips_rsa_selftest.c index 104ad7865b..4e3b9445fc 100644 --- a/fips/rsa/fips_rsa_selftest.c +++ b/fips/rsa/fips_rsa_selftest.c @@ -211,7 +211,7 @@ int FIPS_selftest_rsa() /* ...1) using the same RSA key to encrypt the SHA-1 hash of a * plaintext value larger than the RSA key size */ - if (RSA_size(key) >= strlen(original_ptext)) + if (RSA_size(key) >= sizeof(original_ptext) - 1) { FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED); return 0; @@ -219,7 +219,7 @@ int FIPS_selftest_rsa() /* ...2) then generate the SHA-1 digest of plaintext, and compare the * digest to the Known Answer (note here we duplicate the SHA-1 KAT) */ - SHA1((unsigned char*)original_ptext,strlen(original_ptext),md); + SHA1(original_ptext,sizeof(original_ptext) - 1,md); if(memcmp(md,mdkat,SHA_DIGEST_LENGTH)) { FIPSerr(FIPS_F_FIPS_SELFTEST_SHA1,FIPS_R_SELFTEST_FAILED); -- 2.25.1