aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-06-05 02:06:12 +0000
committerDavid Shaw <[email protected]>2003-06-05 02:06:12 +0000
commit4d3fecee56365d70c6ca99739ee82ea43a08c27c (patch)
tree2da58d00b4ea9902c3992839da5a2ff739315e44 /g10/keylist.c
parentUpdate error handling to match gpg-error in CVS. (diff)
downloadgnupg-4d3fecee56365d70c6ca99739ee82ea43a08c27c.tar.gz
gnupg-4d3fecee56365d70c6ca99739ee82ea43a08c27c.zip
* options.skel: Use new hkp://subkeys.pgp.net as sample keyserver since
they at least handle subkeys correctly. * options.h, g10.c (main), main.h, keylist.c (show_keyserver_url), mainproc.c (check_sig_and_print), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt, can_handle_critical): Add read-only support for preferred keyserver subpackets. They're basically policy URLs with a different name. Add a verify-option "show-preferred-keyserver" to turn them on and off (on by default, as per stable branch). * g10.c (main): Add "--set-notation" as alias to "--notation-data" this is to make things consistent with --set-policy-url meaning both sigs and certs.
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index 616cea8c9..680ff2f59 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -163,6 +163,47 @@ show_policy_url(PKT_signature *sig,int indent,int mode)
*/
void
+show_keyserver_url(PKT_signature *sig,int indent,int mode)
+{
+ const byte *p;
+ size_t len;
+ int seq=0,crit;
+ FILE *fp=mode?log_stream():stdout;
+
+ while((p=enum_sig_subpkt(sig->hashed,SIGSUBPKT_PREF_KS,&len,&seq,&crit)))
+ {
+ if(mode!=2)
+ {
+ int i;
+ char *str;
+
+ for(i=0;i<indent;i++)
+ putchar(' ');
+
+ /* This isn't UTF8 as it is a URL(?) */
+ if(crit)
+ str=_("Critical preferred keyserver: ");
+ else
+ str=_("Preferred keyserver: ");
+ if(mode)
+ log_info("%s",str);
+ else
+ printf("%s",str);
+ print_string(fp,p,len,0);
+ fprintf(fp,"\n");
+ }
+
+ /* TODO: put in a status-fd tag for preferred keyservers */
+ }
+}
+
+/*
+ mode=0 for stdout.
+ mode=1 for log_info + status messages
+ mode=2 for status messages only
+*/
+
+void
show_notation(PKT_signature *sig,int indent,int mode)
{
const byte *p;