pub enum VerificationError {
NoSignaturesField,
MissingIssuerField,
MissingSignatureField,
RecordSerializationFailed {
error: EncodeError,
},
SignatureVerificationFailed {
error: Error,
},
NoValidSignatureForIssuer {
issuer: String,
},
InvalidSignatureObjectType,
SignatureObjectMissingField {
field: String,
},
KeyOperationFailed {
error: KeyError,
},
SignatureDecodingFailed {
error: DecodeError,
},
CryptographicValidationFailed {
error: KeyError,
},
}Expand description
Errors that can occur during record signature creation and verification.
This enum covers all failure modes in the signature lifecycle, from creating signatures with missing metadata fields to verifying signatures with invalid cryptographic proofs or serialization failures.
Variants§
NoSignaturesField
Error when no signatures field is found in the record.
This error occurs when a record does not contain either a “signatures” or “sigs” field, which is required for signature verification.
MissingIssuerField
Error when issuer field is missing from a signature object.
This error occurs when a signature object in the signatures array does not contain the required “issuer” field.
MissingSignatureField
Error when signature field is missing from a signature object.
This error occurs when a signature object in the signatures array does not contain the required “signature” field.
RecordSerializationFailed
Error when record serialization fails.
This error occurs when the signed record cannot be serialized to IPLD CBOR format for signature verification.
Fields
error: EncodeErrorThe underlying serialization error
SignatureVerificationFailed
Error when signature verification fails.
This error occurs when the cryptographic verification of the signature against the signed record fails, indicating the signature is invalid for the given data and public key.
NoValidSignatureForIssuer
Error when no valid signature is found for the specified issuer.
This error occurs when none of the signatures in the record belong to the specified issuer, or when all signatures from the issuer fail verification.
InvalidSignatureObjectType
Error when signature object is not a valid JSON object.
This error occurs when the provided signature object parameter is not a JSON object type, which is required for signature creation.
SignatureObjectMissingField
Error when signature object is missing required fields.
This error occurs when the signature object is missing fields that are necessary during signature creation, such as ‘issuer’.
KeyOperationFailed
Error when cryptographic key operations fail.
This error occurs when key-related operations such as signing or key parsing fail during signature creation or verification.
SignatureDecodingFailed
Error when signature decoding fails.
This error occurs when the multibase-encoded signature cannot be decoded, typically due to invalid encoding format.
Fields
error: DecodeErrorThe underlying multibase decoding error
CryptographicValidationFailed
Error when cryptographic signature validation fails.
This error occurs when the cryptographic validation of the signature fails, indicating either an invalid signature or mismatched key/data.
Trait Implementations§
Source§impl Debug for VerificationError
impl Debug for VerificationError
Source§impl Display for VerificationError
impl Display for VerificationError
Source§impl Error for VerificationError
impl Error for VerificationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<EncodeError> for VerificationError
impl From<EncodeError> for VerificationError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Auto Trait Implementations§
impl Freeze for VerificationError
impl !RefUnwindSafe for VerificationError
impl Send for VerificationError
impl Sync for VerificationError
impl Unpin for VerificationError
impl UnsafeUnpin for VerificationError
impl !UnwindSafe for VerificationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.