unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Graef Rollins <jrollins@finestructure.net>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: sign/encrypt replies to signed/encrypted messages
Date: Sun, 06 Apr 2014 23:16:26 -0700	[thread overview]
Message-ID: <8738hppsud.fsf@servo.finestructure.net> (raw)
In-Reply-To: <1396689486-19232-1-git-send-email-jani@nikula.org>

[-- Attachment #1: Type: text/plain, Size: 2373 bytes --]

On Sat, Apr 05 2014, Jani Nikula <jani@nikula.org> wrote:
> This is a simple approach to improving security when replying to
> signed or encrypted messages. If the message being replied to was
> signed, add mml tag to sign the reply. If the message being replied to
> was encrypted, add mml tag to sign and encrypt the reply.

Jani, thank you so much for this patch!  This is really great, and I
very much appreciate your work on it.

I've tested it and so far it does exactly as advertised: replys to
encrypted messages automatically get the correct mml tags to encrypt the
reply.  I sign all messages by default, and it doesn't seem to interact
adversely with that configuration afaict.

> This may need configuration; I for one might want to encrypt replies
> to encrypted messages, but not always sign replies to signed messages.
>
> This still includes a slight bug: if any mml tags are added, they are
> included in the region containing the quoted parts. Killing the region
> will kill the mml tags too.

Both of these issues seem pretty minor to me.  It certainly gets my vote
to push without these additional features (especially considering the
security benefits).

I just have one comment below:

> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index ba3ef275ec5e..9fb84b57b030 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -224,7 +233,10 @@ list."
>  	(set-mark (point))
>  	(goto-char start)
>  	;; Quote the original message according to the user's configured style.
> -	(message-cite-original))))
> +	(message-cite-original)))
> +
> +    ;; Sign and/or encrypt replies to signed and/or encrypted messages.
> +    (notmuch-mua-reply-crypto (plist-get original :body)))

Maybe we should check to see if crypto processing is activated before
adding this additional crypto handling.  I would have guessed we might
want something like this instead:

    (when notmuch-show-process-crypto
      (notmuch-mua-reply-crypto (plist-get original :body))))

However, for some reason I can't get this to work.  It looks like
notmuch-show-process-crypto keeps evaluating to false in this context,
regardless of whether crypto processing has been engaged.  I'm unclear
why.  Anyone know see how notmuch-show-process-crypto would evaluate to
false here, even when it evaluates to true earlier in the same
notmuch-mua-reply call?

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2014-04-07  6:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 19:24 encrypting replies to encrypted mail Jameson Graef Rollins
2014-01-12 20:01 ` Nicolás Reynolds
2014-01-12 20:21   ` Jameson Graef Rollins
2014-01-12 20:50 ` Jani Nikula
2014-04-05  9:18 ` [PATCH] emacs: sign/encrypt replies to signed/encrypted messages Jani Nikula
2014-04-07  6:16   ` Jameson Graef Rollins [this message]
2014-04-07  6:40   ` [PATCH] emacs: process crypto for reply only when specified Jameson Graef Rollins
2014-04-13  1:46     ` David Bremner
2014-04-13 11:00       ` Tomi Ollila
2014-04-13 12:56         ` David Bremner
2014-04-13 20:41           ` Tomi Ollila
2014-04-13 22:15             ` David Bremner
2014-04-13 23:37             ` Jameson Graef Rollins
2014-04-14  8:42               ` Tomi Ollila
2014-04-14 12:26                 ` Tomi Ollila
2014-04-14 17:15   ` [PATCH] emacs: sign/encrypt replies to signed/encrypted messages David Bremner
2014-04-14 17:51     ` Jani Nikula
2014-04-14 18:24       ` Jameson Graef Rollins
2014-04-14 18:59         ` David Bremner
2014-04-14 19:40           ` [PATCH] emacs: remove auto-signing of replies to signed messages Jameson Graef Rollins
2014-04-14 19:48             ` Tomi Ollila
2014-04-15 10:02             ` David Bremner
2014-04-15 15:26               ` Jameson Graef Rollins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738hppsud.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).