Skip to main content

RevocationService

Struct RevocationService 

Source
pub struct RevocationService { /* private fields */ }
Expand description

The revocation service.

Implementations§

Source§

impl RevocationService

Source

pub fn new(quorum_id: impl Into<String>) -> Self

Construct a new service backed by the named quorum.

Source

pub fn quorum_id(&self) -> &str

Quorum identifier backing this service.

Source

pub fn prepare_revocation_blob( &self, user_email: &str, key_fingerprint: &str, revocation_signature: &[u8], public_key: &[u8], encapsulator: &dyn Encapsulator, ) -> Result<RevocationBlob, RevocationError>

User-side: prepare a revocation blob.

In a real implementation this encrypts (revocation_signature + public_key) to the service quorum’s threshold public key.

Source

pub fn submit( &mut self, blob: RevocationBlob, verification_token: &str, ) -> Result<String, RevocationError>

Service-side: submit a blob for processing.

Source

pub fn confirm_first( &mut self, submission_id: &str, ) -> Result<(), RevocationError>

Service-side: process first confirmation for a submission.

Source

pub fn confirm_second( &mut self, submission_id: &str, ) -> Result<(), RevocationError>

Service-side: process second confirmation (after 24h delay).

Source

pub fn process_pending(&mut self) -> Result<usize, RevocationError>

Service-side: process pending submissions that have reached second confirmation. Returns the number of submissions processed.

Source

pub fn publish(&mut self, submission_id: &str) -> Result<(), RevocationError>

Service-side: publish a processed submission to keyservers.

Source

pub fn pending_count(&self) -> usize

Number of pending submissions.

Source

pub fn submission(&self, id: &str) -> Option<&Submission>

Lookup a submission by ID.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.