Displaying 4 results from an estimated 4 matches for "ssh_err_agent_no_identities".
2025 Jan 10
2
[PATCH v2] ssh-add: support external parsing of key listing
...nt"
+ 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",
ssh_err(r));
- else
- printf("The agent has no identities.\n");
- return -1;...
2025 Jan 09
2
[PATCH] ssh-add: support parser-friendly operation
...+++ 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_friendly)
+ return 0; /* no identities; nothing to do */
else
printf("The agent has no identities.\n");
return -1;
@@ -814,7 +816,7 @@ main(int argc, char **argv)
char **...
2025 Jan 10
1
[PATCH v2] ssh-add: support external parsing of key listing
...edly 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",
ssh_err(r));
- else
- printf("The agent has no identities.\n");
- return -1;
+ return -1;
+ }
}
for...
2016 Dec 28
2
certificates keys on pkcs11 devices
Hi,
I have not found any way to use a Certificate with ssh-agent when my Key is
stored on a pkcs11 device. I can add my key with
ssh-add -s /usr/local/lib/opensc-pkcs11.so
but
ssh-add -s /usr/local/lib/opensc-pkcs11.so ~/.ssh/mykey-cert.pub
does not add the certificate to my agent. As far as I undestand, in
ssh-add.c line 580
if (pkcs11provider != NULL) {
if (update_card(agent_fd,