aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-10-08 14:14:17 +0000
committerWerner Koch <[email protected]>2018-10-22 17:27:24 +0000
commitb0d6e26bf3c8decaa568c9e4a5b2451d9af0b25b (patch)
treeb6625ae9ba6a209b8db672dd26ab3c4bafd69440
parentscd: Fix signing authentication status. (diff)
downloadgnupg-b0d6e26bf3c8decaa568c9e4a5b2451d9af0b25b.tar.gz
gnupg-b0d6e26bf3c8decaa568c9e4a5b2451d9af0b25b.zip
gpg: Fix extra check for sign usage of a data signature.
* g10/sig-check.c (check_signature_end_simple): -- Obviously we should not ignore a back signature here. Fixes-commit: 214b0077264e35c079e854a8b6374704aea45cd5 GnuPG-bug-id: 4014 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit b6275f3bda8edff34274c5b921508567f491ab9c)
-rw-r--r--g10/sig-check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/sig-check.c b/g10/sig-check.c
index e59e0c900..a93b496a8 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -481,7 +481,8 @@ check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig,
}
/* For data signatures check that the key has sign usage. */
- if (IS_SIG (sig) && !(pk->pubkey_usage & PUBKEY_USAGE_SIG))
+ if (!IS_BACK_SIG (sig) && IS_SIG (sig)
+ && !(pk->pubkey_usage & PUBKEY_USAGE_SIG))
{
rc = gpg_error (GPG_ERR_WRONG_KEY_USAGE);
if (!opt.quiet)