summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2019-03-02 23:33:52 (GMT)
committerMichael Bestas <mkbestas@lineageos.org>2019-03-02 23:33:52 (GMT)
commit1e56c85dd8673d63897f65ef8fe9369bc8d1b313 (patch)
tree0e514582a844a9ee19d6c4d74739509f61cdaa44
parent331881682cb245240f1de7d66860d869b846ea03 (diff)
downloadandroid_vendor_qcom_opensource_cryptfs_hw-1e56c85dd8673d63897f65ef8fe9369bc8d1b313.zip
android_vendor_qcom_opensource_cryptfs_hw-1e56c85dd8673d63897f65ef8fe9369bc8d1b313.tar.gz
android_vendor_qcom_opensource_cryptfs_hw-1e56c85dd8673d63897f65ef8fe9369bc8d1b313.tar.bz2
cryptfs_hw: Cleanup should_use_keymasterrefs/changes/32/243032/1
* Remove duplicated logic Change-Id: I7a644b2bb7954c9491d6111b3d9614fd9d6ac64b
-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;
}