RevocationManager

Struct RevocationManager 

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

Manages revocation requests and SRL generation.

Implementations§

Source§

impl RevocationManager

Source

pub fn new() -> Self

Create a new empty revocation manager.

Source

pub fn submit_request( &mut self, request: RevocationRequest, warrant_id: &str, warrant_issuer: &PublicKey, warrant_holder: Option<&PublicKey>, warrant_expires_at: DateTime<Utc>, control_plane_key: &PublicKey, ) -> Result<()>

Submit a revocation request.

Validates the request and adds it to the pending list if valid.

§Arguments
  • request - The revocation request
  • warrant_id - The ID of the warrant to revoke
  • warrant_issuer - The issuer of the warrant
  • warrant_holder - The holder of the warrant (if any)
  • warrant_expires_at - When the warrant expires
  • control_plane_key - The Control Plane’s public key
Source

pub fn pending_ids(&self) -> impl Iterator<Item = &str>

Get all pending warrant IDs for SRL generation.

Source

pub fn generate_srl( &self, signer: &SigningKey, version: u64, ) -> Result<SignedRevocationList>

Generate a new Signed Revocation List (SRL).

This aggregates all pending requests into a new SRL.

§Arguments
  • signer - The keypair to sign the SRL (usually Control Plane)
  • version - The version number for the new SRL
Source

pub fn generate_srl_with_cascade( &self, signer: &SigningKey, version: u64, cascade_ids: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<SignedRevocationList>

Generate an SRL with additional warrant IDs (e.g., from key revocation cascade).

Use this when NotaryRegistry.revoke_key() returns affected warrant IDs.

Source

pub fn prune_expired<F>(&mut self, is_expired: F)
where F: Fn(&str) -> bool,

Prune expired requests.

Removes requests for warrants that have expired (since they don’t need to be in the SRL anymore).

§Arguments
  • is_expired - A function that returns true if a warrant ID corresponds to an expired warrant.

Trait Implementations§

Source§

impl Debug for RevocationManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RevocationManager

Source§

fn default() -> RevocationManager

Returns the “default value” for a type. Read more

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V