summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptfs_hw.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/cryptfs_hw.c b/cryptfs_hw.c
index 482e28b..2d7b600 100644
--- a/cryptfs_hw.c
+++ b/cryptfs_hw.c
@@ -482,26 +482,15 @@ static int get_keymaster_version()
int should_use_keymaster()
{
- int rc = 1;
-#ifdef LEGACY_HW_DISK_ENCRYPTION
- /*
- * HW FDE key should be tied to keymaster only if
- * new Keymaster is available
- */
- if (get_keymaster_version() != KEYMASTER_MODULE_API_VERSION_1_0) {
- SLOGI("Keymaster version is not 1.0");
- rc = 0;
- }
-#else
/*
* HW FDE key should be tied to keymaster
* if version is above 0.3. this is to
* support msm8909 go target.
*/
- if (get_keymaster_version() == KEYMASTER_MODULE_API_VERSION_0_3) {
+ int rc = 1;
+ if (get_keymaster_version() == KEYMASTER_MODULE_API_VERSION_0_3) {
SLOGI("Keymaster version is 0.3");
rc = 0;
- }
-#endif
- return rc;
+ }
+ return rc;
}