Skip to content
Snippets Groups Projects
Commit d651a894 authored by Ian Jackson's avatar Ian Jackson Committed by Nick Mathewson
Browse files

dirmgr: Authority: Abolish v3ident accessor

This makes this information crate-private.  The crate can reasonably
just access it.
parent d1a9ed62
No related branches found
No related tags found
1 merge request!423Abolish some accessors in drmgr
......@@ -21,7 +21,7 @@ pub struct Authority {
/// A SHA1 digest of the DER-encoded long-term v3 RSA identity key for
/// this authority.
// TODO: It would be lovely to use a better hash for these identities.
v3ident: RsaIdentity,
pub(crate) v3ident: RsaIdentity,
}
impl Authority {
......@@ -32,14 +32,6 @@ impl Authority {
pub fn builder() -> AuthorityBuilder {
AuthorityBuilder::default()
}
/// Return the v3 identity key of this certificate.
///
/// This is the identity of the >=2048-bit RSA key that the
/// authority uses to sign documents; it is distinct from its
/// identity keys that it uses when operating as a relay.
pub fn v3ident(&self) -> &RsaIdentity {
&self.v3ident
}
}
/// Return a vector of the default directory authorities.
......@@ -99,7 +91,7 @@ mod test {
.build()
.unwrap();
assert_eq!(auth.v3ident(), &key1);
assert_eq!(&auth.v3ident, &key1);
let keyids1 = AuthCertKeyIds {
id_fingerprint: key1,
......
......@@ -149,7 +149,7 @@ impl<DM: WriteNetDir> GetConsensusState<DM> {
.config()
.authorities()
.iter()
.map(|auth| *auth.v3ident())
.map(|auth| auth.v3ident)
.collect();
let after = writedir
.netdir()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment