diff options
Diffstat (limited to 'keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp')
-rw-r--r-- | keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp index fbe5237a..3a181a96 100644 --- a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp +++ b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp | |||
@@ -2918,28 +2918,6 @@ TEST_F(EncryptionOperationsTest, AesEcbRoundTripSuccess) { | |||
2918 | } | 2918 | } |
2919 | 2919 | ||
2920 | /* | 2920 | /* |
2921 | * EncryptionOperationsTest.AesEcbWithUserId | ||
2922 | * | ||
2923 | * Verifies that AES ECB mode works when Tag::USER_ID is specified. | ||
2924 | */ | ||
2925 | TEST_F(EncryptionOperationsTest, AesEcbWithUserId) { | ||
2926 | string key = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | ||
2927 | ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder() | ||
2928 | .Authorization(TAG_NO_AUTH_REQUIRED) | ||
2929 | .Authorization(TAG_USER_ID, 0) | ||
2930 | .AesEncryptionKey(key.size() * 8) | ||
2931 | .EcbMode() | ||
2932 | .Padding(PaddingMode::PKCS7), | ||
2933 | KeyFormat::RAW, key)); | ||
2934 | |||
2935 | string message = "Hello World!"; | ||
2936 | auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7); | ||
2937 | string ciphertext = EncryptMessage(message, params); | ||
2938 | string plaintext = DecryptMessage(ciphertext, params); | ||
2939 | EXPECT_EQ(message, plaintext); | ||
2940 | } | ||
2941 | |||
2942 | /* | ||
2943 | * EncryptionOperationsTest.AesEcbRoundTripSuccess | 2921 | * EncryptionOperationsTest.AesEcbRoundTripSuccess |
2944 | * | 2922 | * |
2945 | * Verifies that AES encryption fails in the correct way when an unauthorized mode is specified. | 2923 | * Verifies that AES encryption fails in the correct way when an unauthorized mode is specified. |