diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-09-16 10:47:28 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-09-16 10:47:28 +0000 |
commit | 96a259e81e47cf61d54eb0cb0dd05434eda2f301 (patch) | |
tree | de53299acb413b3d5cbe25d05e17f6f3aa8e422b /crypto/md4 | |
parent | 59f3477b8236fd431d2cee942b46e3034e0a7b10 (diff) |
Merge FIPS low level algorithm blocking code. Give hard errors if non-FIPS
algorithms are use in FIPS mode using low level API. No effect in non-FIPS
mode.
Diffstat (limited to 'crypto/md4')
-rw-r--r-- | crypto/md4/md4.h | 3 | ||||
-rw-r--r-- | crypto/md4/md4_dgst.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/crypto/md4/md4.h b/crypto/md4/md4.h index 5598c93a4f..ba1fe4a6ee 100644 --- a/crypto/md4/md4.h +++ b/crypto/md4/md4.h @@ -105,6 +105,9 @@ typedef struct MD4state_st unsigned int num; } MD4_CTX; +#ifdef OPENSSL_FIPS +int private_MD4_Init(MD4_CTX *c); +#endif int MD4_Init(MD4_CTX *c); int MD4_Update(MD4_CTX *c, const void *data, size_t len); int MD4_Final(unsigned char *md, MD4_CTX *c); diff --git a/crypto/md4/md4_dgst.c b/crypto/md4/md4_dgst.c index cfef94af39..0f5448601d 100644 --- a/crypto/md4/md4_dgst.c +++ b/crypto/md4/md4_dgst.c @@ -59,6 +59,11 @@ #include <stdio.h> #include "md4_locl.h" #include <openssl/opensslv.h> +#include <openssl/err.h> +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT; @@ -70,7 +75,7 @@ const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT; #define INIT_DATA_C (unsigned long)0x98badcfeL #define INIT_DATA_D (unsigned long)0x10325476L -int MD4_Init(MD4_CTX *c) +FIPS_NON_FIPS_MD_Init(MD4) { c->A=INIT_DATA_A; c->B=INIT_DATA_B; |