summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeeraj Soni <neersoni@codeaurora.org>2018-05-22 21:06:36 +0530
committerRamandeep Trehan <rtrehan@codeaurora.org>2018-10-23 17:12:03 +0530
commit5f57639048bd30e2ab5e10f31c9e8ccb4249a1da (patch)
tree707e507d2a1377011926e08724a908ca295a8238
parent07f77ac64f3fb1bfe1bc4213f5add34b5bfb9dac (diff)
downloadandroid_vendor_qcom_opensource_cryptfs_hw-5f57639048bd30e2ab5e10f31c9e8ccb4249a1da.tar.gz
android_vendor_qcom_opensource_cryptfs_hw-5f57639048bd30e2ab5e10f31c9e8ccb4249a1da.tar.bz2
android_vendor_qcom_opensource_cryptfs_hw-5f57639048bd30e2ab5e10f31c9e8ccb4249a1da.zip
cryptfs_hw: Choose keymaster version for key signing
Keymaster key signing support is available from version 1.0 and above. Thus, version 0.3 is excluded on supported targets. Change-Id: I0cd6455bc5d2459231cb56baf68e57073fe60d69
-rw-r--r--cryptfs_hw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cryptfs_hw.c b/cryptfs_hw.c
index ebf9381..72d0133 100644
--- a/cryptfs_hw.c
+++ b/cryptfs_hw.c
@@ -413,6 +413,13 @@ int should_use_keymaster()
{
/*
* HW FDE key should be tied to keymaster
+ * if version is above 0.3. this is to
+ * support msm8909 go target.
*/
- return 1;
+ int rc = 1;
+ if (get_keymaster_version() == KEYMASTER_MODULE_API_VERSION_0_3) {
+ SLOGI("Keymaster version is 0.3");
+ rc = 0;
+ }
+ return rc;
}