Udostępnij za pośrednictwem


KeyStoreException Class

Definition

Exception containing information about the failure at the Keystore / KeyMint layer while generating or using a key.

[Android.Runtime.Register("android/security/KeyStoreException", ApiSince=33, DoNotGenerateAcw=true)]
public class KeyStoreException : Java.Lang.Exception
[<Android.Runtime.Register("android/security/KeyStoreException", ApiSince=33, DoNotGenerateAcw=true)>]
type KeyStoreException = class
    inherit Exception
Inheritance
KeyStoreException
Attributes

Remarks

Exception containing information about the failure at the Keystore / KeyMint layer while generating or using a key.

The public error codes indicate the cause of the error and the methods indicate whether it's a system/key issue and whether re-trying the operation (with the same key or a new key) is likely to succeed.

Java documentation for android.security.KeyStoreException.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

KeyStoreException(IntPtr, JniHandleOwnership)

Fields

ErrorAttestationChallengeTooLarge
Obsolete.

The attestation challenge specified is too large.

ErrorAttestationKeysUnavailable
Obsolete.

There are no keys available for attestation.

ErrorIdAttestationFailure
Obsolete.

The error related to inclusion of device identifiers in the attestation record.

ErrorIncorrectUsage
Obsolete.

The feature the caller is trying to use is not compatible with the parameters used to generate the key.

ErrorInternalSystemError
Obsolete.

An internal system error - refer to #isTransientFailure() to determine whether re-trying the operation is likely to yield different results.

ErrorKeyCorrupted
Obsolete.

The key is corrupted and could not be recovered.

ErrorKeyDoesNotExist
Obsolete.

The key the operation refers to doesn't exist.

ErrorKeymintFailure
Obsolete.

General error in the KeyMint layer.

ErrorKeyNotTemporallyValid
Obsolete.

The key is not currently valid: Either at has expired or it will be valid for use in the future.

ErrorKeyOperationExpired
Obsolete.

The crypto object the caller has been using held a reference to a KeyMint operation that has been evacuated (likely due to other concurrent operations taking place).

ErrorKeystoreFailure
Obsolete.

Failure in the Keystore layer.

ErrorKeystoreUninitialized
Obsolete.

Indicating that load() has not been called on the Keystore instance, or an attempt has been made to generate an authorization bound key while the user has not set a lock screen knowledge factor (LSKF).

ErrorOther
Obsolete.

This error code is for mapping errors that the caller will not know about.

ErrorPermissionDenied
Obsolete.

The caller has requested key parameters or operation which are only available to system or privileged apps.

ErrorUnimplemented
Obsolete.

The feature the caller is trying to use is not implemented by the underlying KeyMint implementation.

ErrorUserAuthenticationRequired
Obsolete.

Indicating the key could not be used because the user needs to authenticate first.

is_generated (Inherited from Throwable)
RetryAfterNextReboot
Obsolete.

Re-try the operation that led to this error when the device has a software update downloaded and on the next reboot.

RetryNever
Obsolete.

Never re-try the operation that led to this error, since it's a permanent error.

RetryWhenConnectivityAvailable
Obsolete.

Re-try the operation that led to this error when the device regains connectivity.

RetryWithExponentialBackoff
Obsolete.

Re-try the operation that led to this error with an exponential back-off delay.

Properties

Cause

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

(Inherited from Throwable)
Class (Inherited from Throwable)
Handle

The handle to the underlying Android instance.

(Inherited from Throwable)
IsSystemError

Indicates whether the error related to the Keystore/KeyMint implementation and not a specific key.

IsTransientFailure

Returns true if the failure is a transient failure - that is, performing the same operation again at a late time is likely to succeed.

JniIdentityHashCode (Inherited from Throwable)
JniPeerMembers
LocalizedMessage

Creates a localized description of this throwable.

(Inherited from Throwable)
Message

Returns the detail message string of this throwable.

(Inherited from Throwable)
NumericErrorCode

Returns one of the error codes exported by the class.

PeerReference (Inherited from Throwable)
RetryPolicy

Returns the re-try policy for transient failures.

StackTrace (Inherited from Throwable)
ThresholdClass
ThresholdType

Methods

AddSuppressed(Throwable)

Appends the specified exception to the exceptions that were suppressed in order to deliver this exception.

(Inherited from Throwable)
Dispose() (Inherited from Throwable)
Dispose(Boolean) (Inherited from Throwable)
FillInStackTrace()

Fills in the execution stack trace.

(Inherited from Throwable)
GetStackTrace()

Provides programmatic access to the stack trace information printed by #printStackTrace().

(Inherited from Throwable)
GetSuppressed()

Returns an array containing all of the exceptions that were suppressed, typically by the try-with-resources statement, in order to deliver this exception.

(Inherited from Throwable)
InitCause(Throwable)

Initializes the cause of this throwable to the specified value.

(Inherited from Throwable)
PrintStackTrace()

Prints this throwable and its backtrace to the standard error stream.

(Inherited from Throwable)
PrintStackTrace(PrintStream)

Prints this throwable and its backtrace to the specified print stream.

(Inherited from Throwable)
PrintStackTrace(PrintWriter)

Prints this throwable and its backtrace to the specified print writer.

(Inherited from Throwable)
RequiresUserAuthentication()

Indicates whether the failure is due to the device being locked.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Throwable)
SetStackTrace(StackTraceElement[])

Sets the stack trace elements that will be returned by #getStackTrace() and printed by #printStackTrace() and related methods.

(Inherited from Throwable)
ToString() (Inherited from Throwable)
UnregisterFromRuntime() (Inherited from Throwable)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Throwable)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Throwable)
IJavaPeerable.Finalized() (Inherited from Throwable)
IJavaPeerable.JniManagedPeerState (Inherited from Throwable)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Throwable)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Throwable)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Throwable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to