aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/build-data/buildh.in1
-rw-r--r--src/lib/rng/hmac_drbg/hmac_drbg.h4
-rw-r--r--src/lib/rng/rng.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index d6201be19..bd8cb6899 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -105,6 +105,7 @@
#define BOTAN_RNG_RESEED_POLL_BITS 128
#define BOTAN_RNG_AUTO_RESEED_TIMEOUT std::chrono::milliseconds(10)
#define BOTAN_RNG_RESEED_DEFAULT_TIMEOUT std::chrono::milliseconds(50)
+#define BOTAN_AUTO_RNG_DRBG_HASH_FUNCTION "SHA-384"
/*
* Specifies (in order) the list of entropy sources that will be used
diff --git a/src/lib/rng/hmac_drbg/hmac_drbg.h b/src/lib/rng/hmac_drbg/hmac_drbg.h
index d7a1d76aa..f52ae9de1 100644
--- a/src/lib/rng/hmac_drbg/hmac_drbg.h
+++ b/src/lib/rng/hmac_drbg/hmac_drbg.h
@@ -28,10 +28,10 @@ class BOTAN_DLL HMAC_DRBG final : public Stateful_RNG
void clear() override;
- void randomize(byte output[], size_t output_len);
+ void randomize(byte output[], size_t output_len) override;
void randomize_with_input(byte output[], size_t output_len,
- const byte input[], size_t input_len);
+ const byte input[], size_t input_len) override;
void add_entropy(const byte input[], size_t input_len) override;
private:
diff --git a/src/lib/rng/rng.cpp b/src/lib/rng/rng.cpp
index 218b9c842..526693561 100644
--- a/src/lib/rng/rng.cpp
+++ b/src/lib/rng/rng.cpp
@@ -112,7 +112,7 @@ RandomNumberGenerator* RandomNumberGenerator::make_rng()
AutoSeeded_RNG::AutoSeeded_RNG(size_t max_bytes_before_reseed)
{
- m_rng.reset(new HMAC_DRBG("SHA-384", max_bytes_before_reseed));
+ m_rng.reset(new HMAC_DRBG(BOTAN_AUTO_RNG_DRBG_HASH_FUNCTION, max_bytes_before_reseed));
size_t bits = m_rng->reseed(384);
if(!m_rng->is_seeded())
{