pub struct ServiceIdentity {
pub spiffe_id: SpiffeId,
pub certificate_data: Vec<u8>,
pub private_key_data: Vec<u8>,
pub expiry_tick: u64,
pub issued_tick: u64,
pub serial: u64,
}Expand description
A service identity with associated certificate material.
Fields§
§spiffe_id: SpiffeIdSPIFFE ID.
certificate_data: Vec<u8>X.509 certificate data (DER-encoded stub).
private_key_data: Vec<u8>Private key data (DER-encoded stub).
expiry_tick: u64Tick when the certificate expires.
issued_tick: u64Tick when the certificate was issued.
serial: u64Certificate serial number.
Implementations§
Source§impl ServiceIdentity
impl ServiceIdentity
Sourcepub fn is_expired(&self, current_tick: u64) -> bool
pub fn is_expired(&self, current_tick: u64) -> bool
Check if the certificate has expired.
Sourcepub fn needs_rotation(&self, current_tick: u64) -> bool
pub fn needs_rotation(&self, current_tick: u64) -> bool
Check if the certificate should be rotated (within 20% of expiry).
Trait Implementations§
Source§impl Clone for ServiceIdentity
impl Clone for ServiceIdentity
Source§fn clone(&self) -> ServiceIdentity
fn clone(&self) -> ServiceIdentity
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServiceIdentity
impl RefUnwindSafe for ServiceIdentity
impl Send for ServiceIdentity
impl Sync for ServiceIdentity
impl Unpin for ServiceIdentity
impl UnwindSafe for ServiceIdentity
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)