Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85eee4de authored by Bill Richardson's avatar Bill Richardson Committed by Automerger Merge Worker
Browse files

Fix segfault in EncryptionOperationsTest.RsaPkcs1Success am: 47871581 am:...

Fix segfault in EncryptionOperationsTest.RsaPkcs1Success am: 47871581 am: 64e8e729 am: adb0da89

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1607102

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9a1040b7e544dba8f73c4e975a6164c20602d99f
parents f46a812e adb0da89
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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());