unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Graef Rollins <jrollins@finestructure.net>
To: "Bryant\, Daniel B." <Dan.Bryant@jhuapl.edu>,
	Notmuch Mail <notmuch@notmuchmail.org>
Subject: RE: S/MIME support
Date: Tue, 10 Jul 2012 00:40:03 -0700	[thread overview]
Message-ID: <87hatgysh8.fsf@servo.finestructure.net> (raw)
In-Reply-To: <24CAA033F4DBCD4DB53CBFB11AEF037C1044F0566F@aplesrepublic.dom1.jhuapl.edu>

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

On Mon, Jul 09 2012, "Bryant, Daniel B." <Dan.Bryant@jhuapl.edu> wrote:
> I was able to get signature verification working with your patchset
> (with a caveat) but not decryption.

Hi, Daniel.  I guess I'm only partially happy to hear that!  I
definitely do appreciate the feedback, though.

> The caveat is that GMime is still borked with handling signatures with
> content type application/x-pkcs7-signature
> (vs. application/pkcs7-signature, which works fine). This is upstream
> GNOME bug #674032 that was supposed to have been fixed in GMime 2.6.9,
> but that original fix is also broken.

Ah, I didn't notice that:

https://bugzilla.gnome.org/show_bug.cgi?id=674032

Encouragingly, it sounds like Jeffery is working on it.

> One possible workaround is to twiddle the content-type of the
> signature part (and the corresponding protocol in the multipart/signed
> part). I implemented this by looping over each message part in
> mime_node_open() and modifying as necessary using the following logic:
>
>
>     GMimeContentType *content_type = g_mime_object_get_content_type (part);
>
>     const char *subtype = g_mime_content_type_get_media_subtype (content_type);
>     const char *protocol = g_mime_content_type_get_parameter (content_type, "protocol");
>
>     if (!strcmp(subtype, "x-pkcs7-signature")) {
>         g_mime_content_type_set_media_subtype (content_type, "pkcs7-signature");
>     }
>
>     if (protocol && !strcmp(protocol, "application/x-pkcs7-signature")) {
>         g_mime_content_type_set_parameter (content_type, "protocol","application/pkcs7-signature");
>     }    

We could do this, but I would certainly prefer that we fix gmime to
handle both types properly.

> All of my S/MIME encrypted mail consists of single part messages with
> content-type "application/x-pkcs7-mime". These conform to RFC3851,
> section 3.3/3.4. (sample messages are included in the RFC as
> well). This fails to be decrypted by notmuch because the mime node
> traversal code assumes that every encrypted message is
> multipart/encrypted, which appears to only be true for PGP/MIME.

Thanks for the great example of why we need tests!

Would you (or anyone) be willing to start putting together some tests
that include messages encrypted according to this RFC?  I think adding
some tests to the test/crypto script would be a great place to start.

jamie.

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

  reply	other threads:[~2012-07-10  7:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-29 18:38 S/MIME support Jameson Graef Rollins
2012-06-29 18:38 ` [PATCH 1/2] cli: S/MIME verification/decryption support Jameson Graef Rollins
2012-06-29 18:38   ` [PATCH 2/2] debian: Recommend gpgsm for S/MIME support Jameson Graef Rollins
2012-07-09 18:33 ` Bryant, Daniel B.
2012-07-10  7:40   ` Jameson Graef Rollins [this message]
2012-08-31 19:50     ` David Bremner
2014-03-17  4:52 ` S/MIME support, rebased Jameson Graef Rollins
2014-03-17  4:52   ` [PATCH 1/2] cli: S/MIME verification/decryption support Jameson Graef Rollins
2014-03-17  4:52     ` [PATCH 2/2] debian: Recommend gpgsm for S/MIME support Jameson Graef Rollins
2014-07-01 10:55     ` [PATCH 1/2] cli: S/MIME verification/decryption support David Bremner
2014-07-06 17:36       ` Jameson Graef Rollins
2014-07-06 18:18         ` David Bremner
2015-01-17 10:51   ` SMIME patches v3, with some tests David Bremner
2015-01-17 10:51     ` [PATCH 1/4] test: initial tests for smime David Bremner
2015-01-17 10:51     ` [PATCH 2/4] cli: S/MIME verification/decryption support David Bremner
2015-01-17 10:51     ` [PATCH 3/4] test: add S/MIME signature verification test for notmuch CLI David Bremner
2015-01-17 10:51     ` [PATCH 4/4] debian: Recommend gpgsm for S/MIME support David Bremner
2015-01-17 20:07     ` SMIME patches v3, with some tests Jameson Graef Rollins
2015-01-17 21:38       ` [PATCH] test: initial tests for smime David Bremner
2015-01-17 21:59         ` Jameson Graef Rollins
2015-01-17 22:29           ` David Bremner
2015-01-17 22:54             ` 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=87hatgysh8.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=Dan.Bryant@jhuapl.edu \
    --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).