version 1.49, 2001/12/24 07:29:43 |
version 1.50, 2002/01/29 14:27:57 |
|
|
} |
} |
} |
} |
|
|
static void |
static int |
list_identities(AuthenticationConnection *ac, int do_fp) |
list_identities(AuthenticationConnection *ac, int do_fp) |
{ |
{ |
Key *key; |
Key *key; |
|
|
xfree(comment); |
xfree(comment); |
} |
} |
} |
} |
if (!had_identities) |
if (!had_identities) { |
printf("The agent has no identities.\n"); |
printf("The agent has no identities.\n"); |
|
return -1; |
|
} |
|
return 0; |
} |
} |
|
|
static int |
static int |
|
|
ac = ssh_get_authentication_connection(); |
ac = ssh_get_authentication_connection(); |
if (ac == NULL) { |
if (ac == NULL) { |
fprintf(stderr, "Could not open a connection to your authentication agent.\n"); |
fprintf(stderr, "Could not open a connection to your authentication agent.\n"); |
exit(1); |
exit(2); |
} |
} |
while ((ch = getopt(argc, argv, "lLdDe:s:")) != -1) { |
while ((ch = getopt(argc, argv, "lLdDe:s:")) != -1) { |
switch (ch) { |
switch (ch) { |
case 'l': |
case 'l': |
case 'L': |
case 'L': |
list_identities(ac, ch == 'l' ? 1 : 0); |
if (list_identities(ac, ch == 'l' ? 1 : 0) == -1) |
|
ret = 1; |
goto done; |
goto done; |
break; |
break; |
case 'd': |
case 'd': |