Fix segfault in EncryptionOperationsTest.RsaPkcs1Success am: 478715818f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1607102 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I8e18c84d8bf699f6a6980d83aa3fd5f3859859c5
This commit is contained in:
commit
64e8e72963
1 changed files with 2 additions and 1 deletions
|
@ -2562,7 +2562,8 @@ TEST_P(EncryptionOperationsTest, RsaPkcs1Success) {
|
|||
string message = "Hello World!";
|
||||
auto params = AuthorizationSetBuilder().Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT);
|
||||
string ciphertext1 = EncryptMessage(message, params);
|
||||
EXPECT_EQ(2048U / 8, ciphertext1.size());
|
||||
// Die here on failure because we try to modify ciphertext1 below
|
||||
ASSERT_EQ(2048U / 8, ciphertext1.size()) << "Failed to encrypt the message";
|
||||
|
||||
string ciphertext2 = EncryptMessage(message, params);
|
||||
EXPECT_EQ(2048U / 8, ciphertext2.size());
|
||||
|
|
Loading…
Reference in a new issue