summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-02-03 23:12:04 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-02-03 23:12:04 +0000
commit06b433acade4732a7f647faace14dfd6950ac49c (patch)
tree95d88f468a08bed0895ad80d86650bc4753c83d8 /crypto
parent14ae26f2e4f83b9ec0cbb02976e08a69bc5e5ba4 (diff)
Add FIPS support to the WIN32 build system.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/cryptlib.c2
-rw-r--r--crypto/rand/rand.h2
-rw-r--r--crypto/rand/rand_win.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index d52caa49ef..8bc5189c16 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -208,7 +208,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
+#ifndef OPENSSL_FIPS
ERR_remove_state(0);
+#endif
break;
case DLL_PROCESS_DETACH:
break;
diff --git a/crypto/rand/rand.h b/crypto/rand/rand.h
index 7a3a79b44f..8db2a5f80f 100644
--- a/crypto/rand/rand.h
+++ b/crypto/rand/rand.h
@@ -94,7 +94,7 @@ extern int rand_predictable;
int RAND_set_rand_method(const RAND_METHOD *meth);
const RAND_METHOD *RAND_get_rand_method(void);
-#ifndef OPENSSL_NO_ENGINE
+#if !defined(OPENSSL_NO_ENGINE) && !defined(OPENSSL_FIPS)
int RAND_set_rand_engine(ENGINE *engine);
#endif
RAND_METHOD *RAND_SSLeay(void);
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 5d134e186b..07ab4eb8df 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -109,6 +109,8 @@
*
*/
+#define OPENSSL_FIPSAPI
+
#include "cryptlib.h"
#include <openssl/rand.h>
#include "rand_lcl.h"