diff options
author | Alex Klyubin <klyubin@google.com> | 2015-04-16 20:09:05 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-16 20:09:05 +0000 |
commit | 51884f0e066bcf1ba5e039cd8a24a87139b5a01c (patch) | |
tree | 0cee641bf156dbe2320dbfcd05848212fda414a5 | |
parent | c4affce9df0817b84df3e61c3932f53b77ee0986 (diff) | |
parent | 499126c43385ba7bce9b8547b61bafd0c6311147 (diff) | |
download | frameworks_base-51884f0e066bcf1ba5e039cd8a24a87139b5a01c.zip frameworks_base-51884f0e066bcf1ba5e039cd8a24a87139b5a01c.tar.gz frameworks_base-51884f0e066bcf1ba5e039cd8a24a87139b5a01c.tar.bz2 |
am 499126c4: Merge "Add Keymaster KM_ORIGIN_UNKNOWN constant."
* commit '499126c43385ba7bce9b8547b61bafd0c6311147':
Add Keymaster KM_ORIGIN_UNKNOWN constant.
-rw-r--r-- | core/java/android/security/keymaster/KeymasterDefs.java | 4 | ||||
-rw-r--r-- | keystore/java/android/security/KeyStoreKeyProperties.java | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/core/java/android/security/keymaster/KeymasterDefs.java b/core/java/android/security/keymaster/KeymasterDefs.java index 46a04b1..25ebe75 100644 --- a/core/java/android/security/keymaster/KeymasterDefs.java +++ b/core/java/android/security/keymaster/KeymasterDefs.java @@ -118,9 +118,9 @@ public final class KeymasterDefs { public static final int KM_DIGEST_SHA_2_512 = 6; // Key origins. - public static final int KM_ORIGIN_HARDWARE = 0; - public static final int KM_ORIGIN_SOFTWARE = 1; + public static final int KM_ORIGIN_GENERATED = 0; public static final int KM_ORIGIN_IMPORTED = 2; + public static final int KM_ORIGIN_UNKNOWN = 3; // Key usability requirements. public static final int KM_BLOB_STANDALONE = 0; 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); } |