aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/entropy/getentropy/getentropy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/entropy/getentropy/getentropy.cpp')
-rw-r--r--src/lib/entropy/getentropy/getentropy.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/entropy/getentropy/getentropy.cpp b/src/lib/entropy/getentropy/getentropy.cpp
index 56c356eba..e578a4ed5 100644
--- a/src/lib/entropy/getentropy/getentropy.cpp
+++ b/src/lib/entropy/getentropy/getentropy.cpp
@@ -12,12 +12,13 @@
namespace Botan {
/**
-* Gather BOTAN_SYSTEM_RNG_POLL_REQUEST bytes entropy from getentropy(2).
-* This is 64 bytes, note that maximum buffer size is limited to 256 bytes.
+* Gather 256 bytes entropy from getentropy(2). Note that maximum
+* buffer size is limited to 256 bytes. On OpenBSD this does neither
+* block nor fail.
*/
size_t Getentropy::poll(RandomNumberGenerator& rng)
{
- secure_vector<uint8_t> buf(BOTAN_SYSTEM_RNG_POLL_REQUEST);
+ secure_vector<uint8_t> buf(256);
if(::getentropy(buf.data(), buf.size()) == 0)
{