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

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

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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic002d7e31ca2dcb19c603eb9e780a170619834b1
parents 68facba6 64e8e729
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());