diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-01-03 11:44:34 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-01-03 11:49:20 +0200 |
commit | c2cbf4e863a8f3a5081357d4b48f54cec2cd5d69 (patch) | |
tree | 93711f398c585fcc8ac0b19bbcfe15b79f4c6b73 /src/gpg.c | |
parent | a2489ce17e9c9a03b649d5b63183d4f830c639a1 (diff) | |
download | wydawca-c2cbf4e863a8f3a5081357d4b48f54cec2cd5d69.tar.gz wydawca-c2cbf4e863a8f3a5081357d4b48f54cec2cd5d69.tar.bz2 |
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')
-rw-r--r-- | src/gpg.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -215,10 +215,8 @@ gpg_verify_signature (gpgme_ctx_t ctx, gpgme_signature_t sig, | |||
215 | } | 215 | } |
216 | 216 | ||
217 | /* Verify the directive file from TRP using public key PUBKEY */ | 217 | /* Verify the directive file from TRP using public key PUBKEY */ |
218 | /* FIXME: spool currently unused */ | ||
219 | int | 218 | int |
220 | verify_directive_signature (struct file_triplet *trp, | 219 | verify_directive_signature (struct file_triplet *trp) |
221 | const struct spool *spool) | ||
222 | { | 220 | { |
223 | gpgme_ctx_t ctx; | 221 | gpgme_ctx_t ctx; |
224 | gpgme_data_t key_data, directive_data, plain; | 222 | gpgme_data_t key_data, directive_data, plain; |
@@ -259,7 +257,7 @@ verify_directive_signature (struct file_triplet *trp, | |||
259 | if (!gpg_verify_signature (ctx, result->signatures, trp)) | 257 | if (!gpg_verify_signature (ctx, result->signatures, trp)) |
260 | { | 258 | { |
261 | UPDATE_STATS (STAT_BAD_SIGNATURE); | 259 | UPDATE_STATS (STAT_BAD_SIGNATURE); |
262 | notify (spool->notification, trp, ev_bad_directive_signature); | 260 | notify (trp->spool->notification, trp, ev_bad_directive_signature); |
263 | rc = 1; | 261 | rc = 1; |
264 | } | 262 | } |
265 | else | 263 | else |
@@ -283,11 +281,13 @@ verify_directive_signature (struct file_triplet *trp, | |||
283 | NOTE: It is assumed that the public key is already registered (by | 281 | NOTE: It is assumed that the public key is already registered (by |
284 | a previous call to verify_directive_signature). */ | 282 | a previous call to verify_directive_signature). */ |
285 | int | 283 | int |
286 | verify_detached_signature (struct file_triplet *trp, | 284 | verify_detached_signature (struct file_triplet *trp) |
287 | const struct spool *spool) | ||
288 | { | 285 | { |
289 | gpgme_engine_info_t info; | 286 | gpgme_engine_info_t info; |
290 | const char *argv[5]; | 287 | const char *argv[5]; |
288 | const struct spool *spool; | ||
289 | |||
290 | ASGN_SPOOL (spool, trp, return 1); | ||
291 | 291 | ||
292 | fail_if_err (gpgme_get_engine_info (&info)); | 292 | fail_if_err (gpgme_get_engine_info (&info)); |
293 | while (info && info->protocol != GPGME_PROTOCOL_OpenPGP) | 293 | while (info && info->protocol != GPGME_PROTOCOL_OpenPGP) |