Add exception types for AndroidKeyStore key validity issues.
Bug: 18088752 Change-Id: I7494cb6a793e2b57bb849a4253bba2803778c161
This commit is contained in:
@ -44,6 +44,10 @@ public abstract class KeymasterUtils {
|
||||
|
||||
public static CryptoOperationException getCryptoOperationException(KeymasterException e) {
|
||||
switch (e.getErrorCode()) {
|
||||
case KeymasterDefs.KM_ERROR_KEY_EXPIRED:
|
||||
return new KeyExpiredException();
|
||||
case KeymasterDefs.KM_ERROR_KEY_NOT_YET_VALID:
|
||||
return new KeyNotYetValidException();
|
||||
case KeymasterDefs.KM_ERROR_KEY_USER_NOT_AUTHENTICATED:
|
||||
return new UserNotAuthenticatedException();
|
||||
default:
|
||||
|
Reference in New Issue
Block a user