Struct tor_netdoc::doc::authcert::AuthCert
source · pub struct AuthCert { /* private fields */ }
Expand description
A single authority certificate.
Authority certificates bind a long-term RSA identity key from a directory authority to a medium-term signing key. The signing keys are the ones used to sign votes and consensuses; the identity keys can be kept offline.
Implementations§
source§impl AuthCert
impl AuthCert
sourcepub fn builder() -> AuthCertBuilder
Available on crate feature build_docs
only.
pub fn builder() -> AuthCertBuilder
build_docs
only.Make an AuthCertBuilder
object that can be used to
construct authority certificates for testing.
sourcepub fn parse(s: &str) -> Result<UncheckedAuthCert>
pub fn parse(s: &str) -> Result<UncheckedAuthCert>
Parse an authority certificate from a string.
This function verifies the certificate’s signatures, but doesn’t check its expiration dates.
sourcepub fn parse_multiple(
s: &str
) -> impl Iterator<Item = Result<UncheckedAuthCert>> + '_
pub fn parse_multiple( s: &str ) -> impl Iterator<Item = Result<UncheckedAuthCert>> + '_
Return an iterator yielding authority certificates from a string.
sourcepub fn signing_key(&self) -> &PublicKey
pub fn signing_key(&self) -> &PublicKey
Return the signing key certified by this certificate.
sourcepub fn key_ids(&self) -> &AuthCertKeyIds
pub fn key_ids(&self) -> &AuthCertKeyIds
Return an AuthCertKeyIds object describing the keys in this certificate.
sourcepub fn id_fingerprint(&self) -> &RsaIdentity
pub fn id_fingerprint(&self) -> &RsaIdentity
Return an RsaIdentity for this certificate’s identity key.
sourcepub fn sk_fingerprint(&self) -> &RsaIdentity
pub fn sk_fingerprint(&self) -> &RsaIdentity
Return an RsaIdentity for this certificate’s signing key.
sourcepub fn published(&self) -> SystemTime
pub fn published(&self) -> SystemTime
Return the time when this certificate says it was published.
sourcepub fn expires(&self) -> SystemTime
pub fn expires(&self) -> SystemTime
Return the time when this certificate says it should expire.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthCert
impl RefUnwindSafe for AuthCert
impl Send for AuthCert
impl Sync for AuthCert
impl Unpin for AuthCert
impl UnwindSafe for AuthCert
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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