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

Commit 9fca9719 authored by Brian C. Young's avatar Brian C. Young
Browse files

Remove superfluous test

This test was added on a bad assumption about the behavior of the
keymaster spec, and is now being removed.

Test: VTS
Bug: 77307569
Change-Id: Iac2f6f45ea1816505ff3b47bbdc548ff1161c96b
parent 862d8443
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -2917,28 +2917,6 @@ TEST_F(EncryptionOperationsTest, AesEcbRoundTripSuccess) {
    EXPECT_EQ(message, plaintext);
}

/*
 * EncryptionOperationsTest.AesEcbWithUserId
 *
 * Verifies that AES ECB mode works when Tag::USER_ID is specified.
 */
TEST_F(EncryptionOperationsTest, AesEcbWithUserId) {
    string key = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
                                           .Authorization(TAG_NO_AUTH_REQUIRED)
                                           .Authorization(TAG_USER_ID, 0)
                                           .AesEncryptionKey(key.size() * 8)
                                           .EcbMode()
                                           .Padding(PaddingMode::PKCS7),
                                       KeyFormat::RAW, key));

    string message = "Hello World!";
    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
    string ciphertext = EncryptMessage(message, params);
    string plaintext = DecryptMessage(ciphertext, params);
    EXPECT_EQ(message, plaintext);
}

/*
 * EncryptionOperationsTest.AesEcbRoundTripSuccess
 *