diff options
author | Neal H. Walfield <neal@g10code.com> | 2016-02-25 21:22:55 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@g10code.com> | 2016-02-25 21:25:27 +0100 |
commit | 87515e39295e4b7eaec1641c38e1ac32e8d39a91 (patch) | |
tree | cbe651bf40c9d7715daf8b4b37052b3948758600 | |
parent | gpg: More carefully encode a packet's length. (diff) | |
download | gnupg2-87515e39295e4b7eaec1641c38e1ac32e8d39a91.tar.xz gnupg2-87515e39295e4b7eaec1641c38e1ac32e8d39a91.zip |
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@g10code.com>
-rw-r--r-- | g10/sig-check.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/g10/sig-check.c b/g10/sig-check.c index 4530a64c3..087222a7e 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); |