aboutsummaryrefslogtreecommitdiff
path: root/notmuch.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-12-08 01:23:53 -0500
committerDavid Bremner <david@tethera.net>2017-12-08 08:07:53 -0400
commite4890b5bf9e2260b36bcc36ddb77d8e97e2abe7d (patch)
tree83c71b87a02c656aee698a5e10700a4ff6e12419 /notmuch.c
parent798aa789b5d117cf11697bc97dd982bd5a2c2ac8 (diff)
crypto: new decryption policy "auto"
This new automatic decryption policy should make it possible to decrypt messages that we have stashed session keys for, without incurring a call to the user's asymmetric keys.
Diffstat (limited to 'notmuch.c')
-rw-r--r--notmuch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch.c b/notmuch.c
index 7d5eeae4..1d283e26 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -103,6 +103,7 @@ const notmuch_opt_desc_t notmuch_shared_indexing_options [] = {
.present = &indexing_cli_choices.decrypt_policy_set, .keywords =
(notmuch_keyword_t []){ { "false", NOTMUCH_DECRYPT_FALSE },
{ "true", NOTMUCH_DECRYPT_TRUE },
+ { "auto", NOTMUCH_DECRYPT_AUTO },
{ 0, 0 } },
.name = "decrypt" },
{ }
@@ -128,7 +129,7 @@ notmuch_process_shared_indexing_options (notmuch_database_t *notmuch, g_mime_3_u
}
}
#if (GMIME_MAJOR_VERSION < 3)
- if (indexing_cli_choices.opts && notmuch_indexopts_get_decrypt_policy (indexing_cli_choices.opts) == NOTMUCH_DECRYPT_TRUE) {
+ if (indexing_cli_choices.opts && notmuch_indexopts_get_decrypt_policy (indexing_cli_choices.opts) != NOTMUCH_DECRYPT_FALSE) {
const char* gpg_path = notmuch_config_get_crypto_gpg_path (config);
if (gpg_path && strcmp(gpg_path, "gpg"))
fprintf (stderr, "Warning: deprecated crypto.gpg_path is set to '%s'\n"