pub struct OfflineTrustState { /* private fields */ }Expand description
Persist this value atomically after OfflineTrustState::apply succeeds.
Implementations§
Source§impl OfflineTrustState
impl OfflineTrustState
pub fn new(trust_domain: &str, issuer: VerifyingKey) -> Result<Self>
pub fn allow_recovery_issuer(&mut self, issuer: VerifyingKey)
pub fn high_water(&self) -> Result<Option<OfflineTrustHighWater>>
pub fn apply( &mut self, next: OfflineTrustBundle, at_ms: u64, ) -> Result<OfflineTrustHighWater>
pub fn credential( &self, device_id: &str, at_ms: u64, ) -> Result<&OfflineDeviceCredential>
Sourcepub fn verify_connection_proof(
&self,
proof: &OfflineConnectionProof,
expected: &OfflineProofTranscript,
replay_cache: &mut OfflineReplayCache,
at_ms: u64,
) -> Result<OfflineAdmission>
pub fn verify_connection_proof( &self, proof: &OfflineConnectionProof, expected: &OfflineProofTranscript, replay_cache: &mut OfflineReplayCache, at_ms: u64, ) -> Result<OfflineAdmission>
Verify one fresh proof against the currently accepted bundle. This is the safe public entrypoint: callers cannot skip expiry, revocation, issuer, domain, or bundle-generation validation.
Sourcepub fn verify_transport_proof(
&self,
candidate: &OfflineCandidateHandoff,
proof: &OfflineConnectionProof,
expected: &OfflineProofTranscript,
binding: OfflineTransportBinding,
replay_cache: &mut OfflineReplayCache,
at_ms: u64,
) -> Result<OfflineAdmissionHandoff>
pub fn verify_transport_proof( &self, candidate: &OfflineCandidateHandoff, proof: &OfflineConnectionProof, expected: &OfflineProofTranscript, binding: OfflineTransportBinding, replay_cache: &mut OfflineReplayCache, at_ms: u64, ) -> Result<OfflineAdmissionHandoff>
Verify a fresh connection proof and bind its verdict to one exact physical generation. The returned handoff is opaque to adapters and is committed only by the existing Rust admission owner.
Trait Implementations§
Source§impl Clone for OfflineTrustState
impl Clone for OfflineTrustState
Auto Trait Implementations§
impl Freeze for OfflineTrustState
impl RefUnwindSafe for OfflineTrustState
impl Send for OfflineTrustState
impl Sync for OfflineTrustState
impl Unpin for OfflineTrustState
impl UnsafeUnpin for OfflineTrustState
impl UnwindSafe for OfflineTrustState
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
Mutably borrows from an owned value. Read more