OSDN Git Service

Don't send more than 2K to addRngEntropy
authorShawn Willden <swillden@google.com>
Fri, 11 Aug 2017 20:33:44 +0000 (14:33 -0600)
committerShawn Willden <swillden@google.com>
Wed, 30 Aug 2017 22:13:30 +0000 (22:13 +0000)
Bug: 63745893
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I136920d3b62e026b22fbe06594bc40ccddc57dc3
(cherry picked from commit 3e1267edf0621185043482a805fcec0fa2a63719)

keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp

index b950765..c8d6fc0 100644 (file)
@@ -3864,7 +3864,7 @@ TEST_F(AddEntropyTest, AddEmptyEntropy) {
  * Verifies that the addRngEntropy method doesn't blow up when given a largish amount of data.
  */
 TEST_F(AddEntropyTest, AddLargeEntropy) {
-    EXPECT_EQ(ErrorCode::OK, keymaster().addRngEntropy(HidlBuf(string(16 * 1024, 'a'))));
+    EXPECT_EQ(ErrorCode::OK, keymaster().addRngEntropy(HidlBuf(string(2 * 1024, 'a'))));
 }
 
 typedef KeymasterHidlTest AttestationTest;