From 2e3af697a8d2c8fad174bb0ea9e67b15e8bb618a Mon Sep 17 00:00:00 2001 From: Brad Hubbard Date: Tue, 24 Oct 2017 14:34:26 +1000 Subject: [PATCH] unittest_crypto: Don't exceed limit for getentropy CryptoRandom::get_bytes calls getentropy directly if available and it enforces a limit of 256 bytes. Signed-off-by: Brad Hubbard --- src/test/crypto.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/crypto.cc b/src/test/crypto.cc index 3e459ea01d4..d397f0a25bf 100644 --- a/src/test/crypto.cc +++ b/src/test/crypto.cc @@ -121,7 +121,7 @@ TEST(AES, Loop) { bufferptr secret(16); random.get_bytes(secret.c_str(), secret.length()); - bufferptr orig_plaintext(1024); + bufferptr orig_plaintext(256); random.get_bytes(orig_plaintext.c_str(), orig_plaintext.length()); bufferlist plaintext;