crypto: add --decrypt=nostash to avoid stashing session keys
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 8 Dec 2017 06:24:02 +0000 (01:24 -0500)
committerDavid Bremner <david@tethera.net>
Fri, 8 Dec 2017 12:08:47 +0000 (08:08 -0400)
commitfccebbaeef1e4b6489425afb13f419543d53d285
treeca92f729931994c2fd6f290c25092b35618cd9c9
parent29648a137c5807135ab168917b4a51d5e19e51c2
crypto: add --decrypt=nostash to avoid stashing session keys

Here's the configuration choice for people who want a cleartext index,
but don't want stashed session keys.

Interestingly, this "nostash" decryption policy is actually the same
policy that should be used by "notmuch show" and "notmuch reply",
since they never modify the index or database when they are invoked
with --decrypt.

We take advantage of this parallel to tune the behavior of those
programs so that we're not requesting session keys from GnuPG during
"show" and "reply" that we would then otherwise just throw away.
12 files changed:
completion/notmuch-completion.bash
doc/man1/notmuch-config.rst
doc/man1/notmuch-insert.rst
doc/man1/notmuch-new.rst
doc/man1/notmuch-reindex.rst
lib/indexopts.c
lib/notmuch.h
notmuch-reply.c
notmuch-show.c
notmuch.c
test/T357-index-decryption.sh
util/crypto.c