netdoc: Add accessors for protocols and ntor key.
These are needed to actually be able to build circuits through a bridge.
This commit is contained in:
parent
d9e3d38bd6
commit
acb6288621
|
@ -369,6 +369,17 @@ impl RouterDesc {
|
|||
.expect("No ed25519 identity key on identity cert")
|
||||
}
|
||||
|
||||
/// Return a reference to the list of subprotocol versions supported by this
|
||||
/// relay.
|
||||
pub fn protocols(&self) -> &tor_protover::Protocols {
|
||||
self.proto.as_ref()
|
||||
}
|
||||
|
||||
/// Return a reference to this relay's Ntor onion key.
|
||||
pub fn ntor_onion_key(&self) -> &ll::pk::curve25519::PublicKey {
|
||||
&self.ntor_onion_key
|
||||
}
|
||||
|
||||
/// Helper: tokenize `s`, and divide it into three validated sections.
|
||||
fn parse_sections<'a>(
|
||||
reader: &mut NetDocReader<'a, RouterKwd>,
|
||||
|
|
Loading…
Reference in New Issue