Add selftest check to SHA1 routine.

This commit is contained in:
Dr. Stephen Henson 2007-07-15 12:06:23 +00:00
parent 1b8b2d9300
commit 5c65d38219
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -55,6 +55,7 @@
#include <openssl/hmac.h>
int FIPS_selftest_failed() { return 0; }
void FIPS_selftest_check() {}
void OPENSSL_cleanse(void *p,size_t len) {}
#ifdef OPENSSL_FIPS