From: Simon Josefsson <jas@extundo.com>
Cc: The Gnus Mailing List <ding@gnus.org>
Subject: Re: magic numbers in mm-view.el
Date: Fri, 10 Jun 2005 22:31:19 +0200 [thread overview]
Message-ID: <ilu7jh2eyy0.fsf@latte.josefsson.org> (raw)
In-Reply-To: <mj7psuuay9t.fsf@mm117419-pc.MITRE.ORG> (David S. Goldberg's message of "Fri, 10 Jun 2005 13:59:25 -0400")
david.goldberg6@verizon.net (David S. Goldberg) writes:
> 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.
Either you could simply replace those '.' with \(.\|\n\), but I think
maintainability suggest getting rid of the entire char-list and
replace it with something simpler. Perhaps you can use `format' and
have the argument contain the printable characters, and regexp
keywords, and use %c or something for the escaped characters.
next prev parent reply other threads:[~2005-06-10 20:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-10 17:59 David S. Goldberg
2005-06-10 20:31 ` Simon Josefsson [this message]
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=ilu7jh2eyy0.fsf@latte.josefsson.org \
--to=jas@extundo.com \
--cc=ding@gnus.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.
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).