diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-02-03 18:00:24 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-02-03 18:00:24 +0100 |
commit | 14ae26f2e4f83b9ec0cbb02976e08a69bc5e5ba4 (patch) | |
tree | 3a416398be13f4406ee765c62ab2bcad7baeb9d2 | |
parent | Rename crypto/fips_err.c to fips_ers.c to avoid clash with other fips_err.c (diff) | |
download | openssl-14ae26f2e4f83b9ec0cbb02976e08a69bc5e5ba4.tar.xz openssl-14ae26f2e4f83b9ec0cbb02976e08a69bc5e5ba4.zip |
Transfer error redirection to fips.h, add OPENSSL_FIPSAPI to source files
that use it.
-rw-r--r-- | crypto/bn/bn_add.c | 2 | ||||
-rw-r--r-- | crypto/bn/bn_div.c | 2 | ||||
-rw-r--r-- | crypto/bn/bn_exp2.c | 2 | ||||
-rw-r--r-- | crypto/bn/bn_gcd.c | 2 | ||||
-rw-r--r-- | crypto/bn/bn_mod.c | 2 | ||||
-rw-r--r-- | crypto/dh/dh_gen.c | 2 | ||||
-rw-r--r-- | crypto/dh/dh_key.c | 2 | ||||
-rw-r--r-- | crypto/dsa/dsa_key.c | 2 | ||||
-rw-r--r-- | crypto/dsa/dsa_ossl.c | 2 | ||||
-rw-r--r-- | crypto/err/err.h | 5 | ||||
-rw-r--r-- | crypto/evp/e_aes.c | 2 | ||||
-rw-r--r-- | crypto/fips_err.c | 7 | ||||
-rw-r--r-- | crypto/rsa/rsa_crpt.c | 2 | ||||
-rw-r--r-- | crypto/rsa/rsa_none.c | 2 | ||||
-rw-r--r-- | crypto/rsa/rsa_pk1.c | 2 | ||||
-rw-r--r-- | crypto/rsa/rsa_ssl.c | 2 | ||||
-rw-r--r-- | crypto/rsa/rsa_x931.c | 2 | ||||
-rw-r--r-- | crypto/rsa/rsa_x931g.c | 2 | ||||
-rw-r--r-- | fips/fips.h | 3 | ||||
-rw-r--r-- | fips/hmac/fips_hmac_selftest.c | 2 | ||||
-rw-r--r-- | fips/rand/fips_rand_selftest.c | 2 | ||||
-rw-r--r-- | fips/utl/fips_err.c | 2 |
22 files changed, 41 insertions, 12 deletions
diff --git a/crypto/bn/bn_add.c b/crypto/bn/bn_add.c index 9405163706..f8e6729a47 100644 --- a/crypto/bn/bn_add.c +++ b/crypto/bn/bn_add.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 802a43d642..a6a955808b 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include <openssl/bn.h> #include "cryptlib.h" diff --git a/crypto/bn/bn_exp2.c b/crypto/bn/bn_exp2.c index bd0c34b91b..a00c115216 100644 --- a/crypto/bn/bn_exp2.c +++ b/crypto/bn/bn_exp2.c @@ -109,6 +109,8 @@ * */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_gcd.c b/crypto/bn/bn_gcd.c index 45b417bddc..adef79e87f 100644 --- a/crypto/bn/bn_gcd.c +++ b/crypto/bn/bn_gcd.c @@ -109,6 +109,8 @@ * */ +#define OPENSSL_FIPSAPI + #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_mod.c b/crypto/bn/bn_mod.c index 77d6ddb91a..49c74fbb83 100644 --- a/crypto/bn/bn_mod.c +++ b/crypto/bn/bn_mod.c @@ -111,6 +111,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/dh/dh_gen.c b/crypto/dh/dh_gen.c index 82e560068f..9749b72157 100644 --- a/crypto/dh/dh_gen.c +++ b/crypto/dh/dh_gen.c @@ -61,6 +61,8 @@ * - Geoff */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include <openssl/bn.h> diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c index 99c722bf03..bba83be312 100644 --- a/crypto/dh/dh_key.c +++ b/crypto/dh/dh_key.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include <openssl/bn.h> diff --git a/crypto/dsa/dsa_key.c b/crypto/dsa/dsa_key.c index 5cacc04478..a90b3c460b 100644 --- a/crypto/dsa/dsa_key.c +++ b/crypto/dsa/dsa_key.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include <time.h> #include "cryptlib.h" diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c index fd757082f9..8fa39e9281 100644 --- a/crypto/dsa/dsa_ossl.c +++ b/crypto/dsa/dsa_ossl.c @@ -58,6 +58,8 @@ /* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include <openssl/bn.h> diff --git a/crypto/err/err.h b/crypto/err/err.h index 37aee6f485..3d71e4212e 100644 --- a/crypto/err/err.h +++ b/crypto/err/err.h @@ -137,11 +137,6 @@ extern "C" { #define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0) #endif -#if defined(OPENSSL_FIPSCANISTER) && !defined(OPENSSL_NO_FIPS_ERR) -#define ERR_put_error FIPS_put_error -#define ERR_add_error_data FIPS_add_error_data -#endif - #ifdef OPENSSL_FIPS void FIPS_set_error_callbacks( void (*put_cb)(int lib, int func,int reason,const char *file,int line), diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index 32c903386b..b4da40d0e2 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -48,6 +48,8 @@ * */ +#define OPENSSL_FIPSAPI + #include <openssl/opensslconf.h> #ifndef OPENSSL_NO_AES #include <openssl/evp.h> diff --git a/crypto/fips_err.c b/crypto/fips_err.c deleted file mode 100644 index 09f11748f6..0000000000 --- a/crypto/fips_err.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <openssl/opensslconf.h> - -#ifdef OPENSSL_FIPS -# include "fips_err.h" -#else -static void *dummy=&dummy; -#endif diff --git a/crypto/rsa/rsa_crpt.c b/crypto/rsa/rsa_crpt.c index 7750366613..6a0cf39a5f 100644 --- a/crypto/rsa/rsa_crpt.c +++ b/crypto/rsa/rsa_crpt.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include <openssl/crypto.h> #include "cryptlib.h" diff --git a/crypto/rsa/rsa_none.c b/crypto/rsa/rsa_none.c index e6f3e627ca..b8d01a92cf 100644 --- a/crypto/rsa/rsa_none.c +++ b/crypto/rsa/rsa_none.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include <openssl/bn.h> diff --git a/crypto/rsa/rsa_pk1.c b/crypto/rsa/rsa_pk1.c index 8560755f1d..0cce4bf657 100644 --- a/crypto/rsa/rsa_pk1.c +++ b/crypto/rsa/rsa_pk1.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include <openssl/bn.h> diff --git a/crypto/rsa/rsa_ssl.c b/crypto/rsa/rsa_ssl.c index cfeff15bc9..1831fcf062 100644 --- a/crypto/rsa/rsa_ssl.c +++ b/crypto/rsa/rsa_ssl.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include <openssl/bn.h> diff --git a/crypto/rsa/rsa_x931.c b/crypto/rsa/rsa_x931.c index 21548e37ed..f037f4e47d 100644 --- a/crypto/rsa/rsa_x931.c +++ b/crypto/rsa/rsa_x931.c @@ -56,6 +56,8 @@ * */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include "cryptlib.h" #include <openssl/bn.h> diff --git a/crypto/rsa/rsa_x931g.c b/crypto/rsa/rsa_x931g.c index 42c262aa41..1ccd0a1969 100644 --- a/crypto/rsa/rsa_x931g.c +++ b/crypto/rsa/rsa_x931g.c @@ -56,6 +56,8 @@ * [including the GNU Public Licence.] */ +#define OPENSSL_FIPSAPI + #include <stdio.h> #include <string.h> #include <time.h> diff --git a/fips/fips.h b/fips/fips.h index ea01f9fc4b..9d7c37096d 100644 --- a/fips/fips.h +++ b/fips/fips.h @@ -120,6 +120,9 @@ void FIPS_set_locking_callback(void (*func)(int mode, int type, #define CRYPTO_malloc FIPS_malloc #define CRYPTO_free FIPS_free +#define ERR_put_error FIPS_put_error +#define ERR_add_error_data FIPS_add_error_data + #define EVP_MD_CTX_init FIPS_md_ctx_init #define EVP_MD_CTX_cleanup FIPS_md_ctx_cleanup #define EVP_MD_CTX_create FIPS_md_ctx_create diff --git a/fips/hmac/fips_hmac_selftest.c b/fips/hmac/fips_hmac_selftest.c index 73455ffee2..a3967a4a77 100644 --- a/fips/hmac/fips_hmac_selftest.c +++ b/fips/hmac/fips_hmac_selftest.c @@ -47,6 +47,8 @@ * */ +#define OPENSSL_FIPSAPI + #include <string.h> #include <openssl/err.h> #include <openssl/fips.h> diff --git a/fips/rand/fips_rand_selftest.c b/fips/rand/fips_rand_selftest.c index 2194a76cd1..f352cc6cd7 100644 --- a/fips/rand/fips_rand_selftest.c +++ b/fips/rand/fips_rand_selftest.c @@ -47,6 +47,8 @@ * */ +#define OPENSSL_FIPSAPI + #include <string.h> #include <openssl/err.h> #include <openssl/fips.h> diff --git a/fips/utl/fips_err.c b/fips/utl/fips_err.c index d5952444da..ddc9176da1 100644 --- a/fips/utl/fips_err.c +++ b/fips/utl/fips_err.c @@ -51,6 +51,8 @@ * ==================================================================== */ +#define OPENSSL_FIPSAPI + #include <openssl/err.h> #include <openssl/fips.h> |