diff options
| author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2017-10-20 22:25:41 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-10-21 19:53:19 -0300 |
| commit | 4dfcc8c9b2e1dbb965f69283dca50c7581c88050 (patch) | |
| tree | a71299b29a8d154d25c6e1b57688e82eafd1bb0f /lib/message.cc | |
| parent | 0bb05ff693737c5b91d6a64f6209984a6c418c46 (diff) | |
crypto: index encrypted parts when indexopts try_decrypt is set.
If we see index options that ask us to decrypt when indexing a
message, and we encounter an encrypted part, we'll try to descend into
it.
If we can decrypt, we add the property index.decryption=success.
If we can't decrypt (or recognize the encrypted type of mail), we add
the property index.decryption=failure.
Note that a single message may have both values of the
"index.decryption" property: "success" and "failure". For example,
consider a message that includes multiple layers of encryption. If we
manage to decrypt the outer layer ("index.decryption=success"), but
fail on the inner layer ("index.decryption=failure").
Because of the property name, this will be automatically cleared (and
possibly re-set) during re-indexing. This means it will subsequently
correspond to the actual semantics of the stored index.
Diffstat (limited to 'lib/message.cc')
| -rw-r--r-- | lib/message.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/message.cc b/lib/message.cc index e819f27a..12743460 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1961,7 +1961,7 @@ _notmuch_message_frozen (notmuch_message_t *message) notmuch_status_t notmuch_message_reindex (notmuch_message_t *message, - notmuch_indexopts_t unused (*indexopts)) + notmuch_indexopts_t *indexopts) { notmuch_database_t *notmuch = NULL; notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS; @@ -2042,7 +2042,7 @@ notmuch_message_reindex (notmuch_message_t *message, if (found == 0) _notmuch_message_set_header_values (message, date, from, subject); - ret = _notmuch_message_index_file (message, message_file); + ret = _notmuch_message_index_file (message, indexopts, message_file); if (ret == NOTMUCH_STATUS_FILE_ERROR) continue; |
