summaryrefslogtreecommitdiffabout
path: root/src/gpg.c
authorSergey Poznyakoff <gray@gnu.org.ua>2013-03-12 13:03:59 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-03-12 13:22:13 (GMT)
commit1ba8cf95a5f536d4aa6293f9848271a7285bc092 (patch) (side-by-side diff)
treedede8a4bccb1daad8b67530d87845e7fe05749e6 /src/gpg.c
parent293108d7806aa3c0c5e706237b3788b261779e66 (diff)
downloadwydawca-1ba8cf95a5f536d4aa6293f9848271a7285bc092.tar.gz
wydawca-1ba8cf95a5f536d4aa6293f9848271a7285bc092.tar.bz2
Namespace normalization (2). Provide installable headers.
* Makefile.am (SUBDIRS): Add include. * configure.ac: Build include/*/Makefile Set-up grecs as a shared convenience library. Install its headers. * include/Makefile.am: New file. * include/wydawca/Makefile.am: New file. * include/wydawca/cfg.h: New file. * include/wydawca/wydawca.h: New file. * modules/mailutils/Makefile.am (AM_CPPFLAGS): Add include/ * src/Makefile.am (LDADD): Use @GRECS_LDADD@ (AM_CPPFLAGS): Add include/. * tests/Makefile.am: Likewise. * src/wydawca.h: Include wydawca/wydawca.h. (__cat2__, __cat3__): Move to installable header and rename. (struct wy_user): Move to installable header. (struct file_triplet): Rename to wy_triplet. All uses changed. (enum notification_event): Rename to wy_event and move to installable header. (struct metadef): Rename to wy_metadef and move to installable header. (dry_run_mode): Rename to wy_dry_run and move to installable header. (wydawca_gpg_homedir): Rename to wy_gpg_homedir and move to installable header. (wy_version, wy_debug_level, wy_log_to_stderr) (wy_log_facility, wy_syslog_tag) (wy_log,wy_dbg): Move to installable header. * modules/mailutils/mod_mailutils.c: Update. * src/cmdline.opt * src/config.c * src/directive.c * src/diskio.c * src/event.c * src/gpg.c * src/job.c * src/meta.c * src/module.c * src/null.c * src/timer.c * src/triplet.c * src/verify.c * src/vtab.c * src/watcher.c * src/wydawca.c
Diffstat (limited to 'src/gpg.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/gpg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpg.c b/src/gpg.c
index ca7c185..ff55619 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -134,7 +134,7 @@ create_gpg_homedir()
}
static int
-checksig(gpgme_signature_t sig, const char *uid, struct file_triplet *trp)
+checksig(gpgme_signature_t sig, const char *uid, struct wy_triplet *trp)
{
switch (gpg_err_code(sig->status)) {
case GPG_ERR_NO_ERROR:
@@ -184,7 +184,7 @@ checksig(gpgme_signature_t sig, const char *uid, struct file_triplet *trp)
static int
gpg_verify_signature(gpgme_ctx_t ctx, gpgme_signature_t sig,
- struct file_triplet *trp)
+ struct wy_triplet *trp)
{
if (!sig)
return 0;
@@ -208,7 +208,7 @@ gpg_verify_signature(gpgme_ctx_t ctx, gpgme_signature_t sig,
/* Verify the directive file from TRP using public key PUBKEY */
int
-verify_directive_signature(struct file_triplet *trp)
+verify_directive_signature(struct wy_triplet *trp)
{
gpgme_ctx_t ctx;
gpgme_data_t key_data, directive_data, plain = NULL;
@@ -219,7 +219,7 @@ verify_directive_signature(struct file_triplet *trp)
create_gpg_homedir();
fail_if_err(gpgme_new(&ctx));
- for (uptr = triplet_get_uploaders(trp); uptr; uptr = uptr->next) {
+ for (uptr = wy_triplet_get_uploaders(trp); uptr; uptr = uptr->next) {
gpgme_import_result_t res;
gpgme_import_status_t pstat;
@@ -246,7 +246,7 @@ verify_directive_signature(struct file_triplet *trp)
if (!gpg_verify_signature(ctx, result->signatures, trp)) {
UPDATE_STATS(STAT_BAD_SIGNATURE);
notify(trp->spool->notification, trp,
- ev_bad_directive_signature);
+ wy_ev_bad_directive_signature);
rc = 1;
} else
rc = 0;
@@ -269,7 +269,7 @@ verify_directive_signature(struct file_triplet *trp)
NOTE: It is assumed that the public key is already registered (by
a previous call to verify_directive_signature). */
int
-verify_detached_signature(struct file_triplet *trp)
+verify_detached_signature(struct wy_triplet *trp)
{
gpgme_engine_info_t info;
const char *argv[5];
@@ -302,7 +302,7 @@ verify_detached_signature(struct file_triplet *trp)
case exec_fail:
UPDATE_STATS(STAT_BAD_SIGNATURE);
wy_log(LOG_ERR, _("BAD detached signature for %s"), trp->name);
- notify(spool->notification, trp, ev_bad_detached_signature);
+ notify(spool->notification, trp, wy_ev_bad_detached_signature);
break;
case exec_error:

Return to:

Send suggestions and report system problems to the System administrator.