summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-06debian: changelog stanza for 0.30~rc1-1debian/0.30_rc1-1archive/debian/0.30_rc1-10.30_rc1David Bremner
2020-06-06version: bump to 0.30~rc1David Bremner
2020-06-06emacs docstrings: consistent indentation, newlines, periodsTomi Ollila
Fixed emacs docstrings to be consistent. No functional change. - removed some (accidental) indentation - removed some trailing newlines - added trailing periods where missing (some exclusions)
2020-06-06doc: field processor support now always included, adjust manual pagesTomi Ollila
The features that require field processor support, are now just documented w/o mentioning **Xapian Field Processors**' is needed for those. Replaced "compact" and "field_processor" with "retry_lock" in build_with config option, as it is currently the only one that is optionally excluded. The former 2 are now documented as features always included. Dropped one 'we' "passive" in notmuch-search-terms.rst. It was the only one, and inconsistent with rest of the documentation in that file. Dropped message about conditional open-ended ranges support, as those are now always supported.
2020-06-06configure: require python 3.5 for CFFI-based notmuch bindingsTomi Ollila
Also tell users what the consequences of a "No" answer is when python version is less than 3.5, cffi or setuptools is missing, or no pytest >= 3.0 is available.
2020-06-05debian: update debian/copyrightDavid Bremner
This is based on the updated AUTHORS file.
2020-06-05doc: update AUTHORS fileDavid Bremner
I tried to be inclusive, and did not delete anyone from Carl's original file. I also reworded the acknowledgement of Google LLC.
2020-06-05devel: script to calculate a list of authors.David Bremner
As an initial heuristic, report anyone with at least 15 lines of code in the current source tree. Test corpora are excluded, although probabably this doesn't change much about the list of authors produced.
2020-06-05tweaks to NEWS suggest by TomiDavid Bremner
See id:m27dwp40sx.fsf@guru.guru-group.fi
2020-06-05NEWS: The minimum supported version of Xapian is now 1.4.0Tomi Ollila
2020-06-01add NEWS for 0.30Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-06-01debian: bump debian revisiondebian/0.30_rc0-2archive/debian/0.30_rc0-2David Bremner
second, with binaries upload
2020-06-01debian: Add build dependency on doxygendebian/0.30_rc0-1archive/debian/0.30_rc0-10.30_rc0David Bremner
2020-06-01debian: add desktop-file-utils dependencyDavid Bremner
This enables installation of notmuch-emacs-mua.desktop
2020-06-01NEWS: stub for 0.30David Bremner
2020-06-01debian: add changelog for release candidateDavid Bremner
2020-06-01version: bump to 0.30~rc0David Bremner
2020-06-01bump date in documentationDavid Bremner
2020-06-01doc: fix for out-of-tree builds of notmuch-emacs docsDavid Bremner
The sphinx-doc include directive does not have the ability to include files from the build tree, so we replace the include with reading the files in conf.py. The non-trivial downside of this is that the emacs docstrings are now defined for every rst source file. They are namespaced with docstring::, so hopefully there will not be any surprises. One thing that is noticable is a small (absolute) time penalty in running sphinx-doc.
2020-06-01configure: check existence of python3 setuptools and dev packageTomi Ollila
The notmuch2 CFFI-based Python interface is not buildable unless python3 dev package and python3 setuptools are installed. Check that these exist in configure (and disable notmuch2 bindings build if not) so that build of these bindings don't fail when make(1) is executed.
2020-06-01emacs: Respect `load-prefer-newer` when loading `notmuch-init-file'Sean Whitton
Before this change, `load-prefer-newer' was ignored. Set NOERROR and MUST-SUFFIX arguments of `load' to t, and NOSUFFIX argument to nil, to preserve the behaviour of the deleted `let' form.
2020-05-31tests/ruby: Ensure that test works for out-of-tree buildsDaniel Kahn Gillmor
2020-05-30python-cffi: enable out-of-tree buildsDaniel Kahn Gillmor
This is a simple hack to enable out-of-tree builds, a concern raised by Tomi in id:m24kzjib9a.fsf@guru.guru-group.fi This change at least enables "make check" to complete without error, but I'm sure it could be improved. I am not expert enough in setuptools to know how. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Amended by db per id:87d06usa31.fsf@powell.devork.be
2020-05-30test/test-lib.sh: fix two out of tree test issuesTomi Ollila
json_check_nodes.py exists in source tree, not in out of tree build tree. Added -B to the execution so source tree is not "polluted" by a .pyc file when json_check_nodes.py is executed. When creating run_emacs.sh make it load .elc files from out of tree build tree, not from source tree if such files existed. If existed, those may be outdated, or even created by some other emacs than the one that was used to build .elc files in out of tree build dir.
2020-05-26emacs: Use `dolist' instead of `mapcar' for side-effectsJonas Bernoulli
As recommended by the byte-compiler.
2020-05-22smime: Index cleartext of envelopedData when requestedDaniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22smime: Pass PKCS#7 envelopedData to node_decrypt_and_verifyDaniel Kahn Gillmor
This change means we can support "notmuch show --decrypt=true" for S/MIME encrypted messages, resolving several outstanding broken tests, including all the remaining S/MIME protected header examples. We do not yet handle indexing the cleartext of S/MIME encrypted messages, though. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22crypto: handle PKCS#7 envelopedData in _notmuch_crypto_decryptDaniel Kahn Gillmor
In the two places where _notmuch_crypto_decrypt handles multipart/encrypted messages (PGP/MIME), we should also handle PKCS#7 envelopedData (S/MIME). This is insufficient for fully handling S/MIME encrypted data because _notmuch_crypto_decrypt isn't yet actually invoked for envelopedData parts, but that will happen in the following changes. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22crypto: Make _notmuch_crypto_decrypt take a GMimeObjectDaniel Kahn Gillmor
As we prepare to handle S/MIME-encrypted PKCS#7 EnvelopedData (which is not multipart), we don't want to be limited to passing only GMimeMultipartEncrypted MIME parts to _notmuch_crypto_decrypt. There is no functional change here, just a matter of adjusting how we pass arguments internally. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22cli/reply: Ignore PKCS#7 wrapper parts when replyingDaniel Kahn Gillmor
When composing a reply, no one wants to see this line in the proposed message: Non-text part: application/pkcs7-mime So we hide it, the same way we hide PGP/MIME cruft. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22cli/show: If a leaf part has children, show them instead of omittingDaniel Kahn Gillmor
Until we did PKCS#7 unwrapping, no leaf MIME part could have a child. Now, we treat the unwrapped MIME part as the child of the PKCS#7 SignedData object. So in that case, we want to show it instead of deliberately omitting the content. This fixes the test of the protected subject in id:smime-onepart-signed@protected-headers.example. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22cli: include wrapped part of PKCS#7 SignedData in the MIME treeDaniel Kahn Gillmor
Unwrap a PKCS#7 SignedData part unconditionally when the cli is traversing the MIME tree, and return it as a "child" of what would otherwise be a leaf in the tree. Unfortunately, this also breaks the JSON output. We will fix that next. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22smime: Identify encrypted S/MIME parts during indexingDaniel Kahn Gillmor
We don't handle them correctly yet, but we can at least mark them as being encrypted. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22lib: index PKCS7 SignedData partsDaniel Kahn Gillmor
When we are indexing, we should treat SignedData parts the same way that we treat a multipart object, indexing the wrapped part as a distinct MIME object. Unfortunately, this means doing some sort of cryptographic verification whose results we throw away, because GMime doesn't offer us any way to unwrap without doing signature verification. I've opened https://github.com/jstedfast/gmime/issues/67 to request the capability from GMime but for now, we'll just accept the additional performance hit. As we do this indexing, we also apply the "signed" tag, by analogy with how we handle multipart/signed messages. These days, that kind of change should probably be done with a property instead, but that's a different set of changes. This one is just for consistency. Note that we are currently *only* handling signedData parts, which are basically clearsigned messages. PKCS#7 parts can also be envelopedData and authEnvelopedData (which are effectively encryption layers), and compressedData (which afaict isn't implemented anywhere, i've never encountered it). We're laying the groundwork for indexing these other S/MIME types here, but we're only dealing with signedData for now. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22configure: report GMime minimum version in ./configure outputDaniel Kahn Gillmor
We already report the minimum version for Glib, zlib, and Xapian development libraries. For consistency, report it for GMime as well. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-22smime: tests of X.509 certificate validity are known-broken on GMime < 3.2.7Daniel Kahn Gillmor
When checking cryptographic signatures, Notmuch relies on GMime to tell it whether the certificate that signs a message has a valid User ID or not. If the User ID is not valid, then notmuch does not report the signer's User ID to the user. This means that the consumer of notmuch's cryptographic summary of a message (or of its protected headers) can be confident in relaying the reported identity to the user. However, some versions of GMime before 3.2.7 cannot report Certificate validity for X.509 certificates. This is resolved upstream in GMime at https://github.com/jstedfast/gmime/pull/90. We adapt to this by marking tests of reported User IDs for S/MIME-signed messages as known-broken if GMime is older than 3.2.7 and has not been patched. If GMime >= 3.2.7 and certificate validity still doesn't work for X.509 certs, then there has likely been a regression in GMime and we should fail early, during ./configure. To break out these specific User ID checks from other checks, i had to split some tests into two parts, and reuse $output across the two subtests. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-09test-lib: mark function variables as localDaniel Kahn Gillmor
Several functions in test/test-lib.sh used variable names that are also used outside of those functions (e.g. $output and $expected are used in many of the test scripts), but they are not expected to communicate via those variables. We mark those variables "local" within test-lib.sh so that they do not get clobbered when used outside test-lib. We also move the local variable declarations to beginning of each function, to avoid weird gotchas with local variable declarations as described in https://tldp.org/LDP/abs/html/localvar.html. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-08notmuch(1): clarify documentation about --option/value separatorsDaniel Kahn Gillmor
id:CA+Tk8fzRiqxWpd=r8=DRvEewNZXUZgD7MKyRLB1A=R-LxxGEZw@mail.gmail.com started a thread of discussion that showed that the cli's current idiosyncrasies around dealing with boolean options were not understandable. This attempts to improve the documentation at least (actual changes to the API might be better, but have not reached consensus). Note that no one in the discussion thread identified any other (non-boolean) command-line options that cannot use space as a separator. If such an option is identified (or introduced in the future), it should be added explicitly to this part of the manual. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-05-04lib: replace STRNCMP_LITERAL in __message_remove_indexed_termsDavid Bremner
strncmp looks for a prefix that matches, which is very much not what we want here. This fixes the bug reported by Franz Fellner in id:1588595993-ner-8.651@TPL520
2020-05-04test: known broken test for reindex tag preservationDavid Bremner
In id:1588595993-ner-8.651@TPL520 Franz Fellner reported that tags starting with 'attachment' are removed by 'notmuch reindex'. This is probably related to the use of STRNCMP_LITERAL in _notmuch_message_remove_indexed_terms.
2020-04-30tests: disable CRL checks from gpgsmDaniel Kahn Gillmor
GPGME has a strange failure mode when it is in offline mode, and/or when certificates don't have any CRLs: in particular, it refuses to accept the validity of any certificate other than a "root" cert. This can be worked around by setting the `disable-crl-checks` configuration variable for gpgsm. I've reported this to the GPGME upstream at https://dev.gnupg.org/T4883, but I have no idea how it will be resolved. In the meantime, we'll just work around it. Note that this fixes the test for verification of id:smime-multipart-signed@protected-headers.example, because multipart/signed messages are already handled correctly (one-part PKCS#7 messages will get fixed later). Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30test/protected-headers: Add tests for S/MIME protected headersDaniel Kahn Gillmor
Recognize the protected subject for S/MIME example protected header messages. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30tests/smime: add tests for S/MIME SignedDataDaniel Kahn Gillmor
Add a simple S/MIME SignedData message, taken from an upcoming draft of https://datatracker.ietf.org/doc/draft-autocrypt-lamps-protected-headers/ RFC 8551 describes a SignedData, a one-part clearsigned object that is more resistant to common patterns of MTA message munging than multipart/signed (but has the downside that it is only readable by clients that implement S/MIME). To make sure sure notmuch can handle this kind of object, we want to know a few things: Already working: - Is the content of the SignedData object indexed? It actually is right now because of dumb luck -- i think we're indexing the raw CMS object and it happens to contain the cleartext of the message in a way that we can consume it before passing it on to Xapian. - Are we accidentally indexing the embedded PKCS#7 certificates? We don't want to, and for some reason I don't understand, our indexing is actually skipping the embedded certificates already. That's good! Still need fixing: - do we know the MIME type of the embedded part? - do we know that the message is signed? - can notmuch-show read its content? - can notmuch-show indicate the signature validity? - can notmuch-reply properly quote and attribute content? Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30test-lib.sh: add test_valid_jsonDaniel Kahn Gillmor
This test does exactly what it says on the tin. It expects JSON data to be parseable by Python, at least. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30tests/smime: Test indexing cleartext of envelopedDataDaniel Kahn Gillmor
These tests describe some simple behavior we would expect to work if we were to correctly index the cleartext of encrypted S/MIME messages (PKCS#7 envelopedData). Of course, they don't currently pass, so we mark them known-broken. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30tests/smime: Verify cryptographic message statusDaniel Kahn Gillmor
When consuming a signed+encrypted S/MIME message generated by emacs, we expect to see the same cryptographic properties for the message as a whole. This is not done correctly yet, so the test is marked as known broken. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30tests: Add S/MIME messages to protected-headers corpusDaniel Kahn Gillmor
These sample messages are taken directly from the Protected Headers draft: https://www.ietf.org/id/draft-autocrypt-lamps-protected-headers-02.html Note that this commit doesn't strictly pass the common git pre-commit hook due to introducing some trailing whitespace. That's just the nature of the corpus, though. We should have that trailing whitespace, so I've made this commit with --no-verify. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30tests/smime: include secret key material for BobDaniel Kahn Gillmor
This is taken from the same Internet Draft that test/smime/ca.crt comes from. See that draft for more details. https://www.ietf.org/id/draft-dkg-lamps-samples-02.html#name-pkcs12-object-for-bob We don't use it yet, but it will be used to decrypt other messages in the test suite. Note that we include it here with an empty passphrase, rather than with the passphrase "bob" that it is supplied with in the I-D. The underlying cryptographic material is the same, but this way we can import cleanly into gpgsm without having a passphrase set on it (gpgsm converts an empty-string passphrase into no passphrase at all on import). Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30test: Allow tests to have both gpg and gpgsm active at onceDaniel Kahn Gillmor
Without this fix, we couldn't run both add_gnupg_home and add_gpgsm_home in the same test script. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-04-30tests/smime: avoid copying the key+cert.pem aroundDaniel Kahn Gillmor
No functional change. We no longer need to identify the key and cert to mml-mode when sending an S/MIME message, so making a copy of key+cert.pem to test_suite.pem is superfluous. Get rid of the extra file. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>