summaryrefslogtreecommitdiffstats
path: root/crypto/sha/sha_locl.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-06-01 13:39:45 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-06-01 13:39:45 +0000
commit65300dcfb04bae643ea7b8f42ff8c8f1b1210a9e (patch)
treeb3cebcf5d9b7c05745dcd26cc13de2805098c224 /crypto/sha/sha_locl.h
parent9ddc574f9aed0fbf5b19c50a495de608550174c7 (diff)
Prohibit use of low level digest APIs in FIPS mode.
Diffstat (limited to 'crypto/sha/sha_locl.h')
-rw-r--r--crypto/sha/sha_locl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/sha/sha_locl.h b/crypto/sha/sha_locl.h
index 672c26eee1..7a0c3ca8d8 100644
--- a/crypto/sha/sha_locl.h
+++ b/crypto/sha/sha_locl.h
@@ -122,7 +122,11 @@ void sha1_block_data_order (SHA_CTX *c, const void *p,size_t num);
#define INIT_DATA_h3 0x10325476UL
#define INIT_DATA_h4 0xc3d2e1f0UL
-int HASH_INIT (SHA_CTX *c)
+#ifdef SHA_0
+fips_md_init(SHA)
+#else
+fips_md_init_ctx(SHA1, SHA)
+#endif
{
memset (c,0,sizeof(*c));
c->h0=INIT_DATA_h0;