Encryption: try wrapped key if the first time decryption fails

Change-Id: I108b7aeea41c6b85c851f40c1c4a7e25012e2463
This commit is contained in:
bigbiff bigbiff
2019-08-27 20:50:31 -04:00
parent 05cd3f8616
commit 0be03b3217
3 changed files with 13 additions and 6 deletions

View File

@@ -208,11 +208,11 @@ static bool read_and_fixate_user_ce_key(userid_t user_id,
}
static bool is_wrapped_key_supported_common(const std::string& mount_point) {
LOG(DEBUG) << "Determining wrapped-key support for " << mount_point;
LOG(DEBUG) << "Determining wrapped-key support for " << mount_point << std::endl;
std::string wrapped_key_supported = android::base::GetProperty("fbe.data.wrappedkey", "false");
LOG(DEBUG) << "fbe.data.wrappedkey = " << wrapped_key_supported;
LOG(DEBUG) << "fbe.data.wrappedkey = " << wrapped_key_supported << std::endl;
if (mount_point == DATA_MNT_POINT && wrapped_key_supported == "true") {
LOG(DEBUG) << "Wrapped key supported on " << mount_point;
LOG(DEBUG) << "Wrapped key supported on " << mount_point << std::endl;
return true;
} else {
return false;