Generating StrongBox backed keys
•Add FLAG_STRONGBOX when the generator spec requires it. •Throw StrongBoxUnavailableException when the request fails due to HARDWARE_UNAVAILABLE. •Add PackageManager.FEATURE_STRONGBOX_KEYSTORE Test: KeyStore CTS tests under development on an emulator Bug: 63931634 Change-Id: I42d32b22981e43e504d30e5657d21ac555c71ebe
This commit is contained in:
@@ -38,6 +38,7 @@ import android.security.keymaster.OperationResult;
|
||||
import android.security.keystore.KeyExpiredException;
|
||||
import android.security.keystore.KeyNotYetValidException;
|
||||
import android.security.keystore.KeyPermanentlyInvalidatedException;
|
||||
import android.security.keystore.StrongBoxUnavailableException;
|
||||
import android.security.keystore.UserNotAuthenticatedException;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -65,6 +66,7 @@ public class KeyStore {
|
||||
public static final int VALUE_CORRUPTED = 8;
|
||||
public static final int UNDEFINED_ACTION = 9;
|
||||
public static final int WRONG_PASSWORD = 10;
|
||||
public static final int HARDWARE_TYPE_UNAVAILABLE = -68;
|
||||
|
||||
/**
|
||||
* Per operation authentication is needed before this operation is valid.
|
||||
@@ -123,7 +125,6 @@ public class KeyStore {
|
||||
*/
|
||||
public static final int FLAG_STRONGBOX = 1 << 4;
|
||||
|
||||
|
||||
// States
|
||||
public enum State { UNLOCKED, LOCKED, UNINITIALIZED };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user