search for: do_fp

Displaying 5 results from an estimated 5 matches for "do_fp".

Did you mean: do_cp
2025 Jan 09
2
[PATCH] ssh-add: support parser-friendly operation
...tus of 0. .It Fl q Be quiet after a successful operation. .It Fl S Ar provider diff --git a/ssh-add.c b/ssh-add.c index 0035cb84a..889decc0d 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -529,7 +529,7 @@ test_key(int agent_fd, const char *filename) } static int -list_identities(int agent_fd, int do_fp) +list_identities(int agent_fd, int do_fp, int parse_friendly) { char *fp; int r; @@ -541,6 +541,8 @@ list_identities(int agent_fd, int do_fp) if (r != SSH_ERR_AGENT_NO_IDENTITIES) fprintf(stderr, "error fetching identities: %s\n", ssh_err(r)); + else if (parse_friend...
2025 Jan 10
2
[PATCH v2] ssh-add: support external parsing of key listing
...esent() { + if ! _check_keys_present "$1" ; then + fail "$1: keys unexpectedly absent" + fi +} + # helper cleanup () { diff --git a/ssh-add.c b/ssh-add.c index 0035cb84a..8194a1649 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -538,12 +538,14 @@ list_identities(int agent_fd, int do_fp) size_t i; if ((r = ssh_fetch_identitylist(agent_fd, &idlist)) != 0) { - if (r != SSH_ERR_AGENT_NO_IDENTITIES) + if (r == SSH_ERR_AGENT_NO_IDENTITIES) { + fprintf(stderr, "The agent has no identities.\n"); + return 0; + } else { fprintf(stderr, "error fetching id...
2025 Jan 10
1
[PATCH v2] ssh-add: support external parsing of key listing
...s_present() { + if ! _check_keys_present "$1" ; then + fail "$1: keys unexpectedly absent" + fi +} + # helper cleanup () { diff --git a/ssh-add.c b/ssh-add.c index 0035cb84a..8194a1649 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -538,12 +538,14 @@ list_identities(int agent_fd, int do_fp) size_t i; if ((r = ssh_fetch_identitylist(agent_fd, &idlist)) != 0) { - if (r != SSH_ERR_AGENT_NO_IDENTITIES) + if (r == SSH_ERR_AGENT_NO_IDENTITIES) { + fprintf(stderr, "The agent has no identities.\n"); + return 0; + } else { fprintf(stderr, "error fetching identities: %s\n&q...
2011 Apr 07
6
new option ssh-add -v to verify if key is loaded into the agent
Dear openssh developers In a shell script I need to verify if a key belonging to a given public key file is already loaded into the agent. To achieve this, I added a new option -v to ssh-add which does this verification. The patch bases on openssh v5.8p1. The regression test agent.sh was extended to test this new feature. Is there any chance for inclusion of attached patch? Cheers Konrad --
2005 Jul 26
1
Linux in-kernel keys support
...1) { + fprintf(stderr, "Error in keyctl_read_alloc\n"); + goto out; + } + + key = key_from_blob(buf2, ret); + free(buf2); + if (!key) { + fprintf(stderr, "key_from_blob failed: %s\n", comment); + goto out; + } + key->flags = KEY_FLAG_KERN; + + if (do_fp) { + fp = key_fingerprint(key, SSH_FP_MD5, + SSH_FP_HEX); + printf("%d %s %s (%s)\n", + key_size(key), fp, comment, key_type(key)); + xfree(fp); + } else { + if (!key_write(key, stdout)) + fprintf(stderr, "key_write failed"); + fprintf(stdout,...