pub struct RevocationManager { /* private fields */ }Expand description
Manages revocation requests and SRL generation.
Implementations§
Source§impl RevocationManager
impl RevocationManager
Sourcepub 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<()>
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 requestwarrant_id- The ID of the warrant to revokewarrant_issuer- The issuer of the warrantwarrant_holder- The holder of the warrant (if any)warrant_expires_at- When the warrant expirescontrol_plane_key- The Control Plane’s public key
Sourcepub fn pending_ids(&self) -> impl Iterator<Item = &str>
pub fn pending_ids(&self) -> impl Iterator<Item = &str>
Get all pending warrant IDs for SRL generation.
Sourcepub fn generate_srl(
&self,
signer: &SigningKey,
version: u64,
) -> Result<SignedRevocationList>
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
Sourcepub fn generate_srl_with_cascade(
&self,
signer: &SigningKey,
version: u64,
cascade_ids: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<SignedRevocationList>
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.
Sourcepub fn prune_expired<F>(&mut self, is_expired: F)
pub fn prune_expired<F>(&mut self, is_expired: F)
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
impl Debug for RevocationManager
Source§impl Default for RevocationManager
impl Default for RevocationManager
Source§fn default() -> RevocationManager
fn default() -> RevocationManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RevocationManager
impl RefUnwindSafe for RevocationManager
impl Send for RevocationManager
impl Sync for RevocationManager
impl Unpin for RevocationManager
impl UnwindSafe for RevocationManager
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