pub struct Revocations<'a> {
pub(super) conn: &'a Mutex<Connection>,
}Fields§
§conn: &'a Mutex<Connection>Implementations§
Source§impl Revocations<'_>
impl Revocations<'_>
Sourcepub fn revoke_cert(
&self,
hostname: &str,
not_before: DateTime<Utc>,
reason: Option<&str>,
revoked_by: Option<&str>,
) -> Result<()>
pub fn revoke_cert( &self, hostname: &str, not_before: DateTime<Utc>, reason: Option<&str>, revoked_by: Option<&str>, ) -> Result<()>
Upsert: any cert with notBefore < not_before is rejected; re-revoking moves it forward.
Sourcepub fn cert_revoked_before(
&self,
hostname: &str,
) -> Result<Option<DateTime<Utc>>>
pub fn cert_revoked_before( &self, hostname: &str, ) -> Result<Option<DateTime<Utc>>>
Caller compares against the presented cert’s notBefore.
Sourcepub fn retain_only(&self, keep: &[&str]) -> Result<usize>
pub fn retain_only(&self, keep: &[&str]) -> Result<usize>
Reconcile the table with the signed sidecar: delete every row
whose hostname is not in keep. Returns the number of rows
deleted. Closes the de-revoke gap - revoke_cert is
upsert-only, so an entry leaving the signed list otherwise
sticks around in the DB forever and silently keeps rejecting
the host on every mTLS request.
Auto Trait Implementations§
impl<'a> Freeze for Revocations<'a>
impl<'a> RefUnwindSafe for Revocations<'a>
impl<'a> Send for Revocations<'a>
impl<'a> Sync for Revocations<'a>
impl<'a> Unpin for Revocations<'a>
impl<'a> UnwindSafe for Revocations<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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