From 9bf73351e50325f4f892d7af222953cfa754f223 Mon Sep 17 00:00:00 2001 From: mauronofrio Date: Sat, 23 Nov 2019 22:27:34 +0100 Subject: Encryption: try wrapped key also for device without metadata support Change-Id: I8b58e45ec0d42470226083e8003dcd8152a91af1 --- partition.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/partition.cpp b/partition.cpp index 5d4e61dc0..aa82c09ec 100644 --- a/partition.cpp +++ b/partition.cpp @@ -662,7 +662,14 @@ void TWPartition::Setup_Data_Partition(bool Display_Error) { LOGERR("Primary block device '%s' for mount point '%s' is not present!\n", Primary_Block_Device.c_str(), Mount_Point.c_str()); } } else { - Decrypt_FBE_DE(); + + if (!Decrypt_FBE_DE()) { + LOGINFO("Trying wrapped key.\n"); + property_set("fbe.data.wrappedkey", "true"); + if (!Decrypt_FBE_DE()) { + LOGERR("Unable to decrypt FBE device\n"); + } + } } if (datamedia && (!Is_Encrypted || (Is_Encrypted && Is_Decrypted))) { Setup_Data_Media(); -- cgit v1.2.3