aboutsummaryrefslogtreecommitdiff
path: root/src/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpg.c')
-rw-r--r--src/gpg.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/gpg.c b/src/gpg.c
index 3372c7b..eb2a64a 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -224,20 +224,22 @@ verify_directive_signature (struct file_triplet *trp,
{
gpgme_verify_result_t result;
+ size = gpgme_data_seek (plain, 0, SEEK_END);
+ gpgme_data_seek (plain, 0, SEEK_SET);
+ trp->blurb = xmalloc (size + 1);
+ gpgme_data_read (plain, trp->blurb, size);
+ trp->blurb[size] = 0;
+ gpgme_data_release (plain);
+
+ rc = directive_parse (trp);
+
result = gpgme_op_verify_result (ctx);
- if (gpg_sig_ok_p (ctx, result->signatures))
+ if (!gpg_sig_ok_p (ctx, result->signatures))
{
- size = gpgme_data_seek (plain, 0, SEEK_END);
- gpgme_data_seek (plain, 0, SEEK_SET);
- trp->blurb = xmalloc (size + 1);
- gpgme_data_read (plain, trp->blurb, size);
- trp->blurb[size] = 0;
- gpgme_data_release (plain);
-
- rc = directive_parse (trp);
+ UPDATE_STATS (STAT_BAD_SIGNATURE);
+ notify (trp, ev_bad_directive_signature);
+ rc = 1;
}
- else
- rc = 1;
}
else
{
@@ -245,7 +247,6 @@ verify_directive_signature (struct file_triplet *trp,
UPDATE_STATS (STAT_BAD_SIGNATURE);
logmsg (LOG_ERR, "%s: directive verification failed: %s",
trp->name, gpgme_strerror (ec));
- /* FIXME: Send mail to the project maintainer */
}
gpgme_data_release (directive_data);
@@ -292,6 +293,7 @@ verify_detached_signature (struct file_triplet *trp,
case exec_fail:
UPDATE_STATS (STAT_BAD_SIGNATURE);
logmsg (LOG_ERR, "BAD detached signature for %s", trp->name);
+ notify (trp, ev_bad_detached_signature);
break;
case exec_error:

Return to:

Send suggestions and report system problems to the System administrator.