pub enum OTRError {
Show 15 variants
ProtocolViolation(&'static str),
IncompleteMessage,
UnreadableMessage(InstanceTag),
MessageForOtherInstance,
UnknownInstance(InstanceTag),
UnsupportedVersion(u16),
IncorrectState(&'static str),
CryptographicViolation(CryptoError),
PolicyRestriction(&'static str),
AuthenticationError(AKEError),
SMPInProgress,
SMPSuccess(Option<TLV>),
SMPFailed(Option<TLV>),
SMPAborted(bool),
UserError(&'static str),
}
Expand description
OTRError
is the enum containing the various errors that can occur.
Variants§
ProtocolViolation(&'static str)
Message contained invalid data according to the OTR protocol.
IncompleteMessage
Message payload is incomplete. The message cannot be reconstructed from the received bytes.
UnreadableMessage(InstanceTag)
Encrypted message is unreadable due to loss of keys and/or wrong protocol state.
MessageForOtherInstance
An OTR message was received that is intended for a different instance (client).
UnknownInstance(InstanceTag)
Message to be sent to an unknown instance.
UnsupportedVersion(u16)
Unsupported version encountered.
IncorrectState(&'static str)
Messaging is blocked in OTR protocol “Finished” state to ensure no accidental disclosure occurs.
CryptographicViolation(CryptoError)
Violation of cryptographic or mathematical requirement for correct/secure operation.
PolicyRestriction(&'static str)
PolicyRestriction
indicates an error caused by the active policy.
AuthenticationError(AKEError)
(AKE) AuthenticationError
indicates that there was an error during AKE.
SMPInProgress
SMPInProgress
indicates that an SMP exchange is in progress, so to initiate a new SMP,
the previous one needs to be aborted first.
SMPSuccess(Option<TLV>)
SMPSuccess
indicates successful finishing SMP without a follow-up TLV needing to be sent.
SMPFailed(Option<TLV>)
SMPFailed
indicates a unsuccessfully completed SMP.
SMPAborted(bool)
SMPAborted
indicates SMP process was aborted, most likely by user request. Provided TLV
can be sent to other party to signal SMP abort. The boolean value indicates whether the
abort-action needs to be communicated, that is: true to require sending abort-TLV, false if
no further action needed.
UserError(&'static str)
UserError
indicates a user error, with a description provided in the tuple.