#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
#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. */