diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-01-27 17:23:43 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-01-27 17:23:43 +0000 |
commit | 7cc684f4f7fbcdc5cf4683eaf025d4f915acbf3c (patch) | |
tree | 239b582a272e88cb8a3a8e9fad8806380128a2ed /crypto/bn | |
parent | e36d6b8f7985739a493da0932bd08c9787c84dfc (diff) |
Redirect FIPS memory allocation to FIPS_malloc() routine, remove
OpenSSL malloc dependencies.
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn_blind.c | 6 | ||||
-rw-r--r-- | crypto/bn/bn_ctx.c | 6 | ||||
-rw-r--r-- | crypto/bn/bn_exp.c | 5 | ||||
-rw-r--r-- | crypto/bn/bn_lib.c | 5 | ||||
-rw-r--r-- | crypto/bn/bn_rand.c | 5 | ||||
-rw-r--r-- | crypto/bn/bn_recp.c | 5 |
6 files changed, 32 insertions, 0 deletions
diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c index 6e00f43c66..d2bba48b0d 100644 --- a/crypto/bn/bn_blind.c +++ b/crypto/bn/bn_blind.c @@ -113,6 +113,12 @@ #include "cryptlib.h" #include "bn_lcl.h" +#define OPENSSL_FIPSAPI + +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + #define BN_BLINDING_COUNTER 32 struct bn_blinding_st diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c index 3f2256f675..f16fb35f5a 100644 --- a/crypto/bn/bn_ctx.c +++ b/crypto/bn/bn_ctx.c @@ -60,12 +60,18 @@ #endif #endif +#define OPENSSL_FIPSAPI + #include <stdio.h> #include <assert.h> #include "cryptlib.h" #include "bn_lcl.h" +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + /* TODO list * * 1. Check a bunch of "(words+1)" type hacks in various bignum functions and diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c index d9b6c737fc..2267367793 100644 --- a/crypto/bn/bn_exp.c +++ b/crypto/bn/bn_exp.c @@ -113,6 +113,11 @@ #include "cryptlib.h" #include "bn_lcl.h" +#define OPENSSL_FIPSAPI +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + /* maximum precomputation table size for *variable* sliding windows */ #define TABLE_SIZE 32 diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 7a5676de69..503762b31e 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -67,6 +67,11 @@ #include "cryptlib.h" #include "bn_lcl.h" +#define OPENSSL_FIPSAPI +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + const char BN_version[]="Big Number" OPENSSL_VERSION_PTEXT; /* This stuff appears to be completely unused, so is deprecated */ diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c index b376c28ff3..070b1e4ed2 100644 --- a/crypto/bn/bn_rand.c +++ b/crypto/bn/bn_rand.c @@ -115,6 +115,11 @@ #include "bn_lcl.h" #include <openssl/rand.h> +#define OPENSSL_FIPSAPI +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) { unsigned char *buf=NULL; diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 2e8efb8dae..dde27ae71a 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -60,6 +60,11 @@ #include "cryptlib.h" #include "bn_lcl.h" +#define OPENSSL_FIPSAPI +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif + void BN_RECP_CTX_init(BN_RECP_CTX *recp) { BN_init(&(recp->N)); |