version 1.327, 2020/01/23 07:10:22 |
version 1.328, 2020/01/25 07:17:18 |
|
|
} |
} |
|
|
void |
void |
maybe_add_key_to_agent(char *authfile, struct sshkey *private, |
maybe_add_key_to_agent(const char *authfile, struct sshkey *private, |
char *comment, char *passphrase) |
const char *comment, const char *passphrase) |
{ |
{ |
int auth_sock = -1, r; |
int auth_sock = -1, r; |
const char *skprovider = NULL; |
const char *skprovider = NULL; |
|
|
} |
} |
if (sshkey_is_sk(private)) |
if (sshkey_is_sk(private)) |
skprovider = options.sk_provider; |
skprovider = options.sk_provider; |
if ((r = ssh_add_identity_constrained(auth_sock, private, comment, 0, |
if ((r = ssh_add_identity_constrained(auth_sock, private, |
|
comment == NULL ? authfile : comment, 0, |
(options.add_keys_to_agent == 3), 0, skprovider)) == 0) |
(options.add_keys_to_agent == 3), 0, skprovider)) == 0) |
debug("identity added to agent: %s", authfile); |
debug("identity added to agent: %s", authfile); |
else |
else |