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.