path: root/src/gpg.c
authorSergey Poznyakoff <>2010-01-03 09:44:34 (GMT)
committer Sergey Poznyakoff <>2010-01-03 09:49:20 (GMT)
commitc2cbf4e863a8f3a5081357d4b48f54cec2cd5d69 (patch) (side-by-side diff)
tree93711f398c585fcc8ac0b19bbcfe15b79f4c6b73 /src/gpg.c
parenta2489ce17e9c9a03b649d5b63183d4f830c639a1 (diff)
Do not pass spool as a separate parameter, register it early in the triplet.
* src/directive.c (process_directives): Remove spool parameter. * src/gpg.c (verify_directive_signature) (verify_detached_signature): Remove spool parameter. * src/process.c (scan_spool_unlocked): Update call to register_file. * src/triplet.c (register_file): Take spool ptr as second argument. (triplet_processor): Ignore proc_data. (enumerate_triplets): Pass NULL as proc_data. * src/verify.c (verify_directive_file): Remove spool parameter. * src/wydawca.h (ASGN_SPOOL): New macro. (register_file, verify_directive_file) (verify_directive_signature, verify_detached_signature) (process_directives): Remove spool parameter. * src/getopt.m4 (print_help): Minor fix.
Diffstat (limited to 'src/gpg.c') (more/less context) (show whitespace changes)
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpg.c b/src/gpg.c
index cca5048..979d0c0 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -215,10 +215,8 @@ gpg_verify_signature (gpgme_ctx_t ctx, gpgme_signature_t sig,
/* Verify the directive file from TRP using public key PUBKEY */
-/* FIXME: spool currently unused */
-verify_directive_signature (struct file_triplet *trp,
- const struct spool *spool)
+verify_directive_signature (struct file_triplet *trp)
gpgme_ctx_t ctx;
gpgme_data_t key_data, directive_data, plain;
@@ -259,7 +257,7 @@ verify_directive_signature (struct file_triplet *trp,
if (!gpg_verify_signature (ctx, result->signatures, trp))
- notify (spool->notification, trp, ev_bad_directive_signature);
+ notify (trp->spool->notification, trp, ev_bad_directive_signature);
rc = 1;
@@ -283,11 +281,13 @@ 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). */
-verify_detached_signature (struct file_triplet *trp,
- const struct spool *spool)
+verify_detached_signature (struct file_triplet *trp)
gpgme_engine_info_t info;
const char *argv[5];
+ const struct spool *spool;
+ ASGN_SPOOL (spool, trp, return 1);
fail_if_err (gpgme_get_engine_info (&info));
while (info && info->protocol != GPGME_PROTOCOL_OpenPGP)

Return to:

Send suggestions and report system problems to the System administrator.