Loading core/java/android/security/ConfirmationPrompt.java +0 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,6 @@ public class ConfirmationPrompt { private Executor mExecutor; private Context mContext; private final KeyStore mKeyStore = KeyStore.getInstance(); private AndroidProtectedConfirmation mProtectedConfirmation; private AndroidProtectedConfirmation getService() { Loading core/java/android/security/keystore/recovery/RecoveryController.java +2 −5 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.content.Context; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceSpecificException; import android.security.KeyStore; import android.security.KeyStore2; import android.security.keystore.KeyPermanentlyInvalidatedException; import android.security.keystore2.AndroidKeyStoreProvider; Loading Loading @@ -272,11 +271,9 @@ public class RecoveryController { public static final int ERROR_KEY_NOT_FOUND = 30; private final ILockSettings mBinder; private final KeyStore mKeyStore; private RecoveryController(ILockSettings binder, KeyStore keystore) { private RecoveryController(ILockSettings binder) { mBinder = binder; mKeyStore = keystore; } /** Loading @@ -296,7 +293,7 @@ public class RecoveryController { // lockSettings may be null. ILockSettings lockSettings = ILockSettings.Stub.asInterface(ServiceManager.getService("lock_settings")); return new RecoveryController(lockSettings, KeyStore.getInstance()); return new RecoveryController(lockSettings); } /** Loading keystore/java/android/security/keystore/AndroidKeyStoreProvider.java +11 −11 Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ package android.security.keystore; import android.annotation.NonNull; import android.annotation.SystemApi; import android.compat.annotation.UnsupportedAppUsage; import android.security.KeyStore; import java.io.IOException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; Loading @@ -47,13 +47,13 @@ public class AndroidKeyStoreProvider extends Provider { } /** * Gets the {@link KeyStore} operation handle corresponding to the provided JCA crypto * Gets the Android KeyStore operation handle corresponding to the provided JCA crypto * primitive. * * <p>The following primitives are supported: {@link Cipher} and {@link Mac}. * * @return KeyStore operation handle or {@code 0} if the provided primitive's KeyStore operation * is not in progress. * @return Android KeyStore operation handle or {@code 0} if the provided primitive's Android * KeyStore operation is not in progress. * * @throws IllegalArgumentException if the provided primitive is not supported or is not backed * by AndroidKeyStore provider. Loading @@ -67,10 +67,10 @@ public class AndroidKeyStoreProvider extends Provider { } /** * Returns an {@code AndroidKeyStore} {@link java.security.KeyStore}} of the specified UID. * The {@code KeyStore} contains keys and certificates owned by that UID. Such cross-UID * access is permitted to a few system UIDs and only to a few other UIDs (e.g., Wi-Fi, VPN) * all of which are system. * Returns an {@code AndroidKeyStore} {@link KeyStore} of the specified UID. The {@code * KeyStore} contains keys and certificates owned by that UID. Such cross-UID access is * permitted to a few system UIDs and only to a few other UIDs (e.g., Wi-Fi, VPN) all of which * are system. * * <p>Note: the returned {@code KeyStore} is already initialized/loaded. Thus, there is * no need to invoke {@code load} on it. Loading @@ -84,12 +84,12 @@ public class AndroidKeyStoreProvider extends Provider { */ @SystemApi @NonNull public static java.security.KeyStore getKeyStoreForUid(int uid) public static KeyStore getKeyStoreForUid(int uid) throws KeyStoreException, NoSuchProviderException { final java.security.KeyStore.LoadStoreParameter loadParameter = final KeyStore.LoadStoreParameter loadParameter = new android.security.keystore2.AndroidKeyStoreLoadStoreParameter( KeyProperties.legacyUidToNamespace(uid)); java.security.KeyStore result = java.security.KeyStore.getInstance(PROVIDER_NAME); KeyStore result = KeyStore.getInstance(PROVIDER_NAME); try { result.load(loadParameter); } catch (NoSuchAlgorithmException | CertificateException | IOException e) { Loading keystore/java/android/security/keystore/KeyGenParameterSpec.java +1 −1 Original line number Diff line number Diff line Loading @@ -910,7 +910,7 @@ public final class KeyGenParameterSpec implements AlgorithmParameterSpec, UserAu /** * Returns whether this key is critical to the device encryption flow. * * @see android.security.KeyStore#FLAG_CRITICAL_TO_DEVICE_ENCRYPTION * @see Builder#setCriticalToDeviceEncryption(boolean) * @hide */ public boolean isCriticalToDeviceEncryption() { Loading keystore/java/android/security/keystore/KeyProtection.java +4 −3 Original line number Diff line number Diff line Loading @@ -569,7 +569,7 @@ public final class KeyProtection implements ProtectionParameter, UserAuthArgs { /** * Return whether this key is critical to the device encryption flow. * * @see android.security.KeyStore#FLAG_CRITICAL_TO_DEVICE_ENCRYPTION * @see Builder#setCriticalToDeviceEncryption(boolean) * @hide */ public boolean isCriticalToDeviceEncryption() { Loading Loading @@ -1105,9 +1105,10 @@ public final class KeyProtection implements ProtectionParameter, UserAuthArgs { * Set whether this key is critical to the device encryption flow * * This is a special flag only available to system servers to indicate the current key * is part of the device encryption flow. * is part of the device encryption flow. Setting this flag causes the key to not * be cryptographically bound to the LSKF even if the key is otherwise authentication * bound. * * @see android.security.KeyStore#FLAG_CRITICAL_TO_DEVICE_ENCRYPTION * @hide */ public Builder setCriticalToDeviceEncryption(boolean critical) { Loading Loading
core/java/android/security/ConfirmationPrompt.java +0 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,6 @@ public class ConfirmationPrompt { private Executor mExecutor; private Context mContext; private final KeyStore mKeyStore = KeyStore.getInstance(); private AndroidProtectedConfirmation mProtectedConfirmation; private AndroidProtectedConfirmation getService() { Loading
core/java/android/security/keystore/recovery/RecoveryController.java +2 −5 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.content.Context; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceSpecificException; import android.security.KeyStore; import android.security.KeyStore2; import android.security.keystore.KeyPermanentlyInvalidatedException; import android.security.keystore2.AndroidKeyStoreProvider; Loading Loading @@ -272,11 +271,9 @@ public class RecoveryController { public static final int ERROR_KEY_NOT_FOUND = 30; private final ILockSettings mBinder; private final KeyStore mKeyStore; private RecoveryController(ILockSettings binder, KeyStore keystore) { private RecoveryController(ILockSettings binder) { mBinder = binder; mKeyStore = keystore; } /** Loading @@ -296,7 +293,7 @@ public class RecoveryController { // lockSettings may be null. ILockSettings lockSettings = ILockSettings.Stub.asInterface(ServiceManager.getService("lock_settings")); return new RecoveryController(lockSettings, KeyStore.getInstance()); return new RecoveryController(lockSettings); } /** Loading
keystore/java/android/security/keystore/AndroidKeyStoreProvider.java +11 −11 Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ package android.security.keystore; import android.annotation.NonNull; import android.annotation.SystemApi; import android.compat.annotation.UnsupportedAppUsage; import android.security.KeyStore; import java.io.IOException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; Loading @@ -47,13 +47,13 @@ public class AndroidKeyStoreProvider extends Provider { } /** * Gets the {@link KeyStore} operation handle corresponding to the provided JCA crypto * Gets the Android KeyStore operation handle corresponding to the provided JCA crypto * primitive. * * <p>The following primitives are supported: {@link Cipher} and {@link Mac}. * * @return KeyStore operation handle or {@code 0} if the provided primitive's KeyStore operation * is not in progress. * @return Android KeyStore operation handle or {@code 0} if the provided primitive's Android * KeyStore operation is not in progress. * * @throws IllegalArgumentException if the provided primitive is not supported or is not backed * by AndroidKeyStore provider. Loading @@ -67,10 +67,10 @@ public class AndroidKeyStoreProvider extends Provider { } /** * Returns an {@code AndroidKeyStore} {@link java.security.KeyStore}} of the specified UID. * The {@code KeyStore} contains keys and certificates owned by that UID. Such cross-UID * access is permitted to a few system UIDs and only to a few other UIDs (e.g., Wi-Fi, VPN) * all of which are system. * Returns an {@code AndroidKeyStore} {@link KeyStore} of the specified UID. The {@code * KeyStore} contains keys and certificates owned by that UID. Such cross-UID access is * permitted to a few system UIDs and only to a few other UIDs (e.g., Wi-Fi, VPN) all of which * are system. * * <p>Note: the returned {@code KeyStore} is already initialized/loaded. Thus, there is * no need to invoke {@code load} on it. Loading @@ -84,12 +84,12 @@ public class AndroidKeyStoreProvider extends Provider { */ @SystemApi @NonNull public static java.security.KeyStore getKeyStoreForUid(int uid) public static KeyStore getKeyStoreForUid(int uid) throws KeyStoreException, NoSuchProviderException { final java.security.KeyStore.LoadStoreParameter loadParameter = final KeyStore.LoadStoreParameter loadParameter = new android.security.keystore2.AndroidKeyStoreLoadStoreParameter( KeyProperties.legacyUidToNamespace(uid)); java.security.KeyStore result = java.security.KeyStore.getInstance(PROVIDER_NAME); KeyStore result = KeyStore.getInstance(PROVIDER_NAME); try { result.load(loadParameter); } catch (NoSuchAlgorithmException | CertificateException | IOException e) { Loading
keystore/java/android/security/keystore/KeyGenParameterSpec.java +1 −1 Original line number Diff line number Diff line Loading @@ -910,7 +910,7 @@ public final class KeyGenParameterSpec implements AlgorithmParameterSpec, UserAu /** * Returns whether this key is critical to the device encryption flow. * * @see android.security.KeyStore#FLAG_CRITICAL_TO_DEVICE_ENCRYPTION * @see Builder#setCriticalToDeviceEncryption(boolean) * @hide */ public boolean isCriticalToDeviceEncryption() { Loading
keystore/java/android/security/keystore/KeyProtection.java +4 −3 Original line number Diff line number Diff line Loading @@ -569,7 +569,7 @@ public final class KeyProtection implements ProtectionParameter, UserAuthArgs { /** * Return whether this key is critical to the device encryption flow. * * @see android.security.KeyStore#FLAG_CRITICAL_TO_DEVICE_ENCRYPTION * @see Builder#setCriticalToDeviceEncryption(boolean) * @hide */ public boolean isCriticalToDeviceEncryption() { Loading Loading @@ -1105,9 +1105,10 @@ public final class KeyProtection implements ProtectionParameter, UserAuthArgs { * Set whether this key is critical to the device encryption flow * * This is a special flag only available to system servers to indicate the current key * is part of the device encryption flow. * is part of the device encryption flow. Setting this flag causes the key to not * be cryptographically bound to the LSKF even if the key is otherwise authentication * bound. * * @see android.security.KeyStore#FLAG_CRITICAL_TO_DEVICE_ENCRYPTION * @hide */ public Builder setCriticalToDeviceEncryption(boolean critical) { Loading