From: Dr. Stephen Henson Date: Sun, 15 Jul 2007 12:06:23 +0000 (+0000) Subject: Add selftest check to SHA1 routine. X-Git-Tag: FIPS_098_TEST_2~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5c65d38219ee0b405b953c21785c4d4eb3685214;p=oweals%2Fopenssl.git Add selftest check to SHA1 routine. --- diff --git a/crypto/sha/sha_locl.h b/crypto/sha/sha_locl.h index d65de44af0..3b1cea84e4 100644 --- a/crypto/sha/sha_locl.h +++ b/crypto/sha/sha_locl.h @@ -151,6 +151,9 @@ FIPS_NON_FIPS_MD_Init(SHA) int HASH_INIT (SHA_CTX *c) #endif { +#if defined(SHA_1) && defined(OPENSSL_FIPS) + FIPS_selftest_check(); +#endif c->h0=INIT_DATA_h0; c->h1=INIT_DATA_h1; c->h2=INIT_DATA_h2; diff --git a/fips-1.0/sha/fips_standalone_sha1.c b/fips-1.0/sha/fips_standalone_sha1.c index aba7acc610..f18eaf0c90 100644 --- a/fips-1.0/sha/fips_standalone_sha1.c +++ b/fips-1.0/sha/fips_standalone_sha1.c @@ -55,6 +55,7 @@ #include int FIPS_selftest_failed() { return 0; } +void FIPS_selftest_check() {} void OPENSSL_cleanse(void *p,size_t len) {} #ifdef OPENSSL_FIPS