aboutsummaryrefslogtreecommitdiffstats
path: root/src/verify.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-02-03 12:08:39 +0000
committerWerner Koch <[email protected]>2017-02-03 12:08:39 +0000
commitafc308598d1ddaf20d54b4eab30b959066a4e5e6 (patch)
tree235b330901dbdd2b578ccb6052db023b3c3de944 /src/verify.c
parentqt: Add test for tofu conflict (diff)
downloadgpgme-afc308598d1ddaf20d54b4eab30b959066a4e5e6.tar.gz
gpgme-afc308598d1ddaf20d54b4eab30b959066a4e5e6.zip
core: Minor cleanup of commit 195c735
* src/verify.c (parse_tofu_user): For cleanness use gpg_error ... (_gpgme_verify_status_handler): ... and gpg_err_code. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/verify.c')
-rw-r--r--src/verify.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/verify.c b/src/verify.c
index 398cec57..900f925d 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -685,7 +685,7 @@ parse_tofu_user (gpgme_signature_t sig, char *args, gpgme_protocol_t protocol)
{
/* GnuPG since 2.1.17 emits multiple TOFU_USER lines with
different fingerprints in case of conflicts for a signature. */
- err = GPG_ERR_DUP_VALUE;
+ err = gpg_error (GPG_ERR_DUP_VALUE);
goto leave;
}
@@ -1003,13 +1003,13 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
return trace_gpg_error (GPG_ERR_INV_ENGINE);
err = parse_tofu_user (sig, args, ctx->protocol);
/* gpg emits TOFU User lines for each conflicting key.
- GPGME does not expose this to have a clean API and
- a GPGME user can do a keylisting with the address
- normalisation.
- So when a duplicated TOFU_USER line is encountered
- we ignore the conflicting tofu stats emited afterwards.
- */
- if (err == GPG_ERR_DUP_VALUE)
+ * GPGME does not expose this to have a clean API and
+ * a GPGME user can do a keylisting with the address
+ * normalisation.
+ * So when a duplicated TOFU_USER line is encountered
+ * we ignore the conflicting tofu stats emited afterwards.
+ */
+ if (gpg_err_code (err) == GPG_ERR_DUP_VALUE)
{
opd->conflict_user_seen = 1;
break;