1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![allow(clippy::module_name_repetitions)]
pub use opaque_ke::errors::{InternalError, ProtocolError};
use thiserror::Error;
pub type Result<T, E = Error> = std::result::Result<T, E>;
#[derive(Clone, Debug, Error, Eq, Hash, PartialEq)]
pub enum Error {
#[error("Internal Opaque error: {0}")]
Opaque(#[from] ProtocolError),
#[error("Servers identity unexpected")]
InvalidServer,
#[error("Integers used are out-of-range")]
MhfConfig,
#[error("Configuration doesn't match")]
Config,
#[error("Public keys don't match")]
ConfigPublicKey,
#[error("Credentials don't match")]
Credentials,
#[error("Server file was not created with the same server configuration")]
ServerFile,
}