Skip to main content

Ed25519Cert

Struct Ed25519Cert 

Source
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

Source

pub fn builder() -> Ed25519CertBuilder

Return a new Ed25519CertBuilder to create and return a new signed Ed25519Cert.

Source§

impl Ed25519Cert

Source

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.

Source

pub fn expiry(&self) -> SystemTime

Return the time at which this certificate becomes expired

Source

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.

Source

pub fn subject_key(&self) -> &CertifiedKey

Return the signed key or object that is authenticated by this certificate.

Source

pub fn signing_key(&self) -> Option<&Ed25519Identity>

Return the ed25519 key that signed this certificate.

Source

pub fn cert_type(&self) -> CertType

Return the type of this certificate.

Trait Implementations§

Source§

impl Clone for Ed25519Cert

Source§

fn clone(&self) -> Ed25519Cert

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ed25519Cert

Source§

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

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

impl Eq for Ed25519Cert

Source§

impl PartialEq for Ed25519Cert

Source§

fn eq(&self, other: &Ed25519Cert) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Ed25519Cert

Source§

impl TimeBound for Ed25519Cert

Source§

type Inner = Ed25519Cert

The inner, wrapped type, which is being protected by this TimeBound implementation
Source§

fn bounds(&self) -> TimeRange

Get the bounds, in the form of a TimeRangeBound<()> Read more
Source§

fn dangerously_assume_timely(self) -> Ed25519Cert

Return the underlying object without checking whether it’s valid.
Source§

fn check_valid_at(&self, t: &SystemTime) -> Result<(), TimeValidityError>

Check whether this object is valid at a given time. Read more
Source§

fn if_valid_at(self, t: &SystemTime) -> Result<Self::Inner, TimeValidityError>

Unwrap this TimeBound object if it is valid at a given time.
Source§

fn if_valid_now(self) -> Result<Self::Inner, TimeValidityError>

Unwrap this TimeBound object if it is valid now.
Source§

fn unwrap_with(self, builder: &mut TimeRangeBoundBuilder) -> Self::Inner

Gain access to the Inner, handling the timeout with a TimeRangeBoundBuilder Read more
Source§

fn check_valid_at_opt( self, t: Option<SystemTime>, ) -> Result<Self::Inner, TimeValidityError>

👎Deprecated:

use check_valid_at

Unwrap this object if it is valid at the provided time t. If no time is provided, check the object at the current time. 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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more