Displaying 5 results from an estimated 5 matches for "list_identities".
2025 Jan 09
2
[PATCH] ssh-add: support parser-friendly operation
...print nothing and exit with a
+status 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));...
2014 Apr 19
3
[Bug 2234] New: ssh-add -l output aborts on unrecognized key, skips flush when stdout not tty
...d by checking if the line begins with
whitespace.
The current behaviour working as well as it does is based on only one
set of keys being loaded and the most portable keys being loaded first.
The current behaviour can be made agnostic of tty/non-tty by inserting
a `setlinebuf(stdout);` call into `list_identities()`.
A more reliable approach might be to give `key_fingerprint()` a flag to
avoid calling fatal and to return an error some other way?
--
You are receiving this mail because:
You are watching the assignee of the bug.
2025 Jan 10
2
[PATCH v2] ssh-add: support external parsing of key listing
...ent"
+ fi
+}
+
+check_keys_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,...
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
--
2025 Jan 10
1
[PATCH v2] ssh-add: support external parsing of key listing
...present"
+ fi
+}
+
+check_keys_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 fet...