Skip to main content

fingerprints_for_host

Function fingerprints_for_host 

Source
pub fn fingerprints_for_host(
    host: &str,
    custom_path: &Option<PathBuf>,
) -> Result<Vec<String>, GitwayError>
Expand description

Collects all expected fingerprints for host.

For well-known hosts (GitHub, GitLab, Codeberg and their fallback hostnames) the embedded fingerprint set is returned. For any other host the custom known-hosts file is consulted; if it provides entries those are used, otherwise the connection is refused with an actionable error.

ยงErrors

Returns an error if custom_path is specified but cannot be read, or if no fingerprints can be found for the given host.