aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index f2c387b02..68d725753 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -230,16 +230,20 @@ list_all( int secret )
log_error ("keydb_get_keyblock failed: %s\n", g10_errstr(rc));
goto leave;
}
- resname = keydb_get_resource_name (hd);
- if (lastresname != resname ) {
- int i;
-
- printf("%s\n", resname );
- for(i=strlen(resname); i; i-- )
- putchar('-');
- putchar('\n');
- lastresname = resname;
- }
+ if(!opt.with_colons)
+ {
+ resname = keydb_get_resource_name (hd);
+ if (lastresname != resname )
+ {
+ int i;
+
+ printf("%s\n", resname );
+ for(i=strlen(resname); i; i-- )
+ putchar('-');
+ putchar('\n');
+ lastresname = resname;
+ }
+ }
merge_keys_and_selfsig( keyblock );
list_keyblock( keyblock, secret, opt.fingerprint,
opt.check_sigs?&stats:NULL);
@@ -265,7 +269,7 @@ list_one( STRLIST names, int secret )
KBNODE keyblock = NULL;
GETKEY_CTX ctx;
const char *resname;
- char *keyring_str = N_("Keyring");
+ char *keyring_str = _("Keyring");
int i;
struct sig_stats stats;
@@ -288,7 +292,7 @@ list_one( STRLIST names, int secret )
return;
}
do {
- if (opt.show_keyring) {
+ if (opt.show_keyring && !opt.with_colons) {
resname = keydb_get_resource_name (get_ctx_handle(ctx));
printf("%s: %s\n", keyring_str, resname);
for(i = strlen(resname) + strlen(keyring_str) + 2; i; i-- )
@@ -308,7 +312,7 @@ list_one( STRLIST names, int secret )
return;
}
do {
- if (opt.show_keyring) {
+ if (opt.show_keyring && !opt.with_colons) {
resname = keydb_get_resource_name (get_ctx_handle(ctx));
printf("%s: %s\n", keyring_str, resname);
for(i = strlen(resname) + strlen(keyring_str) + 2; i; i-- )