Skip to content

Commit

Permalink
unittest_crypto: Don't exceed limit for getentropy
Browse files Browse the repository at this point in the history
CryptoRandom::get_bytes calls getentropy directly if available and it
enforces a limit of 256 bytes.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
  • Loading branch information
badone committed Oct 24, 2017
1 parent a9baa8b commit 2e3af69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2e3af69

Please sign in to comment.