<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/mime-node.c, branch 0.28.2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.28.2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.28.2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2018-05-26T14:33:01Z</updated>
<entry>
<title>cli: write session keys to database, if asked to do so</title>
<updated>2018-05-26T14:33:01Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-05-11T06:57:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bc842bfff12998a9b1a30b880cf8c6612f727d45'/>
<id>urn:sha1:bc842bfff12998a9b1a30b880cf8c6612f727d45</id>
<content type='text'>
If the decryption policy is NOTMUCH_DECRYPT_TRUE, that means we want
to stash session keys in the database.  Note that there is currently
no way from the command line to set it this way, though, so it is not
yet included in the test suite.
</content>
</entry>
<entry>
<title>crypto: record whether an actual decryption attempt happened</title>
<updated>2017-12-08T12:08:46Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-12-08T06:23:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d137170b23f8ccd9f967445e101d6f694df1cad4'/>
<id>urn:sha1:d137170b23f8ccd9f967445e101d6f694df1cad4</id>
<content type='text'>
In our consolidation of _notmuch_crypto_decrypt, the callers lost
track a little bit of whether any actual decryption was attempted.

Now that we have the more-subtle "auto" policy, it's possible that
_notmuch_crypto_decrypt could be called without having any actual
decryption take place.

This change lets the callers be a little bit smarter about whether or
not any decryption was actually attempted.
</content>
</entry>
<entry>
<title>crypto: new decryption policy "auto"</title>
<updated>2017-12-08T12:07:53Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-12-08T06:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e4890b5bf9e2260b36bcc36ddb77d8e97e2abe7d'/>
<id>urn:sha1:e4890b5bf9e2260b36bcc36ddb77d8e97e2abe7d</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>lib: convert notmuch decryption policy to an enum</title>
<updated>2017-12-08T12:07:02Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-12-08T06:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=798aa789b5d117cf11697bc97dd982bd5a2c2ac8'/>
<id>urn:sha1:798aa789b5d117cf11697bc97dd982bd5a2c2ac8</id>
<content type='text'>
Future patches in this series will introduce new policies; this merely
readies the way for them.

We also convert --try-decrypt to a keyword argument instead of a boolean.
</content>
</entry>
<entry>
<title>crypto: use stashed session-key properties for decryption, if available</title>
<updated>2017-12-05T01:48:31Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-11-30T08:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a99058540823cd520cf2a5333e8ffe99799aa285'/>
<id>urn:sha1:a99058540823cd520cf2a5333e8ffe99799aa285</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>crypto: add _notmuch_crypto_decrypt wrapper function</title>
<updated>2017-12-05T01:39:24Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-11-30T08:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5f2832ae2171714dfef6d0d3302f473526480157'/>
<id>urn:sha1:5f2832ae2171714dfef6d0d3302f473526480157</id>
<content type='text'>
We will use this centralized function to consolidate the awkward
behavior around different gmime versions.

It's only invoked from two places: mime-node.c's
node_decrypt_and_verify() and lib/index.cc's
_index_encrypted_mime_part().

However, those two places have some markedly distinct logic, so the
interface for this _notmuch_crypto_decrypt function is going to get a
little bit clunky.  It's worthwhile, though, for the sake of keeping
these #if directives reasonably well-contained.
</content>
</entry>
<entry>
<title>mime-node: handle decrypt_result more safely</title>
<updated>2017-12-05T01:39:13Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-11-30T08:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9beda4b9811323d1fd9eb120d6e7a2ef69beed14'/>
<id>urn:sha1:9beda4b9811323d1fd9eb120d6e7a2ef69beed14</id>
<content type='text'>
If (for whatever reason) we don't get a decrypt_result back, or it's
not structured the way we expect it to be, we shouldn't choke on it.
</content>
</entry>
<entry>
<title>Merge branch 'release'</title>
<updated>2017-11-06T00:25:54Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-11-06T00:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7ac96b149f5a0e5c03b64856d7c20789dab3c628'/>
<id>urn:sha1:7ac96b149f5a0e5c03b64856d7c20789dab3c628</id>
<content type='text'>
Changes from 0.25.2 release
</content>
</entry>
<entry>
<title>cli/crypto: fix segfault on failed gmime2 crypto context creation</title>
<updated>2017-11-05T19:41:13Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-16T15:40:44Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=cd3f5e1a934b9952ca718e0c5bc1471b3884020c'/>
<id>urn:sha1:cd3f5e1a934b9952ca718e0c5bc1471b3884020c</id>
<content type='text'>
Commit 1fdc08d0ffab ("cli/crypto: treat failure to create a crypto
context as fatal.") started treating crypto context creation failures
"as fatal", returning NULL from _mime_node_create().

Unfortunately, we do not have NULL checks for _mime_node_create()
failures. The only caller, mime_node_child(), could check and return
NULL (as it's documented to do on errors) but none of the several call
sites have NULL checks either. And none of them really have a trivial
but feasible and graceful way of recovery.

So while the right thing to do would be to handle NULL returns
properly all over the place, and we have other scenarios that do
return NULL from above mentioned functions, the crypto context
creation failure is something that does seem to show up regularly in
some scenarios, revert back to the functionality before commit
1fdc08d0ffab as an interim fix.
</content>
</entry>
<entry>
<title>crypto: make shared crypto code behave library-like</title>
<updated>2017-10-20T10:58:20Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-10-17T19:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a18bbf7f155369f251b0513788eade23be3555d5'/>
<id>urn:sha1:a18bbf7f155369f251b0513788eade23be3555d5</id>
<content type='text'>
If we're going to reuse the crypto code across both the library and
the client, then it needs to report error states properly and not
write to stderr.
</content>
</entry>
</feed>
