summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* email-print-mime-structure: added test for PGP/MIME decryptionDaniel Kahn Gillmor2019-11-25
| | | | | | | The secret key material in this test comes from https://datatracker.ietf.org/doc/draft-bre-openpgp-samples/ Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* email-print-mime-structure: simple baseline test suiteDaniel Kahn Gillmor2019-11-25
| | | | | | | I want to ensure that any changes don't ultimately break the behavior of email-print-mime-structure. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* release mailscripts 0.15 (-1 to Debian unstable)debian/0.15-1archive/debian/0.15-10.15Sean Whitton2019-11-21
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure: prepare for multiple forms of decryptionDaniel Kahn Gillmor2019-11-21
| | | | | | | | | As we prepare for S/MIME decryption, we want to identify pgp decryption as just one type of decryption. There is no functional change here. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* notmuch-extract-patch: strip text in Subject: before '[PATCH nn/mm]'Sean Whitton2019-11-21
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* handle notmuch-show-thread-id not actually containing a thread IDSean Whitton2019-11-21
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* notmuch-extract-patch: tolerate text in Subject: before [PATCH nn/mm]Sean Whitton2019-11-21
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* release mailscripts 0.14 (0.14-1 to Debian unstable)debian/0.14-1archive/debian/0.14-10.14Sean Whitton2019-11-15
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* changelogSean Whitton2019-11-15
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure: add --no-use-gpg-agentSean Whitton2019-11-15
| | | | | | | This allows the user to avoid being affected by any future change in the default. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure: change --use-gpg-agent to a simple flagDaniel Kahn Gillmor2019-11-15
| | | | | | | | | | | | | | | Turns out that type=bool doesn't really do what we want it to do (see https://bugs.python.org/issue37564), and there is no built-in easy answer for argparse to accept a boolean value sensibly (e.g. type='bool', which might be able to handle "yes" and "no" and "1" and "0" and "on" and "off" as well as "true" and "false", etc) So rather than implement all of that here, we'll just have --use-gpg-agent as a simple flag. This is an API change, but the previous API has only been out for a few days, and the tool is documented for interactive use. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* Declare compliance with Debian Policy 4.4.1Sean Whitton2019-11-10
| | | | | | | Thanks to Daniel Kahn Gillmor for taking the time to verify that no changes are required. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* changelogSean Whitton2019-11-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* normalise shell redirectSean Whitton2019-11-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure: add tab completionDaniel Kahn Gillmor2019-11-10
| | | | | | | | This is modeled after the use of argcomplete in diffoscope, and it should be possible to use it for any other pythonic mailscript that uses argparse. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* release mailscript 0.13 (0.13-1 to Debian unstable)debian/0.13-1archive/debian/0.13-10.13Sean Whitton2019-11-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* demote gpg, gpg-agent Recommends->SuggestsSean Whitton2019-11-10
| | | | | | See discussion in #944340. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* changelogSean Whitton2019-11-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure(1): add a reference for PGP/MIMEDaniel Kahn Gillmor2019-11-10
| | | | | | | RFC 3156 documents PGP/MIME structural assumptions Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure: Add --use-gpg-agent for decryptionDaniel Kahn Gillmor2019-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the user may want to try to use their own GnuPG secret keys to decrypt encrypted parts of the message. By default it is disabled so that we aren't accidentally triggering the use of user secret key material. Note that gpg(1) says: It is highly recommended to use [--batch] along with the options --status-fd and --with-colons for any unattended use of gpg. I am deliberately choosing to not use either --status-fd or --with-colons for email-print-mime-structure. I'm not using --with-colons because there is no output from GnuPG that we expect to be machine-readable -- we're just looking for the cleartext of whatever ciphertext is in the message part. I'm not using --status-fd because there is nothing actionable we can do with GnuPG status messages, and asking for them would require switching from subprocess.run to subprocess.Popen to take advantage of the pass_fds argument, which in turn would make the script only work in a POSIX environment (I believe, but have not tested, that the script can currently be used on Windows). Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* email-print-mime-structure: prepare for other decryption mechanismsDaniel Kahn Gillmor2019-11-10
| | | | | | | | No functional change here: this just prepares for adding other decryption capabilities. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure: Restructure pgpy decryptionDaniel Kahn Gillmor2019-11-10
| | | | | | | | This has no functional changes, it's just a reorganization for easier readability. Thanks to Sean Whitton for the suggestion. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure: sanity check cryptographic payloadDaniel Kahn Gillmor2019-11-10
| | | | | | | | We want to make sure we're decrypting the thing that we expect. This typecheck should keep us honest. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* Fix typoDaniel Kahn Gillmor2019-11-10
| | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* wrap-and-sort -astDaniel Kahn Gillmor2019-11-09
| | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* mailscripts.el: arg to pass --reroll-count to notmuch-extract-patchSean Whitton2019-11-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* close bugSean Whitton2019-11-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* changelogSean Whitton2019-11-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* notmuch-extract-patch: add -v/--reroll-count optionSean Whitton2019-11-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* release mailscript 0.12 (0.12-1 to Debian unstable)debian/0.12-1archive/debian/0.12-10.12Sean Whitton2019-11-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* changelogSean Whitton2019-11-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* Revert "make it possible to suppress prefixing to the branch name"Sean Whitton2019-11-06
| | | | | | | | | | This reverts commit 3d33e7c0483bb9ab8de3ffd6a0372c8d2a0bffa0. Commit 7360648, which allows the user to suppress branch checkout, is a better way to let the user override their configured mailscripts-extract-patches-branch-prefix. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* Revert "thread no-prefix through the -projectile functions"Sean Whitton2019-11-06
| | | | | | This reverts commit 34f83d0d1ce17e6ef05dfe16f9a70c937cf2df56. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* mailscripts.el: if user does not enter a branch name, use HEADSean Whitton2019-11-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* tweak sample prefixSean Whitton2019-11-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* thread no-prefix through the -projectile functionsSean Whitton2019-11-04
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add possible 'vN-' prefix to git-format-patch(1) filename regexpSean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* make it possible to suppress prefixing to the branch nameSean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* changelogSean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* mailscripts.el: add notmuch-extract-message-patches{,-projectile}Sean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* mailscripts.el: add notmuch-extract-thread-patches-projectileSean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* mailscripts.el: add mailscripts-extract-patches-branch-prefixSean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* update version in mailscripts.elSean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* changelogSean Whitton2019-11-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* drop space before shell redirection operatorSean Whitton2019-11-02
| | | | | | For consistency with the manpage. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* email-print-mime-structure.1.pod: update LIMITATIONS about OpenPGP decryptionDaniel Kahn Gillmor2019-11-02
| | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* email-print-mime-structure: add decryption capabilityDaniel Kahn Gillmor2019-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | Add simple decryption capability for email-print-mime-structure, so that it can do stuff like this: $ email-print-mime-structure --pgpkey alice@openpgp.example.sec.asc < msg.eml └┬╴multipart/encrypted 2190 bytes ├─╴application/pgp-encrypted 11 bytes └─╴application/octet-stream 1613 bytes ↧ (decrypts to) └─╴text/plain 425 bytes $ At the moment, it only works with keys that can be found in the filesystem, and when the pgpy module is installed. Possible future work: - try using gpg to do the decryption from whatever gpg's system capabilities are I've added python3-pgpy to the list of Recommends, since it is not a hard dependency. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* email-print-mime-structure: renamed MimePrinter.test() to print_tree()Daniel Kahn Gillmor2019-11-02
| | | | | | No functional changes. This is just a more readable function name. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* email-print-mime-structure: add another FIXME about bytecountingDaniel Kahn Gillmor2019-11-02
| | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* email-print-mime-structure: Pass parent and nth child info during walkDaniel Kahn Gillmor2019-11-02
| | | | | | | | | No functional change. This is preparatory work to be able to consider the structure of each part and determine whether we should consider trying to decrypt it. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>