From c5bdd77f1abbac6d6d0cf770312a9a3a816769b9 Mon Sep 17 00:00:00 2001 From: Janis Danisevskis Date: Mon, 19 Oct 2020 14:12:14 -0700 Subject: Keystore 2.0 SPI: Update KeyInfo and KeyGenParameterSpec This patch adds set/getSecurityLevel to KeyInfo and KeyGenParameterSpec and it deprecates the superseded function isInSecureHardware. It also deprecates the system API set/getUid and replaces it with the more generic set/getNamespace. Test: None Change-Id: Id2f54596510954862b5077a935f3daf07211f29c --- api/current.txt | 3 ++- api/system-current.txt | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/current.txt b/api/current.txt index 560b5f6c5cb0..a584f40be966 100644 --- a/api/current.txt +++ b/api/current.txt @@ -42808,10 +42808,11 @@ package android.security.keystore { method public String getKeystoreAlias(); method public int getOrigin(); method public int getPurposes(); + method public int getSecurityLevel(); method @NonNull public String[] getSignaturePaddings(); method public int getUserAuthenticationType(); method public int getUserAuthenticationValidityDurationSeconds(); - method public boolean isInsideSecureHardware(); + method @Deprecated public boolean isInsideSecureHardware(); method public boolean isInvalidatedByBiometricEnrollment(); method public boolean isTrustedUserPresenceRequired(); method public boolean isUserAuthenticationRequired(); diff --git a/api/system-current.txt b/api/system-current.txt index 85d7930cf43c..cb94dae02054 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -9374,8 +9374,13 @@ package android.security.keystore { ctor public DeviceIdAttestationException(@Nullable String, @Nullable Throwable); } + public final class KeyGenParameterSpec implements java.security.spec.AlgorithmParameterSpec { + method public int getNamespace(); + } + public static final class KeyGenParameterSpec.Builder { - method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setUid(int); + method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setNamespace(int); + method @Deprecated @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setUid(int); } } -- cgit v1.2.3