aboutsummaryrefslogtreecommitdiff
path: root/fips
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-01-27 15:22:26 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-01-27 15:22:26 +0000
commit7c8ced94c32131f24d469d2899f3339f77c47aa1 (patch)
tree7dad16d42ed83f3d03917fc25d46fefa4647a2cc /fips
parentd5df1b3f0db030c2202cbcc7c0ca9921d3db2ce0 (diff)
downloadopenssl-7c8ced94c32131f24d469d2899f3339f77c47aa1.zip
openssl-7c8ced94c32131f24d469d2899f3339f77c47aa1.tar.gz
openssl-7c8ced94c32131f24d469d2899f3339f77c47aa1.tar.bz2
Change OPENSSL_FIPSEVP to OPENSSL_FIPSAPI as it doesn't just refer
to EVP any more. Move locking #define into fips.h. Set FIPS locking callbacks at same time as OpenSSL locking callbacks.
Diffstat (limited to 'fips')
-rw-r--r--fips/aes/fips_aes_selftest.c2
-rw-r--r--fips/aes/fips_aesavs.c2
-rw-r--r--fips/des/fips_des_selftest.c2
-rw-r--r--fips/des/fips_desmovs.c2
-rw-r--r--fips/dsa/fips_dsa_selftest.c2
-rw-r--r--fips/dsa/fips_dsa_sign.c2
-rw-r--r--fips/dsa/fips_dssvs.c2
-rw-r--r--fips/fips.c2
-rw-r--r--fips/fips.h4
-rw-r--r--fips/fips_test_suite.c2
-rw-r--r--fips/rand/fips_rand.c2
-rw-r--r--fips/rsa/fips_rsa_sign.c2
-rw-r--r--fips/rsa/fips_rsagtest.c2
-rw-r--r--fips/rsa/fips_rsastest.c2
-rw-r--r--fips/rsa/fips_rsavtest.c2
-rw-r--r--fips/sha/fips_sha1_selftest.c2
-rw-r--r--fips/sha/fips_shatest.c2
-rw-r--r--fips/utl/fips_lck.c2
18 files changed, 21 insertions, 17 deletions
diff --git a/fips/aes/fips_aes_selftest.c b/fips/aes/fips_aes_selftest.c
index 8b6dd97..8c5a0ee 100644
--- a/fips/aes/fips_aes_selftest.c
+++ b/fips/aes/fips_aes_selftest.c
@@ -47,7 +47,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <string.h>
#include <openssl/err.h>
diff --git a/fips/aes/fips_aesavs.c b/fips/aes/fips_aesavs.c
index d7b18ee..1f302a5 100644
--- a/fips/aes/fips_aesavs.c
+++ b/fips/aes/fips_aesavs.c
@@ -57,7 +57,7 @@
U.S.A.
----------------------------------------------*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <stdlib.h>
diff --git a/fips/des/fips_des_selftest.c b/fips/des/fips_des_selftest.c
index cad3270..d93d3b5 100644
--- a/fips/des/fips_des_selftest.c
+++ b/fips/des/fips_des_selftest.c
@@ -47,7 +47,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <string.h>
#include <openssl/err.h>
diff --git a/fips/des/fips_desmovs.c b/fips/des/fips_desmovs.c
index baa0b04..6766d1c 100644
--- a/fips/des/fips_desmovs.c
+++ b/fips/des/fips_desmovs.c
@@ -58,7 +58,7 @@
U.S.A.
----------------------------------------------*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <stdlib.h>
diff --git a/fips/dsa/fips_dsa_selftest.c b/fips/dsa/fips_dsa_selftest.c
index db000a8..9524e63 100644
--- a/fips/dsa/fips_dsa_selftest.c
+++ b/fips/dsa/fips_dsa_selftest.c
@@ -56,7 +56,7 @@
* [including the GNU Public Licence.]
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <string.h>
#include <openssl/crypto.h>
diff --git a/fips/dsa/fips_dsa_sign.c b/fips/dsa/fips_dsa_sign.c
index c111ce0..7223589 100644
--- a/fips/dsa/fips_dsa_sign.c
+++ b/fips/dsa/fips_dsa_sign.c
@@ -56,7 +56,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <string.h>
#include <openssl/evp.h>
diff --git a/fips/dsa/fips_dssvs.c b/fips/dsa/fips_dssvs.c
index 9c9e37b..513df72 100644
--- a/fips/dsa/fips_dssvs.c
+++ b/fips/dsa/fips_dssvs.c
@@ -10,7 +10,7 @@ int main(int argc, char **argv)
}
#else
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <openssl/bn.h>
#include <openssl/dsa.h>
diff --git a/fips/fips.c b/fips/fips.c
index b6de3f7..83b72e5 100644
--- a/fips/fips.c
+++ b/fips/fips.c
@@ -47,7 +47,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <openssl/rand.h>
#include <openssl/fips_rand.h>
diff --git a/fips/fips.h b/fips/fips.h
index 061ed93..96d8ff6 100644
--- a/fips/fips.h
+++ b/fips/fips.h
@@ -122,6 +122,10 @@ int FIPS_evp_md_ctx_cleanup(EVP_MD_CTX *ctx);
void FIPS_set_locking_callback (void (*func)(int mode, int type,
const char *file,int line));
+#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSAPI)
+#define CRYPTO_lock FIPS_lock
+#endif
+
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
diff --git a/fips/fips_test_suite.c b/fips/fips_test_suite.c
index 0d6bc80..6944dbc 100644
--- a/fips/fips_test_suite.c
+++ b/fips/fips_test_suite.c
@@ -12,7 +12,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <assert.h>
diff --git a/fips/rand/fips_rand.c b/fips/rand/fips_rand.c
index b050578..f573b26 100644
--- a/fips/rand/fips_rand.c
+++ b/fips/rand/fips_rand.c
@@ -47,7 +47,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
/*
* This is a FIPS approved AES PRNG based on ANSI X9.31 A.2.4.
diff --git a/fips/rsa/fips_rsa_sign.c b/fips/rsa/fips_rsa_sign.c
index a7f73f5..d07111b 100644
--- a/fips/rsa/fips_rsa_sign.c
+++ b/fips/rsa/fips_rsa_sign.c
@@ -56,7 +56,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <string.h>
#include <openssl/evp.h>
diff --git a/fips/rsa/fips_rsagtest.c b/fips/rsa/fips_rsagtest.c
index 1b79ffa..95960ef 100644
--- a/fips/rsa/fips_rsagtest.c
+++ b/fips/rsa/fips_rsagtest.c
@@ -56,7 +56,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <ctype.h>
diff --git a/fips/rsa/fips_rsastest.c b/fips/rsa/fips_rsastest.c
index 2a125ae..9dff464 100644
--- a/fips/rsa/fips_rsastest.c
+++ b/fips/rsa/fips_rsastest.c
@@ -56,7 +56,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <ctype.h>
diff --git a/fips/rsa/fips_rsavtest.c b/fips/rsa/fips_rsavtest.c
index 0421807..0971f15 100644
--- a/fips/rsa/fips_rsavtest.c
+++ b/fips/rsa/fips_rsavtest.c
@@ -56,7 +56,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <ctype.h>
diff --git a/fips/sha/fips_sha1_selftest.c b/fips/sha/fips_sha1_selftest.c
index 2c6a591..4291617 100644
--- a/fips/sha/fips_sha1_selftest.c
+++ b/fips/sha/fips_sha1_selftest.c
@@ -47,7 +47,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <string.h>
#include <openssl/err.h>
diff --git a/fips/sha/fips_shatest.c b/fips/sha/fips_shatest.c
index 97b68b8..480b990 100644
--- a/fips/sha/fips_shatest.c
+++ b/fips/sha/fips_shatest.c
@@ -56,7 +56,7 @@
*
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <ctype.h>
diff --git a/fips/utl/fips_lck.c b/fips/utl/fips_lck.c
index 47168af..63b4c0d 100644
--- a/fips/utl/fips_lck.c
+++ b/fips/utl/fips_lck.c
@@ -51,7 +51,7 @@
* ====================================================================
*/
-#define OPENSSL_FIPSEVP
+#define OPENSSL_FIPSAPI
#include <openssl/evp.h>
#include <openssl/fips.h>