pub enum SessionCreationError {
MissingOneTimeKey(Curve25519PublicKey),
MismatchedIdentityKey(Curve25519PublicKey, Curve25519PublicKey),
MismatchedSessionConfig {
expected: SessionConfig,
got: Option<SessionConfig>,
},
Decryption(DecryptionError),
NonContributoryKey,
}Expand description
Error describing failure modes when creating a Olm Session from an
incoming Olm message.
Variants§
MissingOneTimeKey(Curve25519PublicKey)
The pre-key message contained an unknown one-time key. This happens either because we never had such a one-time key, or because it has already been used up.
MismatchedIdentityKey(Curve25519PublicKey, Curve25519PublicKey)
The pre-key message contains a Curve25519 identity key that doesn’t match to the identity key that was given.
MismatchedSessionConfig
The pre-key message was encrypted with a Session which used an unexpected SessionConfig.
Fields
expected: SessionConfigThe SessionConfig we expected.
got: Option<SessionConfig>The SessionConfig the pre-key message was encrypted with.
Will be None if we don’t understand the received config.
Decryption(DecryptionError)
The pre-key message that was used to establish the Session couldn’t
be decrypted. The message needs to be decryptable, otherwise we will
have created a Session that wasn’t used to encrypt the pre-key
message.
NonContributoryKey
One or more keys lacked contributory behavior in the Diffie-Hellman operation, resulting in an insecure shared secret.
For more details on contributory behavior please refer to the
x25519_dalek::SharedSecret::was_contributory() method.
Trait Implementations§
Source§impl Debug for SessionCreationError
impl Debug for SessionCreationError
Source§impl Display for SessionCreationError
impl Display for SessionCreationError
Source§impl Error for SessionCreationError
impl Error for SessionCreationError
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()