Add additional OPENSSL_init() handling add dummy call to (hopefully)
[openssl.git] / crypto / crypto.h
index 84d3520ec23aca981021584dfcb190ca438ba57a..443486d70e3adfccf596a8e1a89d9f4499609b7f 100644 (file)
 #include <stdio.h>
 #endif
 
+/* Get FIPS renames if needed */
+#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSAPI)
+#include <openssl/fips.h>
+#endif
+
 #include <openssl/stack.h>
 #include <openssl/safestack.h>
 #include <openssl/opensslv.h>
    one way or another */
 #include <openssl/symhacks.h>
 
+/* For FIPS mode rename all OpenSSL symbols to avoid clashes with a
+ * non-FIPS OpenSSL.
+ */
+
+#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSSYMS)
+#include <openssl/fipssyms.h>
+#endif
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
@@ -249,10 +262,6 @@ typedef struct openssl_item_st
 #define CRYPTO_add(a,b,c)      ((*(a))+=(b))
 #endif
 
-#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSEVP)
-#define CRYPTO_lock FIPS_lock
-#endif
-
 /* Some applications as well as some parts of OpenSSL need to allocate
    and deallocate locks in a dynamic fashion.  The following typedef
    makes this possible in a type-safe manner.  */