aboutsummaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-05-31 04:06:06 +0000
committerDavid Shaw <[email protected]>2003-05-31 04:06:06 +0000
commit9390fe676bbd619f37d147c86651f6f30a67fb9b (patch)
tree3f70cf87ffdc4f4dba5493bd22a175de32f528d6 /g10/mainproc.c
parent* gpgkeys_hkp.c, gpgkeys_ldap.c: #include <getopt.h> if it is available. (diff)
downloadgnupg-9390fe676bbd619f37d147c86651f6f30a67fb9b.tar.gz
gnupg-9390fe676bbd619f37d147c86651f6f30a67fb9b.zip
* keylist.c (list_one): Don't show the keyring filename when in
--with-colons mode. Actually translate "Keyring" string. * mainproc.c (proc_tree): We can't currently handle multiple signatures of different classes or digests (we'd pretty much have to run a different hash context for each), but if they are all the same, make an exception. This is Debian bug #194292. * sig-check.c (check_key_signature2): Make string translatable. * packet.h, getkey.c (fixup_uidnode): Mark real primary uids differently than assumed primaries. * keyedit.c (no_primary_warning): Use the differently marked primaries here in a new function to warn when an --edit-key command might rearrange the self-sig dates enough to change which uid is primary. (menu_expire, menu_set_preferences): Use no_primary_warning() here. * Makefile.am: Use @DLLIBS@ for -ldl.
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r--g10/mainproc.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index a801f5ea9..b1158a5b0 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -1625,6 +1625,30 @@ proc_tree( CTX c, KBNODE node )
}
else if( node->pkt->pkttype == PKT_SIGNATURE ) {
PKT_signature *sig = node->pkt->pkt.signature;
+ int multiple_ok=1;
+
+ n1=find_next_kbnode(node, PKT_SIGNATURE);
+ if(n1)
+ {
+ byte class=sig->sig_class;
+ byte hash=sig->digest_algo;
+
+ for(; n1; (n1 = find_next_kbnode(n1, PKT_SIGNATURE)))
+ {
+ /* We can't currently handle multiple signatures of
+ different classes or digests (we'd pretty much have
+ to run a different hash context for each), but if
+ they are all the same, make an exception. */
+ if(n1->pkt->pkt.signature->sig_class!=class
+ || n1->pkt->pkt.signature->digest_algo!=hash)
+ {
+ multiple_ok=0;
+ log_info(_("WARNING: multiple signatures detected. "
+ "Only the first will be checked.\n"));
+ break;
+ }
+ }
+ }
if( sig->sig_class != 0x00 && sig->sig_class != 0x01 )
log_info(_("standalone signature of class 0x%02x\n"),
@@ -1686,8 +1710,11 @@ proc_tree( CTX c, KBNODE node )
else if (!opt.quiet)
log_info(_("old style (PGP 2.x) signature\n"));
- for( n1 = node; n1; (n1 = find_next_kbnode(n1, PKT_SIGNATURE )) )
+ if(multiple_ok)
+ for( n1 = node; n1; (n1 = find_next_kbnode(n1, PKT_SIGNATURE )) )
check_sig_and_print( c, n1 );
+ else
+ check_sig_and_print( c, node );
}
else {
dump_kbnode (c->list);