pub struct Startup { /* private fields */ }Expand description
What to tell the reader about a daemon that has just come up.
Returned beside Bound rather than reachable through it, and that separation is
load-bearing rather than tidy. Bound owns the Origin, and the Origin owns the TLS
configuration, and that owns a private key — so a banner line reached through Bound is a
string a static analyser must treat as derived from the key, and it said so: CodeQL flagged
both eprintln!s in main as cleartext logging of the certificate resolver.
It was wrong about the values — these are host names and paths — and right about the shape. Handing the caller strings that were never near the key makes the question unanswerable rather than answered.
Implementations§
Source§impl Startup
impl Startup
Sourcepub fn routes(&self) -> &[String]
pub fn routes(&self) -> &[String]
One line per alias, naming where it actually points.
Only available once bound, which is the point: an alias rooted at the home directory has no printable base until the remote has been asked.
Sourcepub fn refused(&self) -> &[String]
pub fn refused(&self) -> &[String]
Enabled hosts that would not connect, and what ssh said about each.
Separate from routes so a caller cannot print them as though they were working. Empty
on an ordinary run; not an error, because the daemon is serving everything else.
Sourcepub fn trust(&self) -> Option<&str>
pub fn trust(&self) -> Option<&str>
What to say about the certificate, under https.
None under http, where there is nothing to trust. Under https there is always
something to say, because nothing portable can tell whether the authority is still
trusted — and a daemon that advertised https://... and said nothing else left a
first-time reader at ERR_CERT_AUTHORITY_INVALID with no way to guess what to do. That
was measured by following the banner on a machine that had never run this.