unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Timothy J Miller <tmiller@mitre.org>
Cc: "42637@debbugs.gnu.org" <42637@debbugs.gnu.org>
Subject: bug#42637: [EXT] Re: bug#42637: 27.0.91; mm-view-pkcs7 doesn't handle S/MIME signed andd encrypted messages
Date: Mon, 07 Sep 2020 15:32:11 +0200	[thread overview]
Message-ID: <87ft7t90h0.fsf@gnus.org> (raw)
In-Reply-To: <87k0ybc0a2.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 06 Aug 2020 16:32:53 +0200")

OK, I've finally started poking around in this stuff again.

To recap: If you have a signed + encrypted message, you won't get the
buttons where you can click to ensure a signature.

The "outer" message (i.e., the email itself) is on this form:

Content-Type: application/pkcs7-mime; smime-type=enveloped-data;
	name="smime.p7m"
Content-Disposition: attachment; filename="smime.p7m"
Content-Transfer-Encoding: base64

This data is encrypted, and Gnus will ask you "Decrypt (S/MIME) part? "?

If "yes", you'll end up with a new, complete MIME message of this type:

Content-Type: application/pkcs7-mime;
	smime-type=signed-data;
	name=smime.p7m
Content-disposition: attachment;
	filename="smime.p7m"
Content-transfer-encoding: base64

The data here is not encrypted, but it is a binary blob containing the
mail text itself, and also the signature.  (Gnus will then ask you, again
"Decrypt (S/MIME) part? ", which is a bug, and which I've now fixed.)

To get the mail text itself, mm-view-pkcs7-verify is then called -- it
will do more than verify; it also extracts the mail from the binary
blob.

So at this point, Gnus has the mail text, and can display it.

However, there's no buttons, because to get the buttons, the mail has to
be a */signed part (which is a multipart kinda thing), and the mail has
already been verified.

So...  Hm...  I guess we could create some structure that would allow
re-checking the non-detached signature...

Well, that's as far as I've gotten.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






  reply	other threads:[~2020-09-07 13:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 14:22 bug#42637: 27.0.91; mm-view-pkcs7 doesn't handle S/MIME signed andd encrypted messages Timothy J. Miller
2020-08-02  5:07 ` Lars Ingebrigtsen
     [not found] ` <10756_1596344892_5F264A38_10756_6707_1_87y2mxy6s0.fsf@gnus.org>
2020-08-03 13:22   ` bug#42637: [EXT] " Timothy J. Miller
2020-08-04  8:49     ` Lars Ingebrigtsen
2020-08-04 13:16       ` Timothy J Miller
2020-08-04 15:41         ` Lars Ingebrigtsen
2020-08-04 15:59           ` Timothy J Miller
2020-08-04 16:11             ` Lars Ingebrigtsen
2020-08-04 20:26               ` Timothy J Miller
2020-08-05  8:50                 ` Lars Ingebrigtsen
2020-08-05 12:25                   ` Timothy J. Miller
2020-08-06  7:48                     ` Lars Ingebrigtsen
2020-08-06 13:14                     ` Lars Ingebrigtsen
2020-08-06 14:05                       ` Timothy J Miller
2020-08-06 14:07                         ` Lars Ingebrigtsen
2020-08-06 14:32                           ` Lars Ingebrigtsen
2020-09-07 13:32                             ` Lars Ingebrigtsen [this message]
2020-09-07 14:33                               ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87ft7t90h0.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=42637@debbugs.gnu.org \
    --cc=tmiller@mitre.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://git.savannah.gnu.org/cgit/emacs.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).