[Pkg-gnupg-commit] [gnupg2] 72/205: gpg: Show debugging info if a sig with an unsupported sig class is used.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 11 08:38:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 87515e39295e4b7eaec1641c38e1ac32e8d39a91
Author: Neal H. Walfield <neal at g10code.com>
Date:   Thu Feb 25 21:22:55 2016 +0100

    gpg: Show debugging info if a sig with an unsupported sig class is used.
    
    * g10/sig-check.c (check_key_signature2): If SIG->CLASS is
    unsupported, show some debugging information.  Don't use BUG to fail.
    Just return GPG_ERR_BAD_SIGNATURE.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
---
 g10/sig-check.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/g10/sig-check.c b/g10/sig-check.c
index 4530a64..087222a 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -1086,7 +1086,12 @@ check_key_signature2 (kbnode_t root, kbnode_t node, PKT_public_key *check_pk,
 	  }
       }
   else
-      BUG ();
+    {
+      log_info ("sig issued by %s with class %d (digest: %x %x) is not valid over a user id or a key id, ignoring.\n",
+                keystr (sig->keyid), sig->sig_class,
+                sig->digest_start[0], sig->digest_start[1]);
+      rc = gpg_error (GPG_ERR_BAD_SIGNATURE);
+    }
 
   cache_sig_result  (sig, rc);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list