diff options
author | Alex Klyubin <klyubin@google.com> | 2015-04-14 10:52:34 -0700 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2015-04-14 10:52:34 -0700 |
commit | 45d27836bde9e641a57b69a1502924a29b9b3bf1 (patch) | |
tree | a07f0fd1516217d9957fd1bec8e02d734d7d363b /keystore/java | |
parent | 8704ae464a001e17275257d19eae688ff3a28892 (diff) | |
download | frameworks_base-45d27836bde9e641a57b69a1502924a29b9b3bf1.zip frameworks_base-45d27836bde9e641a57b69a1502924a29b9b3bf1.tar.gz frameworks_base-45d27836bde9e641a57b69a1502924a29b9b3bf1.tar.bz2 |
Add Keymaster KM_ORIGIN_UNKNOWN constant.
This tracks d359b044830b292f492f8a8df5471f869e358399 from
hardware/libhardware.
Bug: 18088752
Change-Id: I9a7bd8bdee51c18ae0427eff4efe036213d2b175
Diffstat (limited to 'keystore/java')
-rw-r--r-- | keystore/java/android/security/KeyStoreKeyProperties.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/keystore/java/android/security/KeyStoreKeyProperties.java b/keystore/java/android/security/KeyStoreKeyProperties.java index d8ad1d3..1077af4 100644 --- a/keystore/java/android/security/KeyStoreKeyProperties.java +++ b/keystore/java/android/security/KeyStoreKeyProperties.java @@ -226,14 +226,24 @@ public abstract class KeyStoreKeyProperties { public static final int IMPORTED = 1 << 1; /** + * Origin of the key is unknown. This can occur only for keys backed by an old TEE + * implementation which does not record origin information. + * + * @hide + */ + public static final int UNKNOWN = 1 << 2; + + /** * @hide */ public static @OriginEnum int fromKeymaster(int origin) { switch (origin) { - case KeymasterDefs.KM_ORIGIN_HARDWARE: + case KeymasterDefs.KM_ORIGIN_GENERATED: return GENERATED; case KeymasterDefs.KM_ORIGIN_IMPORTED: return IMPORTED; + case KeymasterDefs.KM_ORIGIN_UNKNOWN: + return UNKNOWN; default: throw new IllegalArgumentException("Unknown origin: " + origin); } |