Gnus development mailing list
 help / color / mirror / Atom feed
From: david.goldberg6@verizon.net (David S. Goldberg)
Subject: magic numbers in mm-view.el
Date: Fri, 10 Jun 2005 13:59:25 -0400	[thread overview]
Message-ID: <mj7psuuay9t.fsf@mm117419-pc.MITRE.ORG> (raw)

If I use the #secure tag to send an encrypted s/mime email to others
and include a copy for myself, I am unable to read my copy in Gnus.  I
am able to decrypt and verify it (assuming it's signed as well) by
manually running Openssl on the message file and am also able to do so
in Thunderbird.  Oddly enough, if I build a multipart structure for
the message using #multipart instead of #secure I don't have this
problem.  But because the structure of the message is apparently not a
problem for OpenSSL or Thunderbird, I believe that the problem is that
the mm-pkcs7-enveloped-magic variable is not sufficient to cover all
cases.

Running (pp mm-pkcs7-enveloped-magic) gives

"0\\(€\\|.\\|‚..\\|ƒ...\\)\x06	\\*†H†÷\r\x01\a\x03"

So it's already a regular expression.  Here's what I see:

"0‚\nÍ\x06	*†H†÷\r\x01\a\x03"

The problem is that the '\n' after the \202 does not match the . in
the regular expression.  It seems it shouldn't be too hard to fix.
Just put [.\n] instead of just . in those locations.  However, in
mm-view.el we have

(defvar mm-pkcs7-enveloped-magic
  (mm-string-as-unibyte
   (mapconcat 'char-to-string
	      (list ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c
		    ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e
		    ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48
		    ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03) "")))

And I am unsure how to work the fix into that construct.  I'd be glad
to do it but need a bit of guidance on how to translate the characters.

On a somewhat related note, at one point I seem to recall someone
posting a patch to support the use of the application/x-pkcs7-mime
type for signed messages (as opposed to encrypted and signed).  I'm
starting to see some of those show up more at work now that we're
migrating to Exchange.  Did that not work?

Thanks,
-- 
Dave Goldberg
david.goldberg6@verizon.net






             reply	other threads:[~2005-06-10 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-10 17:59 David S. Goldberg [this message]
2005-06-10 20:31 ` Simon Josefsson
2005-06-13 14:48   ` David S. Goldberg
2005-06-10 21:02 ` Arne Jørgensen
2013-06-09 17:37 ` Roy Hashimoto
2013-06-10  4:57   ` Daiki Ueno

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=mj7psuuay9t.fsf@mm117419-pc.MITRE.ORG \
    --to=david.goldberg6@verizon.net \
    /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.
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 NNTP newsgroup(s).