dirmgr: Authority: Abolish two unused accessors

This commit is contained in:
Ian Jackson 2022-03-18 15:57:40 +00:00 committed by Nick Mathewson
parent 9c5480480a
commit 23cac566e1
1 changed files with 1 additions and 9 deletions

View File

@ -6,7 +6,7 @@
use derive_builder::Builder; use derive_builder::Builder;
use serde::Deserialize; use serde::Deserialize;
use tor_llcrypto::pk::rsa::RsaIdentity; use tor_llcrypto::pk::rsa::RsaIdentity;
use tor_netdoc::doc::authcert::{AuthCert, AuthCertKeyIds}; use tor_netdoc::doc::authcert::AuthCertKeyIds;
/// A single authority that signs a consensus directory. /// A single authority that signs a consensus directory.
// //
@ -33,10 +33,6 @@ impl Authority {
pub fn builder() -> AuthorityBuilder { pub fn builder() -> AuthorityBuilder {
AuthorityBuilder::default() AuthorityBuilder::default()
} }
/// Return the (human-readable) name for this authority.
pub fn name(&self) -> &str {
self.name.as_ref()
}
/// Return the v3 identity key of this certificate. /// Return the v3 identity key of this certificate.
/// ///
/// This is the identity of the >=2048-bit RSA key that the /// This is the identity of the >=2048-bit RSA key that the
@ -45,10 +41,6 @@ impl Authority {
pub fn v3ident(&self) -> &RsaIdentity { pub fn v3ident(&self) -> &RsaIdentity {
&self.v3ident &self.v3ident
} }
/// Return true if this authority matches a given certificate.
pub fn matches_cert(&self, cert: &AuthCert) -> bool {
&self.v3ident == cert.id_fingerprint()
}
/// Return true if this authority matches a given key ID. /// Return true if this authority matches a given key ID.
pub fn matches_keyid(&self, id: &AuthCertKeyIds) -> bool { pub fn matches_keyid(&self, id: &AuthCertKeyIds) -> bool {