aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/news.rst4
-rw-r--r--src/lib/entropy/entropy_srcs.cpp3
-rw-r--r--src/lib/prov/openssl/openssl_rc4.cpp2
3 files changed, 7 insertions, 2 deletions
diff --git a/doc/news.rst b/doc/news.rst
index a764d75fb..d831d5b10 100644
--- a/doc/news.rst
+++ b/doc/news.rst
@@ -4,6 +4,10 @@ Release Notes
Version 1.11.33, Not Yet Released
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* Fix entropy source selection bug on Windows, which caused the
+ CryptoAPI entropy source to be not available under its normal name
+ "win32_cryptoapi" but instead "dev_random". GH #644
+
Version 1.11.32, 2016-09-28
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/lib/entropy/entropy_srcs.cpp b/src/lib/entropy/entropy_srcs.cpp
index 22d2e5e4b..ad84709a5 100644
--- a/src/lib/entropy/entropy_srcs.cpp
+++ b/src/lib/entropy/entropy_srcs.cpp
@@ -95,11 +95,12 @@ std::unique_ptr<Entropy_Source> Entropy_Source::create(const std::string& name)
{
#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM)
return std::unique_ptr<Entropy_Source>(new Device_EntropySource(BOTAN_SYSTEM_RNG_POLL_DEVICES));
+#endif
}
if(name == "win32_cryptoapi")
{
-#elif defined(BOTAN_HAS_ENTROPY_SRC_CAPI)
+#if defined(BOTAN_HAS_ENTROPY_SRC_CAPI)
return std::unique_ptr<Entropy_Source>(new Win32_CAPI_EntropySource);
#endif
}
diff --git a/src/lib/prov/openssl/openssl_rc4.cpp b/src/lib/prov/openssl/openssl_rc4.cpp
index 2e9f8aab7..3db62c32a 100644
--- a/src/lib/prov/openssl/openssl_rc4.cpp
+++ b/src/lib/prov/openssl/openssl_rc4.cpp
@@ -7,7 +7,7 @@
#include <botan/stream_cipher.h>
-#if defined(BOTAN_HAS_OPENSSL)
+#if defined(BOTAN_HAS_OPENSSL) && defined(BOTAN_HAS_RC4)
#include <botan/internal/algo_registry.h>
#include <botan/internal/openssl.h>