From 7b03fe01b152af99e43b7fc69af8ce116432c5ec Mon Sep 17 00:00:00 2001 From: miod <> Date: Thu, 1 May 2014 11:11:37 +0000 Subject: Remove fips_md_init() macro indirection for digest algorithms, used by the OpenSSL FIPS module to prevent forbidden digests to be allowed. No functional change but readability. ok deraadt@ --- src/lib/libcrypto/sha/sha256.c | 4 ++-- src/lib/libcrypto/sha/sha512.c | 4 ++-- src/lib/libcrypto/sha/sha_locl.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/libcrypto/sha') diff --git a/src/lib/libcrypto/sha/sha256.c b/src/lib/libcrypto/sha/sha256.c index e767afde5a..cf9c9a050b 100644 --- a/src/lib/libcrypto/sha/sha256.c +++ b/src/lib/libcrypto/sha/sha256.c @@ -17,7 +17,7 @@ const char SHA256_version[]="SHA-256" OPENSSL_VERSION_PTEXT; -fips_md_init_ctx(SHA224, SHA256) +int SHA224_Init(SHA256_CTX *c) { memset (c,0,sizeof(*c)); c->h[0]=0xc1059ed8UL; c->h[1]=0x367cd507UL; @@ -28,7 +28,7 @@ fips_md_init_ctx(SHA224, SHA256) return 1; } -fips_md_init(SHA256) +int SHA256_Init(SHA256_CTX *c) { memset (c,0,sizeof(*c)); c->h[0]=0x6a09e667UL; c->h[1]=0xbb67ae85UL; diff --git a/src/lib/libcrypto/sha/sha512.c b/src/lib/libcrypto/sha/sha512.c index ca7991a9ca..d8fa933cde 100644 --- a/src/lib/libcrypto/sha/sha512.c +++ b/src/lib/libcrypto/sha/sha512.c @@ -60,7 +60,7 @@ const char SHA512_version[]="SHA-512" OPENSSL_VERSION_PTEXT; #define SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA #endif -fips_md_init_ctx(SHA384, SHA512) +int SHA384_Init(SHA512_CTX *c) { c->h[0]=U64(0xcbbb9d5dc1059ed8); c->h[1]=U64(0x629a292a367cd507); @@ -76,7 +76,7 @@ fips_md_init_ctx(SHA384, SHA512) return 1; } -fips_md_init(SHA512) +int SHA512_Init(SHA512_CTX *c) { c->h[0]=U64(0x6a09e667f3bcc908); c->h[1]=U64(0xbb67ae8584caa73b); diff --git a/src/lib/libcrypto/sha/sha_locl.h b/src/lib/libcrypto/sha/sha_locl.h index 1210176dda..08ab20d60f 100644 --- a/src/lib/libcrypto/sha/sha_locl.h +++ b/src/lib/libcrypto/sha/sha_locl.h @@ -116,9 +116,9 @@ void sha1_block_data_order (SHA_CTX *c, const void *p,size_t num); #define INIT_DATA_h4 0xc3d2e1f0UL #ifdef SHA_0 -fips_md_init(SHA) +int SHA_Init(SHA_CTX *c) #else -fips_md_init_ctx(SHA1, SHA) +int SHA1_Init(SHA_CTX *c) #endif { memset (c,0,sizeof(*c)); -- cgit v1.2.3-55-g6feb