aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-14cli: run uncrustifyuncrustify
This is the result of running $ uncrustify --replace --config devel/uncrustify.cfg *.c *.h in the top level source directory
2019-06-14CLI: replace some constructs with more uncrustify friendly onesDavid Bremner
In particular - use (bool) instead of !! - cuddle the opening parens of function calls - add parens in some ternery operators
2019-06-14uncrustify: indent classesDavid Bremner
With previous settings member functions / variables are moved to column 0.
2019-06-14STYLE: document rules for calls, block comments, ternary opsDavid Bremner
2019-06-14cli: partial whitespace cleanup in notmuch-config.cDavid Bremner
This avoids spurious tab to space conversion by uncrustify
2019-06-12build: drop variable HAVE_EMACS. use WITH_EMACS insteadDavid Bremner
The extra flexibility of having both HAVE_EMACS (for yes, there is an emacs we can use) and WITH_EMACS (the user wants emacs support) lead to confusion and bugs. We now just force WITH_EMACS to 0 if no suitable emacs is detected.
2019-06-11Merge branch 'release'David Bremner
2019-06-11debian: changelog for 0.29.1-1debian/0.29.1-1archive/debian/0.29.1-10.29.1David Bremner
2019-06-11NEWS: news for 0.29.1David Bremner
2019-06-11version: bump to 0.29.1David Bremner
2019-06-11append _unused to the expression defined using unused() macroTomi Ollila
This way if variables defined using unused() macro are actually used then code will not compile... - removed unused usage around one argc and one argv since those were used - changed one unused (char *argv[]) to unused (char **argv) to work with modified unused() macro definition
2019-06-11debian: Add appropriate substitution variables to debian/controlDaniel Kahn Gillmor
Without this change, dh_gencontrol emits: dpkg-gencontrol: warning: package python-notmuch: substitution variable ${python:Provides} unused, but is defined dpkg-gencontrol: warning: package python-notmuch: substitution variable ${python:Versions} unused, but is defined dpkg-gencontrol: warning: package notmuch-mutt: substitution variable ${perl:Depends} unused, but is defined Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-06-11debian: bump Standards-Version to 4.3.0 (no changes needed)Daniel Kahn Gillmor
/usr/share/doc/debian-policy/upgrading-checklist.txt.gz suggests that notmuch is already compliant with debian-policy 4.3.0. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthorseman.net>
2019-06-11fix misspellingDaniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-06-11debian: enable build hardening featuresDaniel Kahn Gillmor
Debian's build hardening toolchain options produce binary artifacts that are more resistant to compromise. The most visible change for notmuch today is likely to be the addition of the "bindnow" linker flag, which contributes to making the "Global Offset Table" fully read-only. See https://wiki.debian.org/Hardening for more details. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-06-11test: aggregate-results.sh: consistent style. zero forks.Tomi Ollila
- all variables in $((...)) without leading $ - all comparisons use -gt, -eq or -ne - no -a nor -o inside [ ... ] expressions - all indentation levels using one tab Dropped unnecessary empty string check when reading results files. Replaced pluralize() which was executed in subshell with pluralize_s(). pluralize_s sets $s to 's' or '' based on value of $1. Calls to pluralize_s are done in context of current shell, so no forks to subshells executed.
2019-06-10doc: Don't install emacs docs when they are not builtDavid Bremner
In 40b025 we stopped building the notmuch-emacs documentation if HAVE_EMACS=0 (i.e. no emacs was detected by configure). Unfortunately we continued to try to install the (non-existent) documentation, which causes build/install failures. As a bonus, we also avoid installing the documentation if the user configures --without-emacs. Thanks to Ralph Seichter for reporting the problem, and testing previous versions of this fix.
2019-06-10doc: don't build notmuch-emacs.info for configure --without-emacsDavid Bremner
Since the docstrings are not built in the case of --without-emacs, even if emacs is detected, don't let sphinx build the emacs docs. This avoids a large number of error messages due to missing includes. It's actually a bit surprising sphinx doesn't generate an error for the missing include files.
2019-06-08test: signature verification during decryption (session keys)Daniel Kahn Gillmor
When the user knows the signer's key, we want "notmuch show" to be able to verify the signature of an encrypted and signed message regardless of whether we are using a stashed session key or not. I wrote this test because I was surprised to see signature verification failing when viewing some encrypted messages after upgrading to GPGME 1.13.0-1 in debian experimental. The added tests here all pass with GPGME 1.12.0, but the final test fails with 1.13.0, due to some buggy updates to GPGME upstream: see https://dev.gnupg.org/T3464 for more details. While the bug needs to be fixed in GPGME, notmuch's test suite needs to make sure that GMime is doing what we expect it to do; i was a bit surprised that it hadn't caught the problem, hence this patch. I've fixed this bug in debian experimental with gpgme 1.13.0-2, so the tests should pass on any debian system. I've also fixed it in the gpgme packages (1.13.0-2~ppa1) in the ubuntu xenial PPA (ppa:notmuch/notmuch) that notmuch uses for Travis CI. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-06-07perf-tests: #!/bin/bash -> #!/usr/bin/env bashWilliam Casarin
I couldn't run the performance tests on my machines due to a hardcoded bash path. Use env for finding bash in weird systems like NixOS. Signed-off-by: William Casarin <jb55@jb55.com>
2019-06-07debian: fix desktop installdebian/0.29-2archive/debian/0.29-2David Bremner
Previous version expected full upstream install to be run, and also caused lintian whine about the the desktop file being in a different package than the script. I'm not sure they shouldn't both be in elpa-notmuch, but I can see how they should be together.
2019-06-07debian: install desktop filedebian/0.29-10.29David Bremner
2019-06-07NEWS: set release date for 0.29David Bremner
2019-06-07version: bump to 0.29David Bremner
2019-06-07debian: start changelog for 0.29-1David Bremner
2019-06-07debian: install logoDavid Bremner
Thanks to Tim Retout for the patch
2019-06-07NEWS: add Emacs front end changes by various people.David Bremner
These are most of the remaining emacs related chagnes.
2019-06-03NEWS: add a note about protected headersDaniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-06-03debian: changelog for 0.29~rc1-1debian/0.29_rc1-1archive/debian/0.29_rc1-10.29_rc1David Bremner
2019-06-03version: bump to 0.29~rc1David Bremner
2019-06-03doc: use separate doctrees for distinct buildersDavid Bremner
It seems our previous attempt with order-only targets was not sufficient to avoid problems with sphinx-builds doctree cache [0]. Looking around at other people's approaches [1], using separate doctrees was suggested. I guess there might be a slight loss of efficiency, but it seems more robust. [0]: build failures were first noticed in Debian experimental, but I was able to duplicate it in my usual build environment about 1 in 8 builds. [1]: in particular https://salsa.debian.org/mpd-team/mpc/commit/9e3fc1657d043d75755993846c93f7700b97f907
2019-05-31debian: changelog for 0.29~rc0-1debian/0.29_rc0-1archive/debian/0.29_rc0-10.29_rc0David Bremner
2019-05-31version: bump to 0.29~rc0David Bremner
2019-05-31mime-node: be clearer about decryptionDaniel Kahn Gillmor
Part 0 of a multipart/encrypted object is GMIME_MULTIPART_ENCRYPTED_VERSION; part 1 is GMIME_MULTIPART_ENCRYPTED_CONTENT. Using the name for what we want describes our intent more clearly than using a magic number in the code. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: update test description.David Bremner
I missed this fix in dkg's revisions.
2019-05-29cli/reply: pull proposed subject line from the message, not the indexDaniel Kahn Gillmor
Protected subject lines were being emitted in reply when the cleartext of documents was indexed. create_reply_message() was pulling the subject line from the index, rather than pulling it from the GMimeMessage object that it already has on hand. This one-line fix to notmuch-reply.c solves that problem, and doesn't cause any additional tests to fail. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: reply (in cli and emacs) should protect indexed sensitive headersDaniel Kahn Gillmor
These tests are currently broken! When a protected subject is indexed in the clear, it leaks in the reply headers :( For emacs, we set up separate tests for when the protected header is indexed in the clear and when it is unindexed. neither case should leak, but the former wasn't tested yet. We will fix the two broken tests in a subsequent patch. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: emacs/show: ensure that protected headers appear as expectedDaniel Kahn Gillmor
This tests notmuch-show; headers appear appropriately based on the setting of notmuch-crypto-process-mime. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: ensure that protected headers appear in notmuch-emacs search as expectedDaniel Kahn Gillmor
We initially test only notmuch-search; tests for other functionality come in different patchsets later. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: try indexing nested messages and protected headersDaniel Kahn Gillmor
We want to make sure that internally-forwarded messages don't end up "bubbling up" when they aren't actually the cryptographic payload. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: after reindexing, only legitimate protected subjects are searchableDaniel Kahn Gillmor
This test scans for all the possible protected headers (including bogus/broken ones) that are present in the protected-headers corpus, trying to make sure that only the ones that are not broken or malformed show up in a search after re-indexing. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: protected headers should work when both encrypted and signed.Daniel Kahn Gillmor
Up to this point, we've tested protected headers on messages that have either been encrypted or signed, but not both. This adds a couple tests of signed+encrypted messages, one where the subject line is masked (outside subject line is "Subject Unavailable") and another where it is not (outside Subject: matches inner Subject:) See the discussion at https://dkg.fifthhorseman.net/blog/e-mail-cryptography.html#protected-headers for more details about the nuances between signed, stripped, and stubbed headers. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29indexing: record protected subject when indexing cleartextDaniel Kahn Gillmor
When indexing the cleartext of an encrypted message, record any protected subject in the database, which should make it findable and visible in search. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29cli/reply: ensure encrypted Subject: line does not leak in the clearDaniel Kahn Gillmor
Now that we can decrypt headers, we want to make sure that clients using "notmuch reply" to prepare a reply don't leak cleartext in their subject lines. In particular, the ["reply-headers"]["Subject"] should by default show the external Subject. A replying MUA that intends to protect the Subject line should show the user the Subject from ["original"]["headers"]["Subject"] instead of using ["reply-headers"]["Subject"]. This minor asymmetry with "notmuch show" is intentional. While both tools always render the cleartext subject line when they know it (in ["headers"]["Subject"] for "notmuch show" and in ["original"]["headers"]["Subject"] for "notmuch reply"), "notmuch reply" should never leak something that should stay under encrypted cover in "reply-headers". Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: show cryptographic envelope information for signed mailsDaniel Kahn Gillmor
Make sure that we emit the correct cryptographic envelope status for cleartext signed messages. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: add test for missing external subjectDaniel Kahn Gillmor
Adding another test to ensure that we handle protected headers gracefully when no external subject is present. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29cli/show: add information about which headers were protectedDaniel Kahn Gillmor
The header-mask member of the per-message crypto object allows a clever UI frontend to mark whether a header was protected (or not). And if it was protected, it contains enough information to show useful detail to an interested user. For example, an MUA could offer a "show what this message's Subject looked like on the wire" feature in expert mode. As before, we only handle Subject for now, but we might be able to handle other headers in the future. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Amended by db: tweaked schemata notation.
2019-05-29cli/show: emit payload subject instead of outside subjectDaniel Kahn Gillmor
Correctly fix the two outstanding tests so that the protected (hidden) subject is properly reported. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29cli/show: add tests for viewing protected headersDaniel Kahn Gillmor
Here we add several variant e-mail messages, some of which have correctly-structured protected headers, and some of which do not. The goal of the tests is to ensure that the right protected subjects get reported. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29test: new test framework to compare json partsJameson Graef Rollins
This makes it easier to write fairly compact, readable tests of json output, without needing to sanitize away parts that we don't care about. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>