Expand description
Identity resolution (FR-9 through FR-12).
Key discovery follows a fixed priority order:
- CLI
--identityflag — explicit path from the user. - Default
.sshpaths —~/.ssh/id_ed25519,~/.ssh/id_ecdsa,~/.ssh/id_rsa(in that order, matching modern OpenSSH defaults). - SSH agent — contacted via
$SSH_AUTH_SOCK(Unix) (FR-9).
If a key file is encrypted, IdentityResolution::Encrypted is returned so
the caller (the CLI) can prompt for a passphrase without this library
depending on terminal I/O.
Structs§
- Agent
Connection - A live connection to an SSH agent with its advertised identities.
Enums§
- Identity
Resolution - Result returned by
find_identity.
Functions§
- connect_
agent - Attempts to connect to the SSH agent via
$SSH_AUTH_SOCKand retrieve its advertised identities (FR-9, priority 3). - find_
identity - Searches for an identity key according to FR-9 priority order.
- load_
cert - Loads an OpenSSH certificate from
path(FR-12). - load_
encrypted_ key - Loads a passphrase-protected key file with the supplied passphrase.
- wrap_
key - Wraps a
PrivateKeywith the appropriate RSA hash algorithm.