pub struct Ed25519Cert { /* private fields */ }Expand description
Structure for an Ed25519-signed certificate as described in Tor’s cert-spec.txt.
Implementations§
Source§impl Ed25519Cert
impl Ed25519Cert
Sourcepub fn builder() -> Ed25519CertBuilder
pub fn builder() -> Ed25519CertBuilder
Return a new Ed25519CertBuilder to create and return a new signed
Ed25519Cert.
Source§impl Ed25519Cert
impl Ed25519Cert
Sourcepub fn decode(cert: &[u8]) -> BytesResult<KeyUnknownCert>
pub fn decode(cert: &[u8]) -> BytesResult<KeyUnknownCert>
Try to decode a certificate from a byte slice.
This function returns an error if the byte slice is not completely exhausted.
Note that the resulting KeyUnknownCertificate is not checked for validity at all: you will need to provide it with an expected signing key, then check it for timeliness and well-signedness.
Sourcepub fn expiry(&self) -> SystemTime
pub fn expiry(&self) -> SystemTime
Return the time at which this certificate becomes expired
Sourcepub fn is_expired_at(&self, when: SystemTime) -> bool
pub fn is_expired_at(&self, when: SystemTime) -> bool
Return true iff this certificate will be expired at the time when.
This is inclusive, meaning that when == self.expiry() is still valid.
Sourcepub fn subject_key(&self) -> &CertifiedKey
pub fn subject_key(&self) -> &CertifiedKey
Return the signed key or object that is authenticated by this certificate.
Sourcepub fn signing_key(&self) -> Option<&Ed25519Identity>
pub fn signing_key(&self) -> Option<&Ed25519Identity>
Return the ed25519 key that signed this certificate.
Trait Implementations§
Source§impl Clone for Ed25519Cert
impl Clone for Ed25519Cert
Source§fn clone(&self) -> Ed25519Cert
fn clone(&self) -> Ed25519Cert
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Ed25519Cert
impl Debug for Ed25519Cert
impl Eq for Ed25519Cert
Source§impl PartialEq for Ed25519Cert
impl PartialEq for Ed25519Cert
Source§fn eq(&self, other: &Ed25519Cert) -> bool
fn eq(&self, other: &Ed25519Cert) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Ed25519Cert
Source§impl Timebound<Ed25519Cert> for Ed25519Cert
impl Timebound<Ed25519Cert> for Ed25519Cert
Source§type Error = TimeValidityError
type Error = TimeValidityError
Source§fn is_valid_at(&self, t: &SystemTime) -> Result<(), Self::Error>
fn is_valid_at(&self, t: &SystemTime) -> Result<(), Self::Error>
Source§fn dangerously_assume_timely(self) -> Ed25519Cert
fn dangerously_assume_timely(self) -> Ed25519Cert
Source§fn check_valid_at(self, t: &SystemTime) -> Result<T, Self::Error>
fn check_valid_at(self, t: &SystemTime) -> Result<T, Self::Error>
Source§fn check_valid_now(self) -> Result<T, Self::Error>
fn check_valid_now(self) -> Result<T, Self::Error>
Source§fn check_valid_at_opt(self, t: Option<SystemTime>) -> Result<T, Self::Error>
fn check_valid_at_opt(self, t: Option<SystemTime>) -> Result<T, Self::Error>
Source§impl Timebound<Ed25519Cert> for SigCheckedCert
impl Timebound<Ed25519Cert> for SigCheckedCert
Source§type Error = TimeValidityError
type Error = TimeValidityError
Source§fn is_valid_at(&self, t: &SystemTime) -> Result<(), Self::Error>
fn is_valid_at(&self, t: &SystemTime) -> Result<(), Self::Error>
Source§fn dangerously_assume_timely(self) -> Ed25519Cert
fn dangerously_assume_timely(self) -> Ed25519Cert
Source§fn check_valid_at(self, t: &SystemTime) -> Result<T, Self::Error>
fn check_valid_at(self, t: &SystemTime) -> Result<T, Self::Error>
Source§fn check_valid_now(self) -> Result<T, Self::Error>
fn check_valid_now(self) -> Result<T, Self::Error>
Source§fn check_valid_at_opt(self, t: Option<SystemTime>) -> Result<T, Self::Error>
fn check_valid_at_opt(self, t: Option<SystemTime>) -> Result<T, Self::Error>
Auto Trait Implementations§
impl Freeze for Ed25519Cert
impl RefUnwindSafe for Ed25519Cert
impl Send for Ed25519Cert
impl Sync for Ed25519Cert
impl Unpin for Ed25519Cert
impl UnsafeUnpin for Ed25519Cert
impl UnwindSafe for Ed25519Cert
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more