core_crypto_ffi/e2ei/
mod.rs

1pub(crate) mod acme_challenge;
2pub(crate) mod acme_directory;
3pub(crate) mod enrollment;
4pub(crate) mod new_acme_authz;
5pub(crate) mod new_acme_order;
6
7#[cfg(target_family = "wasm")]
8use wasm_bindgen::prelude::*;
9
10#[derive(Debug, Copy, Clone)]
11#[cfg_attr(target_family = "wasm", wasm_bindgen)]
12#[cfg_attr(not(target_family = "wasm"), derive(uniffi::Enum))]
13#[repr(u8)]
14pub enum E2eiConversationState {
15    /// All clients have a valid E2EI certificate
16    Verified = 1,
17    /// Some clients are either still Basic or their certificate is expired
18    NotVerified,
19    /// All clients are still Basic. If all client have expired certificates, [E2eiConversationState::NotVerified] is returned.
20    NotEnabled,
21}
22
23impl From<core_crypto::prelude::E2eiConversationState> for E2eiConversationState {
24    fn from(value: core_crypto::prelude::E2eiConversationState) -> Self {
25        match value {
26            core_crypto::prelude::E2eiConversationState::Verified => Self::Verified,
27            core_crypto::prelude::E2eiConversationState::NotVerified => Self::NotVerified,
28            core_crypto::prelude::E2eiConversationState::NotEnabled => Self::NotEnabled,
29        }
30    }
31}