pub enum MdocError {
Show 22 variants
MobileSecurityObject,
IssuerAuth,
Signing,
JwkToCoseKey(String),
CoseKeyToJwk(String),
DeviceResponseParse(String),
EmptyDeviceResponse,
InvalidSignature,
MissingSigningAlgorithm,
MissingSignatureVerifier(SigningAlgorithm),
InvalidPublicKey,
InvalidDocType(DocType, DocType),
DocumentNotYetValid(i64),
DocumentExpired(i64),
MissingDigestNamespace(NameSpace),
MissingOrInvalidDigest(NameSpace, DigestID),
DeviceAuthentication,
DeviceMac,
X5Chain,
IssuerSignedParse,
InvalidTime(u64),
InvalidDeviceSigner(String),
}
Expand description
Error type used across the crate API.
Variants§
MobileSecurityObject
Error used by
MobileSecurityObject
API.
IssuerAuth
Error used by issuer_auth
API.
Signing
Error when we fail to create a
DeviceSignature
.
JwkToCoseKey(String)
Error when we fail to decode a JWK.
CoseKeyToJwk(String)
Error when we fail to encode a JWK.
DeviceResponseParse(String)
Error when we fail to parse a
DeviceResponse
.
EmptyDeviceResponse
Error when verifying mDoc
Credential if we get an an empty
DeviceResponse
.
InvalidSignature
Error when we detect a signature isn’t valid.
MissingSigningAlgorithm
Error when the underlying data model is missing a signing algorithm or if we don’t support it.
MissingSignatureVerifier(SigningAlgorithm)
Error when we are missing an appropriate signature verification implementation.
InvalidPublicKey
Error if we don’t have a valid public key in
IssuerAuth
.
InvalidDocType(DocType, DocType)
Error when we encounter an unexpected doc_type
.
DocumentNotYetValid(i64)
Error when the document isn’t valid yet, but will be at a later time.
DocumentExpired(i64)
Error when the document has expired.
MissingDigestNamespace(NameSpace)
Error when we are missing a digest for a namespace of a
MobileSecurityObject
.
MissingOrInvalidDigest(NameSpace, DigestID)
Error when we encounter an invalid digest for a namespace of a
MobileSecurityObject
.
DeviceAuthentication
Error when we fail to serialize
DeviceAuthentication
.
DeviceMac
Error indicating we currently do not support
DeviceMac
.
X5Chain
Error when we expect an x5chain
but it is missing or invalid.
IssuerSignedParse
Error when we fail to parse an issued mDoc
Credential.
InvalidTime(u64)
Error when we try to construct DateTime
from an invalid
timestamp.
InvalidDeviceSigner(String)
The provided Device Signer
is invalid.