aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-10-28 03:14:55 +0000
committerDavid Shaw <[email protected]>2004-10-28 03:14:55 +0000
commitf5b7a72a48ddfbf970859f2695bd6c86692169d0 (patch)
tree64de9387ed5a0a975f8cfacdbf8b9a9da131f0b1 /g10/keylist.c
parent* keyring.c: Make some strings translatable. (diff)
downloadgnupg-f5b7a72a48ddfbf970859f2695bd6c86692169d0.tar.gz
gnupg-f5b7a72a48ddfbf970859f2695bd6c86692169d0.zip
* keylist.c (status_one_subpacket): New. Send the subpacket data to the
--status interface. * card-util.c (card_edit): Show when admin is enabled or not. * status.h, status.c: New STATUS_SIG_SUBPACKET type. * build-packet.c (build_sig_subpkt): Multiple keyserver URLs are allowed.
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index 39ccb556d..f874b2d64 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -158,6 +158,21 @@ print_pubkey_info (FILE *fp, PKT_public_key *pk)
m_free (p);
}
+/* Flags = 0x01 hashed 0x02 critical */
+static void
+status_one_subpacket(sigsubpkttype_t type,size_t len,int flags,const byte *buf)
+{
+ char status[40];
+
+ /* Don't print these. */
+ if(len>256)
+ return;
+
+ sprintf(status,"%d %u %u ",type,flags,len);
+
+ write_status_text_and_buffer(STATUS_SIG_SUBPACKET,status,buf,len,0);
+}
+
/*
mode=0 for stdout.
mode=1 for log_info + status messages
@@ -235,7 +250,8 @@ show_keyserver_url(PKT_signature *sig,int indent,int mode)
fprintf(fp,"\n");
}
- /* TODO: put in a status-fd tag for preferred keyservers */
+ if(mode)
+ status_one_subpacket(SIGSUBPKT_PREF_KS,len,(crit?0x02:0)|0x01,p);
}
}