From 97949ccfc8c9823cd1e6862039b46227bc5a0e26 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 7 May 2005 22:33:29 +0000 Subject: [PATCH] Move SHA1 selftest input vectors to writable segment. --- fips/fipshashes.c | 2 +- fips/sha1/fips_sha1_selftest.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/fips/fipshashes.c b/fips/fipshashes.c index 6090e9efa3..2eb568b31b 100644 --- a/fips/fipshashes.c +++ b/fips/fipshashes.c @@ -26,7 +26,7 @@ const char * const FIPS_source_hashes[] = { "HMAC-SHA1(rsa/fips_rsa_selftest.c)= dcd0970a4de2d7f0d2333d6a3efb1ae350209b57", "HMAC-SHA1(sha1/fips_sha1dgst.c)= 26e529d630b5e754b4a29bd1bb697e991e7fdc04", "HMAC-SHA1(sha1/fips_standalone_sha1.c)= faae95bc36cc80f5be6a0cde02ebab0f63d4fd97", -"HMAC-SHA1(sha1/fips_sha1_selftest.c)= e4a50c88af171121f5f84476f33efb7d12c2e917", +"HMAC-SHA1(sha1/fips_sha1_selftest.c)= c8cb6e96a4b8c56f75f1b657ebf77a90545b774d", "HMAC-SHA1(sha1/asm/fips-sx86-elf.s)= ae66fb23ab8e1a2287e87a0a2dd30a4b9039fe63", "HMAC-SHA1(sha1/fips_sha_locl.h)= 30b6d6bdbdc9db0d66dc89010c1f4fe1c7b60574", "HMAC-SHA1(sha1/fips_md32_common.h)= c34d8b7785d3194ff968cf6d3efdd2bfcaec1fad", diff --git a/fips/sha1/fips_sha1_selftest.c b/fips/sha1/fips_sha1_selftest.c index 6c89c9ec46..a52530c34f 100644 --- a/fips/sha1/fips_sha1_selftest.c +++ b/fips/sha1/fips_sha1_selftest.c @@ -53,12 +53,11 @@ #include #ifdef OPENSSL_FIPS -static char *test[]= +static char test[][60]= { "", "abc", - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - NULL, + "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" }; static const unsigned char ret[][SHA_DIGEST_LENGTH]= @@ -80,7 +79,7 @@ int FIPS_selftest_sha1() { int n; - for(n=0 ; test[n] ; ++n) + for(n=0 ; n