Transfer error redirection to fips.h, add OPENSSL_FIPSAPI to source files
authorDr. Stephen Henson <steve@openssl.org>
Thu, 3 Feb 2011 17:00:24 +0000 (17:00 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 3 Feb 2011 17:00:24 +0000 (17:00 +0000)
that use it.

22 files changed:
crypto/bn/bn_add.c
crypto/bn/bn_div.c
crypto/bn/bn_exp2.c
crypto/bn/bn_gcd.c
crypto/bn/bn_mod.c
crypto/dh/dh_gen.c
crypto/dh/dh_key.c
crypto/dsa/dsa_key.c
crypto/dsa/dsa_ossl.c
crypto/err/err.h
crypto/evp/e_aes.c
crypto/fips_err.c [deleted file]
crypto/rsa/rsa_crpt.c
crypto/rsa/rsa_none.c
crypto/rsa/rsa_pk1.c
crypto/rsa/rsa_ssl.c
crypto/rsa/rsa_x931.c
crypto/rsa/rsa_x931g.c
fips/fips.h
fips/hmac/fips_hmac_selftest.c
fips/rand/fips_rand_selftest.c
fips/utl/fips_err.c

index 9405163706aae5dc8064780a2ce879fece80ccdf..f8e6729a47746ed5fd98f39c6b203a97e9f0ddc2 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
index 802a43d642de37072ef5de201d51a71658178426..a6a955808bcb14611396da748f4f15190ca4e7fb 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include <openssl/bn.h>
 #include "cryptlib.h"
index bd0c34b91bc62243410cd1c7ebf9f71197dcb74f..a00c11521684030ea2acb5c33973641ce190546f 100644 (file)
  *
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
index 45b417bddc3d171988988e7dee908962feb2bb9f..adef79e87fc070dc98820ca434ed13955510d3c8 100644 (file)
  *
  */
 
+#define OPENSSL_FIPSAPI
+
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
index 77d6ddb91a5fc9fe1b89ec1caa9579d1c95baa10..49c74fbb834daee5605531e4b3f8cc3dadf456f6 100644 (file)
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
index 82e560068fa9bacdea3b4b5b6a5a08bcc0f89321..9749b7215715f502d73339fa9697c3817c35aead 100644 (file)
@@ -61,6 +61,8 @@
  *  - Geoff
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
index 99c722bf03924c186a1fe73ef4de3b35e93265c6..bba83be312cf4fe3bd27387c94737593308927c0 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
index 5cacc0447805729644412dd8cc47467b8343cbb1..a90b3c460b7a9a250f2c18c2385e08393d8685f7 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include <time.h>
 #include "cryptlib.h"
index fd757082f955f3768b08e44a8ba371067123650d..8fa39e92812765e2729da672ef0a09cebfe8e0bf 100644 (file)
@@ -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>
index 37aee6f485bd444aca246e2f4c305ad2e4022d58..3d71e4212e4c4cb2ed4b9a86fa241b129b59d5bb 100644 (file)
@@ -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),
index 32c903386b42b18652eed0d1e7a38ea9c06d41e0..b4da40d0e207bf7c01453bc95af430414ef2e038 100644 (file)
@@ -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 (file)
index 09f1174..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <openssl/opensslconf.h>
-
-#ifdef OPENSSL_FIPS
-# include "fips_err.h"
-#else
-static void *dummy=&dummy;
-#endif
index 7750366613b4cacefc452ee9beb62dd58f7fc619..6a0cf39a5fc19062d7215d3678c6458c6cb876cb 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include <openssl/crypto.h>
 #include "cryptlib.h"
index e6f3e627ca1ab8b2cb51d5136ddff81b170994de..b8d01a92cf4ed91a8b12385af8d30ec240f017ec 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
index 8560755f1d12d8745f8272f2cd7441c225556677..0cce4bf65730b330d2f891ff2a1b1610717ad130 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
index cfeff15bc9c125c30e418a2e5351f019eba40236..1831fcf062027881961ad3e2d615cd22a08101b6 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
index 21548e37edd547863148b8a615c6dfa5adc70b11..f037f4e47de3c753f90e46506f6cc3aceaaba409 100644 (file)
@@ -56,6 +56,8 @@
  *
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
index 42c262aa41e1e65745f85c6b23fa1231ab0f63ed..1ccd0a1969f54162228f397c4f70569310b90f18 100644 (file)
@@ -56,6 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
index ea01f9fc4b009003db04d01721f2ed653727cf56..9d7c37096d84703ec378ab549c961dc875e35224 100644 (file)
@@ -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
index 73455ffee2edb1c9eb9395b2b6875e25a097f593..a3967a4a777ee13faa575ec7af397b05df255859 100644 (file)
@@ -47,6 +47,8 @@
  *
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <string.h>
 #include <openssl/err.h>
 #include <openssl/fips.h>
index 2194a76cd1bd71701dc856a924671c0e09949007..f352cc6cd785e6c2ab90b601f8d56d70e32ef171 100644 (file)
@@ -47,6 +47,8 @@
  *
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <string.h>
 #include <openssl/err.h>
 #include <openssl/fips.h>
index d5952444da00c5cc0aab830900cdd7352dd4baf0..ddc9176da1e47db09e33184b5e7353bff436deed 100644 (file)
@@ -51,6 +51,8 @@
  * ====================================================================
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <openssl/err.h>
 #include <openssl/fips.h>