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/ripemd | |
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/ripemd')
-rw-r--r-- | crypto/ripemd/ripemd.h | 4 | ||||
-rw-r--r-- | crypto/ripemd/rmd_dgst.c | 7 | ||||
-rw-r--r-- | crypto/ripemd/rmd_locl.h | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/crypto/ripemd/ripemd.h b/crypto/ripemd/ripemd.h index 033a5965b5..3b6d04386d 100644 --- a/crypto/ripemd/ripemd.h +++ b/crypto/ripemd/ripemd.h @@ -90,7 +90,9 @@ typedef struct RIPEMD160state_st RIPEMD160_LONG data[RIPEMD160_LBLOCK]; unsigned int num; } RIPEMD160_CTX; - +#ifdef OPENSSL_FIPS +int private_RIPEMD160_Init(RIPEMD160_CTX *c); +#endif int RIPEMD160_Init(RIPEMD160_CTX *c); int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); diff --git a/crypto/ripemd/rmd_dgst.c b/crypto/ripemd/rmd_dgst.c index 61626284b8..ead11d075a 100644 --- a/crypto/ripemd/rmd_dgst.c +++ b/crypto/ripemd/rmd_dgst.c @@ -59,6 +59,11 @@ #include <stdio.h> #include "rmd_locl.h" #include <openssl/opensslv.h> +#include <openssl/err.h> +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT; @@ -69,7 +74,7 @@ const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT; void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,size_t num); # endif -int RIPEMD160_Init(RIPEMD160_CTX *c) +FIPS_NON_FIPS_MD_Init(RIPEMD160) { c->A=RIPEMD160_A; c->B=RIPEMD160_B; diff --git a/crypto/ripemd/rmd_locl.h b/crypto/ripemd/rmd_locl.h index f14b346e66..ce12a8000e 100644 --- a/crypto/ripemd/rmd_locl.h +++ b/crypto/ripemd/rmd_locl.h @@ -72,7 +72,7 @@ */ #ifdef RMD160_ASM # if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) -# define ripemd160_block_data_order ripemd160_block_asm_data_order +# define ripemd160_block_host_order ripemd160_block_asm_data_order # endif #endif |