notmuch/lib
Daniel Kahn Gillmor a990585408 crypto: use stashed session-key properties for decryption, if available
When doing any decryption, if the notmuch database knows of any
session keys associated with the message in question, try them before
defaulting to using default symmetric crypto.

This changeset does the primary work in _notmuch_crypto_decrypt, which
grows some new parameters to handle it.

The primary advantage this patch offers is a significant speedup when
rendering large encrypted threads ("notmuch show") if session keys
happen to be cached.

Additionally, it permits message composition without access to
asymmetric secret keys ("notmuch reply"); and it permits recovering a
cleartext index when reindexing after a "notmuch restore" for those
messages that already have a session key stored.

Note that we may try multiple decryptions here (e.g. if there are
multiple session keys in the database), but we will ignore and throw
away all the GMime errors except for those that come from last
decryption attempt.  Since we don't necessarily know at the time of
the decryption that this *is* the last decryption attempt, we'll ask
for the errors each time anyway.

This does nothing if no session keys are stashed in the database,
which is fine.  Actually stashing session keys in the database will
come as a subsequent patch.
2017-12-04 21:48:31 -04:00
..
add-message.cc crypto: index encrypted parts when indexopts try_decrypt is set. 2017-10-21 19:53:19 -03:00
built-with.c configure: session key handling in gmime maps to built_with("session_key") 2017-12-04 21:39:50 -04:00
config.cc lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
database-private.h lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
database.cc crypto: make shared crypto code behave library-like 2017-10-20 07:58:20 -03:00
directory.cc lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
filenames.c lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
index.cc crypto: use stashed session-key properties for decryption, if available 2017-12-04 21:48:31 -04:00
indexopts.c config: define new option index.try_decrypt 2017-10-21 19:54:33 -03:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local build: fix out-of-tree builds, again 2017-09-13 08:48:17 -03:00
message-file.c lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
message-id.c lib: factor out message-id parsing to separate file. 2017-08-01 21:17:47 -04:00
message-private.h lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
message-property.cc properties: add notmuch_message_remove_all_properties_with_prefix() 2017-10-20 07:58:43 -03:00
message.cc crypto: index encrypted parts when indexopts try_decrypt is set. 2017-10-21 19:53:19 -03:00
messages.c lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
notmuch-private.h crypto: index encrypted parts when indexopts try_decrypt is set. 2017-10-21 19:53:19 -03:00
notmuch.h reindex: drop all properties named with prefix "index." 2017-10-21 19:53:08 -03:00
notmuch.sym build: switch to hiding libnotmuch symbols by default 2017-05-12 07:17:18 -03:00
parse-time-vrp.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
parse-time-vrp.h Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query-fp.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query-fp.h Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query.cc lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
regexp-fields.cc lib: Add regexp expansion for for tags and paths 2017-05-09 07:44:29 -03:00
regexp-fields.h lib: Add regexp searching for mid: prefix 2017-05-09 07:44:15 -03:00
sha1.c lib: use glib for sha1 digests instead of embedding libsha1 2017-01-08 10:50:38 -04:00
string-list.c lib: add notmuch_message_count_files 2017-08-01 21:17:47 -04:00
string-map.c lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
tags.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
thread.cc lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00