mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Fix KeyDeletionTest.DeleteAllKeys
Test failed to set default key validity, which caused keygen to fail. Wasn't noticed because this test is typically disarmed. Note: This test will destroy all user data on the device (which is why it is typically disarmed). Bug: 187105270 Test: VtsAidlKeyMintTargetTest --arm_deleteAllKeys Change-Id: I67e317fdfca15c95c6420918948d1416e97de482 Merged-In: I67e317fdfca15c95c6420918948d1416e97de482
This commit is contained in:
@@ -3271,10 +3271,10 @@ TEST_P(ImportKeyTest, AesFailure) {
|
||||
for (uint32_t key_size : {bitlen - 1, bitlen + 1, bitlen - 8, bitlen + 8}) {
|
||||
// Explicit key size doesn't match that of the provided key.
|
||||
auto result = ImportKey(AuthorizationSetBuilder()
|
||||
.Authorization(TAG_NO_AUTH_REQUIRED)
|
||||
.AesEncryptionKey(key_size)
|
||||
.EcbMode()
|
||||
.Padding(PaddingMode::PKCS7),
|
||||
.Authorization(TAG_NO_AUTH_REQUIRED)
|
||||
.AesEncryptionKey(key_size)
|
||||
.EcbMode()
|
||||
.Padding(PaddingMode::PKCS7),
|
||||
KeyFormat::RAW, key);
|
||||
ASSERT_TRUE(result == ErrorCode::IMPORT_PARAMETER_MISMATCH ||
|
||||
result == ErrorCode::UNSUPPORTED_KEY_SIZE)
|
||||
@@ -3338,10 +3338,10 @@ TEST_P(ImportKeyTest, TripleDesFailure) {
|
||||
for (uint32_t key_size : {bitlen - 1, bitlen + 1, bitlen - 8, bitlen + 8}) {
|
||||
// Explicit key size doesn't match that of the provided key.
|
||||
auto result = ImportKey(AuthorizationSetBuilder()
|
||||
.Authorization(TAG_NO_AUTH_REQUIRED)
|
||||
.TripleDesEncryptionKey(key_size)
|
||||
.EcbMode()
|
||||
.Padding(PaddingMode::PKCS7),
|
||||
.Authorization(TAG_NO_AUTH_REQUIRED)
|
||||
.TripleDesEncryptionKey(key_size)
|
||||
.EcbMode()
|
||||
.Padding(PaddingMode::PKCS7),
|
||||
KeyFormat::RAW, key);
|
||||
ASSERT_TRUE(result == ErrorCode::IMPORT_PARAMETER_MISMATCH ||
|
||||
result == ErrorCode::UNSUPPORTED_KEY_SIZE)
|
||||
@@ -6203,7 +6203,8 @@ TEST_P(KeyDeletionTest, DeleteAllKeys) {
|
||||
.Digest(Digest::NONE)
|
||||
.Padding(PaddingMode::NONE)
|
||||
.Authorization(TAG_NO_AUTH_REQUIRED)
|
||||
.Authorization(TAG_ROLLBACK_RESISTANCE));
|
||||
.Authorization(TAG_ROLLBACK_RESISTANCE)
|
||||
.SetDefaultValidity());
|
||||
ASSERT_TRUE(error == ErrorCode::ROLLBACK_RESISTANCE_UNAVAILABLE || error == ErrorCode::OK);
|
||||
|
||||
// Delete must work if rollback protection is implemented
|
||||
|
||||
Reference in New Issue
Block a user