pub enum Error {
Show 20 variants
Success,
DoesAlreadyExist,
DoesNotExist,
KeyStoreFull,
OutOfMemory,
Timeout,
Other,
InitializationFailed,
InvalidCallbackResult,
CborCommandFailed(i32),
InvalidClientDataHash,
NoCredentials,
PinAuthRequired,
UnauthorizedPermission,
InvalidRpIdHash,
PinTokenExpired,
InvalidSubcommand,
CtapError(u8),
IoError(String),
InvalidPinLength,
}Expand description
Error type for CTAP operations
Variants§
Success
The given operation was successful
DoesAlreadyExist
The given value already exists
DoesNotExist
The requested value doesn’t exist
KeyStoreFull
Credentials can’t be inserted into the key-store
OutOfMemory
The client ran out of memory
Timeout
The operation timed out
Other
Unspecified operation
InitializationFailed
Initialization failed
InvalidCallbackResult
Invalid callback result
CborCommandFailed(i32)
CBOR command failed
InvalidClientDataHash
Invalid client data hash (must be 32 bytes)
NoCredentials
No credentials exist for the requested operation
Returned when:
- Attempting to enumerate credentials for an RP with no credentials
- Attempting to delete a non-existent credential
PinAuthRequired
PIN/UV authentication required but not provided
PIN/UV auth token has insufficient permissions
The token may not have the required permission bit set, or may have the wrong permissions RP ID.
InvalidRpIdHash
Invalid RP ID hash
RP ID hash must be exactly 32 bytes (SHA-256 output).
PinTokenExpired
PIN/UV auth token has expired
InvalidSubcommand
Invalid subcommand for credential management
CtapError(u8)
CTAP error with status code
IoError(String)
IO error (from transport operations)
InvalidPinLength
Invalid PIN length (must be 4-63 characters)
Implementations§
Source§impl Error
impl Error
Sourcepub fn parse_ctap_response(data: &[u8]) -> Result<&[u8]>
pub fn parse_ctap_response(data: &[u8]) -> Result<&[u8]>
Parse CTAP response and extract CBOR data
CTAP responses follow the format: [status_byte, ...cbor_data]
0x00= success, returns the CBOR data!0x00= error, converts status byte to Error
This is the single source of truth for CTAP status code handling.
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.