all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Sebastian Fieber <sebastian.fieber@web.de>
Cc: 40397@debbugs.gnu.org
Subject: bug#40397: 28.0.50; epg decrypt does not verify signed content in smime
Date: Sun, 19 Apr 2020 08:16:10 -0400	[thread overview]
Message-ID: <86blnn8yd1.fsf@gmail.com> (raw)
In-Reply-To: <87h7xv9k3x.fsf@web.de> (Sebastian Fieber's message of "Tue, 07 Apr 2020 21:22:26 +0200")

As I mentioned previously, I'm not really familiar enough with the code
to give a proper review, but I have a couple of minor comments.

Sebastian Fieber <sebastian.fieber@web.de> writes:

> +               (setq intermediate-result (cons (car ctl) (list intermediate-result))))

Or just

    (setq intermediate-result (list (car ctl) intermediate-result))

> @@ -1672,17 +1701,27 @@ mm-possibly-verify-or-decrypt
> -      (with-temp-buffer
> -	(when (and (cond
> -		    ((eq mm-decrypt-option 'never) nil)
> -		    ((eq mm-decrypt-option 'always) t)
> -		    ((eq mm-decrypt-option 'known) t)
> -		    (t (y-or-n-p
> -			(format "Decrypt (S/MIME) part? "))))
> -		   (mm-view-pkcs7 parts from))
> -	  (goto-char (point-min))
> -	  (insert "Content-type: text/plain\n\n")
> -	  (setq parts (mm-dissect-buffer t)))))
> +      (add-text-properties 0 (length (car ctl))
> +			   (list 'buffer (car parts))
> +			   (car ctl))
> +      (let* ((smime-type (cdr (assoc 'smime-type ctl)))
> +             (envelope-p (string= smime-type "enveloped-data"))
> +             (decrypt-or-sign-option (if envelope-p
> +                                         mm-decrypt-option
> +                                       mm-verify-option))
> +             (question (if envelope-p
> +                           "Decrypt (S/MIME) part? "
> +                         "Verify signed (S/MIME) part? ")))
> +        (with-temp-buffer
> +	  (when (and (cond
> +		      ((eq decrypt-or-sign-option 'never) nil)
> +		      ((eq decrypt-or-sign-option 'always) t)
> +		      ((eq decrypt-or-sign-option 'known) t)
> +		      (t (y-or-n-p
> +			  (format question)))))
> +	    (mm-view-pkcs7 parts from)
> +	    (goto-char (point-min))
> +	    (setq parts (mm-dissect-buffer t))))))

You moved the 'mm-view-pkcs7' call out of the condition.  If that was on
purpose, then you should remove the 'and', since it's now redundant.





  reply	other threads:[~2020-04-19 12:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 23:37 bug#40397: 28.0.50; epg decrypt does not verify signed content in smime encrypted and signed message Sebastian Fieber
2020-04-03  6:47 ` bug#40397: 28.0.50; epg decrypt does not verify signed content in smime Sebastian Fieber
2020-04-03 23:22   ` Sebastian Fieber
2020-04-05  0:37     ` Sebastian Fieber
2020-04-06  0:04       ` Sebastian Fieber
2020-04-06  1:17         ` Noam Postavsky
2020-04-06  7:01           ` Sebastian Fieber
2020-04-06 16:32             ` Noam Postavsky
2020-04-07 19:22 ` Sebastian Fieber
2020-04-19 12:16   ` Noam Postavsky [this message]
2020-08-02  6:02   ` Lars Ingebrigtsen
2020-08-02 20:11     ` Sebastian Fieber
2020-08-03  2:26       ` Eli Zaretskii
2020-08-03  6:06       ` Lars Ingebrigtsen
2021-07-21 15:41         ` bug#40397: 28.0.50; epg decrypt does not verify signed content in smime encrypted and signed message Lars Ingebrigtsen
2021-07-21 18:07           ` Sebastian Fieber
2021-07-21 22:02             ` Lars Ingebrigtsen
2021-12-21 19:39               ` Sebastian Fieber
2021-12-22 12:44                 ` Lars Ingebrigtsen
2021-12-23 18:14                   ` Sebastian Fieber
2021-12-23 18:17                     ` Sebastian Fieber
2021-12-23 18:25                       ` Sebastian Fieber
2021-12-23 21:06                       ` Sebastian Fieber
2021-12-24  9:44                         ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=86blnn8yd1.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=40397@debbugs.gnu.org \
    --cc=sebastian.fieber@web.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.