From aa87945f47ea8fcfc327372b143d334cd5850cb0 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 27 Jan 2011 15:57:31 +0000 Subject: [PATCH] Update source files to handle new FIPS_lock() location. Add FIPS_lock() definition. Remove stale function references from fips.h --- crypto/bn/bn_mont.c | 4 ++++ crypto/rand/md_rand.c | 4 ++++ fips/fips.h | 11 +---------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index 2f7fb843a9..ba659cfd1d 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -122,6 +122,10 @@ #include "cryptlib.h" #include "bn_lcl.h" +#ifdef OPENSSL_FIPS +#include +#endif + #define MONT_WORD /* use the faster word-based algorithm */ #ifdef MONT_WORD diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 87d4bfb75d..b17ad5203d 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -129,6 +129,10 @@ #include #include +#ifdef OPENSSL_FIPS +#include +#endif + #ifdef BN_DEBUG # define PREDICT #endif diff --git a/fips/fips.h b/fips/fips.h index 96d8ff64bb..2ef955ab13 100644 --- a/fips/fips.h +++ b/fips/fips.h @@ -108,16 +108,7 @@ int fips_cipher_test(struct evp_cipher_ctx_st *ctx, void fips_set_selftest_fail(void); int fips_check_rsa(struct rsa_st *rsa); -void FIPS_evp_md_ctx_init(EVP_MD_CTX *ctx); -EVP_MD_CTX *FIPS_evp_md_ctx_create(void); -int FIPS_evp_digestinit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); -int FIPS_evp_digestupdate(EVP_MD_CTX *ctx, const void *data, size_t count); -int FIPS_evp_digestfinal(EVP_MD_CTX *ctx, - unsigned char *md, unsigned int *size); -int FIPS_evp_digest(const void *data, size_t count, - unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl); -void FIPS_evp_md_ctx_destroy(EVP_MD_CTX *ctx); -int FIPS_evp_md_ctx_cleanup(EVP_MD_CTX *ctx); +void FIPS_lock(int mode, int type,const char *file,int line); void FIPS_set_locking_callback (void (*func)(int mode, int type, const char *file,int line)); -- 2.25.1