aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/utils.cpp')
-rw-r--r--src/cli/utils.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cli/utils.cpp b/src/cli/utils.cpp
index b0d364581..610a14dc1 100644
--- a/src/cli/utils.cpp
+++ b/src/cli/utils.cpp
@@ -7,7 +7,6 @@
#include "cli.h"
#include <botan/version.h>
-#include <botan/auto_rng.h>
#include <botan/hash.h>
#include <botan/cpuid.h>
#include <botan/hex.h>
@@ -16,6 +15,10 @@
#include <botan/base64.h>
#endif
+#if defined(BOTAN_HAS_AUTO_SEEDING_RNG)
+ #include <botan/auto_rng.h>
+#endif
+
#if defined(BOTAN_HAS_SYSTEM_RNG)
#include <botan/system_rng.h>
#endif
@@ -179,7 +182,12 @@ class RNG final : public Command
}
else
{
+#if defined(BOTAN_HAS_AUTO_SEEDING_RNG)
rng.reset(new Botan::AutoSeeded_RNG);
+#else
+ error_output() << "auto_rng disabled in build\n";
+ return;
+#endif
}
for(const std::string& req : get_arg_list("bytes"))