Encryption: try wrapped key if the first time decryption fails
Change-Id: I108b7aeea41c6b85c851f40c1c4a7e25012e2463
This commit is contained in:
@@ -296,7 +296,14 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
|
||||
while (!Decrypt_Data->Mount(false) && --retry_count)
|
||||
usleep(500);
|
||||
if (Decrypt_Data->Mount(false)) {
|
||||
Decrypt_Data->Decrypt_FBE_DE();
|
||||
if (!Decrypt_Data->Decrypt_FBE_DE()) {
|
||||
LOGINFO("Trying wrapped key.\n");
|
||||
property_set("fbe.data.wrappedkey", "true");
|
||||
if (!Decrypt_Data->Decrypt_FBE_DE()) {
|
||||
LOGERR("Unable to decrypt FBE device\n");
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
LOGINFO("Failed to mount data after metadata decrypt\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user