diff --git a/g10/ChangeLog b/g10/ChangeLog index bd66c6486..8a6a15e21 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,16 @@ +2003-08-25 David Shaw + + * mainproc.c (check_sig_and_print): Use two different preferred + keyserver displays - one if the key is not present (to tell the + user where to get the key), the other if it is present (to tell + the user where the key can be refreshed). + + * packet.h, parse-packet.c (parse_signature): Set flag if a + preferred keyserver is present. + + * keylist.c (list_keyblock_print): Show keyserver url in listings + with list-option show-keyserver-url. + 2003-08-24 David Shaw * Makefile.am: Use NETLIBS instead of EGDLIBS. diff --git a/g10/keylist.c b/g10/keylist.c index e01d8d993..dace1e742 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -845,6 +845,9 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) if(sig->flags.notation && (opt.list_options&LIST_SHOW_NOTATION)) show_notation(sig,3,0); + if(sig->flags.pref_ks && (opt.list_options&LIST_SHOW_KEYSERVER)) + show_keyserver_url(sig,3,0); + /* fixme: check or list other sigs here */ } } diff --git a/g10/mainproc.c b/g10/mainproc.c index 1762497f8..f92181e2b 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -1287,7 +1287,7 @@ check_sig_and_print( CTX c, KBNODE node ) /* If the key still isn't found, try to inform the user where it can be found. */ - if(rc==G10ERR_NO_PUBKEY && opt.verify_options&VERIFY_SHOW_KEYSERVER) + if(rc==G10ERR_NO_PUBKEY && sig->flags.pref_ks) { const byte *p; int seq=0; @@ -1457,6 +1457,11 @@ check_sig_and_print( CTX c, KBNODE node ) else show_policy_url(sig,0,2); + if(opt.verify_options&VERIFY_SHOW_KEYSERVER) + show_keyserver_url(sig,0,1); + else + show_keyserver_url(sig,0,2); + if(opt.verify_options&VERIFY_SHOW_NOTATION) show_notation(sig,0,1); else diff --git a/g10/packet.h b/g10/packet.h index 9d0e36154..d75ff413a 100644 --- a/g10/packet.h +++ b/g10/packet.h @@ -129,8 +129,9 @@ typedef struct { unsigned unknown_critical:1; unsigned exportable:1; unsigned revocable:1; - unsigned policy_url:1; /* Policy URL is present */ + unsigned policy_url:1; /* At least one policy URL is present */ unsigned notation:1; /* At least one notation is present */ + unsigned pref_ks:1; /* At least one preferred keyserver is present */ unsigned expired:1; } flags; u32 keyid[2]; /* 64 bit keyid */ diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 1ba8f3239..0831d26f4 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1305,6 +1305,10 @@ parse_signature( IOBUF inp, int pkttype, unsigned long pktlen, if(p) sig->flags.policy_url=1; + p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_PREF_KS,NULL); + if(p) + sig->flags.pref_ks=1; + p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_NOTATION,NULL); if(p) sig->flags.notation=1;