[PATCH v3 6/8] cli/show: reindex when we learned new session keys about a message

David Bremner david at tethera.net
Tue May 22 18:37:25 PDT 2018


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

> +
> +    if (params->crypto.decrypt == NOTMUCH_DECRYPT_TRUE && session_key_count_error == NOTMUCH_STATUS_SUCCESS) {
> +	unsigned int new_session_keys = 0;
> +	if (notmuch_message_count_properties (message, "session-key", &new_session_keys) == NOTMUCH_STATUS_SUCCESS &&
> +	    new_session_keys > session_keys) {
> +	    /* try a quiet re-indexing */
> +	    notmuch_indexopts_t *indexopts = notmuch_database_get_default_indexopts (notmuch_message_get_database (message));
> +	    if (indexopts) {
> +		notmuch_indexopts_set_decrypt_policy (indexopts, NOTMUCH_DECRYPT_AUTO);
> +		print_status_message ("Error re-indexing message with --decrypt=stash",
> +				      message, notmuch_message_reindex (message, indexopts));
> +	    }
> +	}
> +    }

This message is just to remind me to #if guard this block when applying
the patch.

d


More information about the notmuch mailing list