diff options
author | Kenny Root <kroot@google.com> | 2012-03-26 13:47:48 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2012-03-26 16:21:07 -0700 |
commit | 3c338f473122e85fd64379524a91219872f80720 (patch) | |
tree | eab5b1f444ce823854686cc6448f698ac68a40fb | |
parent | 81c323dd54d5f0ea1e75ab392187608049b2326c (diff) | |
download | libhardware-3c338f473122e85fd64379524a91219872f80720.tar.gz |
keymaster: add flags for keymaster features
The first flag is something for the default implementation to use to
indicate that its keys are importable to hardware keymasters. This
allows easy migration from the default software implementation to
hardware implementations as they become available.
Change-Id: Ideb26a4b1ac91ca8c330a4fe4df323f028b2f855
-rw-r--r-- | include/hardware/keymaster.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/hardware/keymaster.h b/include/hardware/keymaster.h index 3c7799ac..d4cf124e 100644 --- a/include/hardware/keymaster.h +++ b/include/hardware/keymaster.h @@ -39,6 +39,20 @@ __BEGIN_DECLS */ #define KEYMASTER_API_VERSION 1 +/** + * Flags for keymaster_device::flags + */ +enum { + /* + * Indicates this keymaster implementation does not have hardware that + * keeps private keys out of user space. + * + * This should not be implemented on anything other than the default + * implementation. + */ + KEYMASTER_SOFTWARE_ONLY = 0x00000001, +}; + struct keystore_module { hw_module_t common; }; @@ -85,6 +99,11 @@ struct keymaster_device { uint32_t client_version; + /** + * See flags defined for keymaster_device::flags above. + */ + uint32_t flags; + void* context; /** |