X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=fips%2Fsha%2Ffips_sha1_selftest.c;h=62680bfff8e31933d6a08106276add274e1ab6ad;hp=4291617596357d36115a760586bc11dc7b631fbf;hb=57d7ee3a91d95c5034ec93d77c18f39a8eb04a12;hpb=7c8ced94c32131f24d469d2899f3339f77c47aa1 diff --git a/fips/sha/fips_sha1_selftest.c b/fips/sha/fips_sha1_selftest.c index 4291617596..62680bfff8 100644 --- a/fips/sha/fips_sha1_selftest.c +++ b/fips/sha/fips_sha1_selftest.c @@ -56,13 +56,14 @@ #include #ifdef OPENSSL_FIPS -static char test[][60]= +static const unsigned char test[][60]= { "", "abc", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" }; +__fips_constseg static const unsigned char ret[][SHA_DIGEST_LENGTH]= { { 0xda,0x39,0xa3,0xee,0x5e,0x6b,0x4b,0x0d,0x32,0x55, @@ -73,27 +74,21 @@ static const unsigned char ret[][SHA_DIGEST_LENGTH]= 0x4a,0xa1,0xf9,0x51,0x29,0xe5,0xe5,0x46,0x70,0xf1 }, }; -void FIPS_corrupt_sha1() - { - test[2][0]++; - } - int FIPS_selftest_sha1() - { - size_t n; - - for(n=0 ; n