pub fn load_authentication(
config: &GossipConfig,
) -> Result<(Option<GossipSigner>, GossipVerifier), GossipCryptoError>Expand description
Load the authentication material implied by config: the outbound signer
(when an identity_key is configured) and the always-present inbound
verifier for the configured AuthMode (F09).
This is the single policy-loading path shared by GossipNode::start and
hoike check, so both decide the effective policy identically. Failures
are fatal configuration errors, never a fallback to unauthenticated
operation:
- a nonempty legacy
peer_keyslist (cannot authorize node identities); requiredmode without a localidentity_key;- unreadable or invalid key material;
- a
peer_identitiesmapping for the local node name that disagrees with the localidentity_key(ambiguous attribution).
Disabled gossip never calls this, so a disabled section needs no key
material. In permissive mode a node without an identity_key still gets a
verifier: unsigned input is accepted, but signed input is held to the
provisioned identities — an empty trusted set rejects every signature.