pub(crate) async fn move_if_vouched(
state: &AppState,
agent: &str,
observed_key: &[u8],
cert: Option<&WanKeyRecord>,
by: &str,
force: bool,
) -> Result<Path, String>Expand description
Move agent’s name pin to observed_key if cert vouches for it; for a name with no pin, make its
first pin the same way. The UID
pins beside the name pin go with the old key and are set again by the next
message that verifies under the new one (lan_peer_pubkey_pin_replace).
Returns what vouched, or why nothing did. by is who asked, for the audit
line: "automatic" for a message that arrived, an agent’s id for the route.
force skips the wait after an unvouched answer (the agent route asks for it
on purpose).