aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/entropy/entropy_srcs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/entropy/entropy_srcs.cpp')
-rw-r--r--src/lib/entropy/entropy_srcs.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/entropy/entropy_srcs.cpp b/src/lib/entropy/entropy_srcs.cpp
index 252be4fa1..d9d5cfe4b 100644
--- a/src/lib/entropy/entropy_srcs.cpp
+++ b/src/lib/entropy/entropy_srcs.cpp
@@ -36,6 +36,10 @@
#include <botan/internal/darwin_secrandom.h>
#endif
+#if defined(BOTAN_HAS_ENTROPY_SRC_GETENTROPY)
+ #include <botan/internal/getentropy.h>
+#endif
+
namespace Botan {
std::unique_ptr<Entropy_Source> Entropy_Source::create(const std::string& name)
@@ -61,6 +65,13 @@ std::unique_ptr<Entropy_Source> Entropy_Source::create(const std::string& name)
#endif
}
+ if(name == "getentropy")
+ {
+#if defined(BOTAN_HAS_ENTROPY_SRC_GETENTROPY)
+ return std::unique_ptr<Entropy_Source>(new Getentropy);
+#endif
+ }
+
if(name == "dev_random")
{
#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM)