]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
unittest_crypto: Don't exceed limit for getentropy 18505/head
authorBrad Hubbard <bhubbard@redhat.com>
Tue, 24 Oct 2017 04:34:26 +0000 (14:34 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Tue, 24 Oct 2017 04:34:26 +0000 (14:34 +1000)
CryptoRandom::get_bytes calls getentropy directly if available and it
enforces a limit of 256 bytes.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
src/test/crypto.cc

index 3e459ea01d483bab9e9d47e0b5e3e0abff012f42..d397f0a25bf15a639b8d2af4fb242839a30f4737 100644 (file)
@@ -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;