diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-12-08 22:08:36 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-12-08 22:11:04 +0200 |
commit | 67ca2ef061a73bc90e4399471ee0cb3ce6f0ee41 (patch) | |
tree | d45493df75f3f613ca6b3d13a7f5d7a0280650a6 /src/config.c | |
parent | e1afd42340c0b2c22660744e0f88258a44617e88 (diff) | |
download | wydawca-67ca2ef061a73bc90e4399471ee0cb3ce6f0ee41.tar.gz wydawca-67ca2ef061a73bc90e4399471ee0cb3ce6f0ee41.tar.bz2 |
Implement GPG signing of the outgoing notifications.
* src/config.c (mail_statistics_kw): New keyword gpg-sign.
(notify_event_kw): Likewise.
(wydawca_kw): New keyword gpg-homedir.
* src/gpg.c (wydawca_gpg_homedir): Rename to
create_gpg_homedir. Make static.
All uses updated.
* src/mail.c (admin_stat_sign_key): New global.
(mu_stream_data_read_cb)
(gpg_sign, sign_message): New functions.
(mail_send_message): Take 3rd argument: ID of
the PGP key to sign the message with.
All callers updated.
(do_notify): Rewrite.
* src/wydawca.c (wydawca_gpg_homedir): New variable.
* src/wydawca.h (struct notification): New member
sign_keys.
(admin_stat_sign_key): New extern.
(wydawca_gpg_homedir): New extern.
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 559f766..f0a7042 100644 --- a/src/config.c +++ b/src/config.c @@ -860,12 +860,15 @@ cb_archive (enum grecs_callback_command cmd, static struct grecs_keyword mail_statistics_kw[] = { { "message", N_("text"), N_("Message text"), grecs_type_string, &admin_stat_message }, { "statistics", N_("items"), N_("Send mail if one or more of these items are set"), grecs_type_string, &mail_admin_mask, 0, cb_statistics }, + { "gpg-sign", + N_("key"), N_("Sign message with this key"), + grecs_type_string, &admin_stat_sign_key }, { NULL } }; static int @@ -904,12 +907,15 @@ static struct grecs_keyword notify_event_kw[] = { { "recipient", N_("who"), N_("Notify this recipient"), grecs_type_string, NULL, offsetof(struct notification, tgt), cb_recipient }, { "message", N_("text-or-id"), N_("Text of the notification or identifier of a defined message template"), grecs_type_string, NULL, offsetof(struct notification, msg) }, + { "gpg-sign", N_("key"), + N_("Sign message with this key"), + grecs_type_string, NULL, offsetof(struct notification, sign_keys) }, { NULL } }; static int cb_notify_event (enum grecs_callback_command cmd, grecs_locus_t *locus, @@ -1453,12 +1459,15 @@ static struct grecs_keyword wydawca_kw[] = { { "spool", N_("tag: string"), N_("Define distribution spool"), grecs_type_section, NULL, 0, cb_spool, NULL, spool_kw }, { "all-spools", NULL, N_("Service names that request scanning all spools"), grecs_type_string|GRECS_LIST, &all_spool_aliases }, + + { "gpg-homedir", NULL, N_("GPG home directory"), + grecs_type_string, &wydawca_gpg_homedir }, { NULL } }; void config_help () |