From 23cac566e1e307f9d19a42496455c5c40fd44cf9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 18 Mar 2022 15:57:40 +0000 Subject: [PATCH] dirmgr: Authority: Abolish two unused accessors --- crates/tor-dirmgr/src/authority.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/tor-dirmgr/src/authority.rs b/crates/tor-dirmgr/src/authority.rs index 175a1e9ad..77d0dd8f8 100644 --- a/crates/tor-dirmgr/src/authority.rs +++ b/crates/tor-dirmgr/src/authority.rs @@ -6,7 +6,7 @@ use derive_builder::Builder; use serde::Deserialize; 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. // @@ -33,10 +33,6 @@ impl Authority { pub fn builder() -> AuthorityBuilder { 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. /// /// This is the identity of the >=2048-bit RSA key that the @@ -45,10 +41,6 @@ impl Authority { pub fn v3ident(&self) -> &RsaIdentity { &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. pub fn matches_keyid(&self, id: &AuthCertKeyIds) -> bool {