pub enum SignatureError {
UnsupportedAlgorithm,
InvalidKeyId(Error),
MissingSigningKey,
UserIdMismatch,
NotAnObject,
NoSignatureFound,
VerificationError(SignatureError),
InvalidKey(KeyError),
InvalidSignature,
SigningKeyChanged(Option<Box<Ed25519PublicKey>>, Option<Box<Ed25519PublicKey>>),
JsonError(CanonicalJsonError),
StoreError(CryptoStoreError),
}
Expand description
Error type describing different errors that happen when we check or create signatures for a Matrix JSON object.
Variants§
UnsupportedAlgorithm
The signature was made using an unsupported algorithm.
InvalidKeyId(Error)
The ID of the signing key isn’t a valid key ID.
MissingSigningKey
The signing key that should create or check a signature is missing.
UserIdMismatch
The user id of signing key differs from the user id that provided the signature.
NotAnObject
The provided JSON value that was signed and the signature should be checked isn’t a valid JSON object.
NoSignatureFound
The provided JSON value that was signed and the signature should be checked isn’t a valid JSON object.
VerificationError(SignatureError)
The signature couldn’t be verified.
InvalidKey(KeyError)
The public key isn’t a valid ed25519 key.
InvalidSignature
The signature could not be decoded.
SigningKeyChanged(Option<Box<Ed25519PublicKey>>, Option<Box<Ed25519PublicKey>>)
The signing key that used to sign the object has been changed.
JsonError(CanonicalJsonError)
The signed object couldn’t be deserialized.
StoreError(CryptoStoreError)
The store ran into an error.
Trait Implementations§
Source§impl Debug for SignatureError
impl Debug for SignatureError
Source§impl Display for SignatureError
impl Display for SignatureError
Source§impl Error for SignatureError
impl Error for SignatureError
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
Source§impl From<CanonicalJsonError> for SignatureError
impl From<CanonicalJsonError> for SignatureError
Source§fn from(source: CanonicalJsonError) -> SignatureError
fn from(source: CanonicalJsonError) -> SignatureError
Source§impl From<CryptoStoreError> for SignatureError
impl From<CryptoStoreError> for SignatureError
Source§fn from(source: CryptoStoreError) -> SignatureError
fn from(source: CryptoStoreError) -> SignatureError
Source§impl From<Error> for SignatureError
impl From<Error> for SignatureError
Source§fn from(e: Error) -> SignatureError
fn from(e: Error) -> SignatureError
Source§impl From<Error> for SignatureError
impl From<Error> for SignatureError
Source§fn from(source: Error) -> SignatureError
fn from(source: Error) -> SignatureError
Source§impl From<KeyError> for SignatureError
impl From<KeyError> for SignatureError
Source§fn from(source: KeyError) -> SignatureError
fn from(source: KeyError) -> SignatureError
Source§impl From<SignatureError> for DehydrationError
impl From<SignatureError> for DehydrationError
Source§fn from(source: SignatureError) -> DehydrationError
fn from(source: SignatureError) -> DehydrationError
Source§impl From<SignatureError> for ManualVerifyError
impl From<SignatureError> for ManualVerifyError
Source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
Source§impl From<SignatureError> for SessionCreationError
impl From<SignatureError> for SessionCreationError
Source§fn from(source: SignatureError) -> SessionCreationError
fn from(source: SignatureError) -> SessionCreationError
Source§impl From<SignatureError> for SignatureError
impl From<SignatureError> for SignatureError
Source§fn from(source: SignatureError) -> SignatureError
fn from(source: SignatureError) -> SignatureError
Auto Trait Implementations§
impl Freeze for SignatureError
impl !RefUnwindSafe for SignatureError
impl Send for SignatureError
impl Sync for SignatureError
impl Unpin for SignatureError
impl !UnwindSafe for SignatureError
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more