From 66925ecc64e909a1ec2b650d10a4e8647f9c5f14 Mon Sep 17 00:00:00 2001 From: Frank Salim Date: Wed, 25 Jan 2017 22:22:41 +0000 Subject: [PATCH] Revert "Add new key purpose Wrap Key to KeyProperties.java and" This reverts commit eb30e64f3fac192404a6ae3c162a0770201a7dc2. Reason for revert: Remove partial support for wrapped key import Test: CTS tested Change-Id: I8008494860534257fa983e1a5169d0ed034621f7 --- api/current.txt | 1 - api/system-current.txt | 1 - api/test-current.txt | 1 - .../android/security/keymaster/KeymasterDefs.java | 2 -- .../java/android/security/keystore/KeyProperties.java | 11 ----------- 5 files changed, 16 deletions(-) diff --git a/api/current.txt b/api/current.txt index a47cb761e4a7c..e3a88d08eac4f 100644 --- a/api/current.txt +++ b/api/current.txt @@ -36415,7 +36415,6 @@ package android.security.keystore { field public static final int PURPOSE_ENCRYPT = 1; // 0x1 field public static final int PURPOSE_SIGN = 4; // 0x4 field public static final int PURPOSE_VERIFY = 8; // 0x8 - field public static final int PURPOSE_WRAP_KEY = 16; // 0x10 field public static final java.lang.String SIGNATURE_PADDING_RSA_PKCS1 = "PKCS1"; field public static final java.lang.String SIGNATURE_PADDING_RSA_PSS = "PSS"; } diff --git a/api/system-current.txt b/api/system-current.txt index e6fb17d65e914..cb34643820388 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -39338,7 +39338,6 @@ package android.security.keystore { field public static final int PURPOSE_ENCRYPT = 1; // 0x1 field public static final int PURPOSE_SIGN = 4; // 0x4 field public static final int PURPOSE_VERIFY = 8; // 0x8 - field public static final int PURPOSE_WRAP_KEY = 16; // 0x10 field public static final java.lang.String SIGNATURE_PADDING_RSA_PKCS1 = "PKCS1"; field public static final java.lang.String SIGNATURE_PADDING_RSA_PSS = "PSS"; } diff --git a/api/test-current.txt b/api/test-current.txt index 904aa40d07f0c..cecf97678b29a 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -36554,7 +36554,6 @@ package android.security.keystore { field public static final int PURPOSE_ENCRYPT = 1; // 0x1 field public static final int PURPOSE_SIGN = 4; // 0x4 field public static final int PURPOSE_VERIFY = 8; // 0x8 - field public static final int PURPOSE_WRAP_KEY = 16; // 0x10 field public static final java.lang.String SIGNATURE_PADDING_RSA_PKCS1 = "PKCS1"; field public static final java.lang.String SIGNATURE_PADDING_RSA_PSS = "PSS"; } diff --git a/core/java/android/security/keymaster/KeymasterDefs.java b/core/java/android/security/keymaster/KeymasterDefs.java index 5461e6b6d699b..ad8ad69cb2b88 100644 --- a/core/java/android/security/keymaster/KeymasterDefs.java +++ b/core/java/android/security/keymaster/KeymasterDefs.java @@ -138,8 +138,6 @@ public final class KeymasterDefs { public static final int KM_PURPOSE_DECRYPT = 1; public static final int KM_PURPOSE_SIGN = 2; public static final int KM_PURPOSE_VERIFY = 3; - public static final int KM_PURPOSE_DERIVE_KEY = 4; - public static final int KM_PURPOSE_WRAP_KEY = 5; // Key formats. public static final int KM_KEY_FORMAT_X509 = 0; diff --git a/keystore/java/android/security/keystore/KeyProperties.java b/keystore/java/android/security/keystore/KeyProperties.java index bf7a779ace08a..d6b1cf1da8a2f 100644 --- a/keystore/java/android/security/keystore/KeyProperties.java +++ b/keystore/java/android/security/keystore/KeyProperties.java @@ -45,7 +45,6 @@ public abstract class KeyProperties { PURPOSE_DECRYPT, PURPOSE_SIGN, PURPOSE_VERIFY, - PURPOSE_WRAP_KEY, }) public @interface PurposeEnum {} @@ -69,12 +68,6 @@ public abstract class KeyProperties { */ public static final int PURPOSE_VERIFY = 1 << 3; - /** - * Purpose of key: wrapping key for secure key import. - */ - public static final int PURPOSE_WRAP_KEY = 1 << 4; - - /** * @hide */ @@ -91,8 +84,6 @@ public abstract class KeyProperties { return KeymasterDefs.KM_PURPOSE_SIGN; case PURPOSE_VERIFY: return KeymasterDefs.KM_PURPOSE_VERIFY; - case PURPOSE_WRAP_KEY: - return KeymasterDefs.KM_PURPOSE_WRAP_KEY; default: throw new IllegalArgumentException("Unknown purpose: " + purpose); } @@ -108,8 +99,6 @@ public abstract class KeyProperties { return PURPOSE_SIGN; case KeymasterDefs.KM_PURPOSE_VERIFY: return PURPOSE_VERIFY; - case KeymasterDefs.KM_PURPOSE_WRAP_KEY: - return PURPOSE_WRAP_KEY; default: throw new IllegalArgumentException("Unknown purpose: " + purpose); }