Subject: [sup-talk] sup/gpg

From: [email-masked] (Ben Walton)
Date: Sat, 06 Jun 2009 15:06:49 -0400

Excerpts from Marc Hartstein's message of Sat Jun 06 14:53:55 -0400 2009:
> Excerpts from Ben Walton's message of Sat Jun 06 14:45:56 -0400 2009:
> > 
> > This just got stranger, which makes me think it may be a sup issue
> > still.  The thread you replied twice to earlier today has one message
> > validating and the other not.  See attached.
> 
> Ok, that's totally bizarre.
> 
> Things I can think of:
> 
> Those were two different sup instances (I'd quit, created a branch, and
> applied the discussed patch in between sending the two replies)

Well, if the patch altered the behaviour, that's a possibility.

> I might well have typoed my passphrase for one of the messages and not
> the other, though I'm not sure which.  I think it's slightly more likely
> that the BAD message was the one where I made a typo, though.  [I then
> proceeded to enter it correctly the second time, though, so...]

When I enter a bad passphrase into pinentry, sup detects this and
won't send the message...to my knowledge, I'm not able to get a
multipart/gpg message sent if I don't enter a proper passphrase.

> Think we should move the discussion to the sup list to see if anybody
> has thoughts?

I think that's reasonable.  My next thought is that there is a small
bug in the mime parsing (or creating) code...

Does anyone else have thoughts on what would cause broken gpg
signatures?  I've previously had issues when using gpg2 instead of
gpg1, but that was completely the fault of gpg2 (or my use of it,
anyway).  Switching to gpg1 resolved the problem at that time.  In
this instance, Mark isn't able to validate my signatures and I was
able to validate his until just recently...I'm now hit-and-miss with
his.

Thoughts?

Thanks
-Ben
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090606/ff5e9ca6/attachment.bin>

---

From: [email-masked] (William Morgan)
Date: Mon, 08 Jun 2009 10:23:43 -0700

> Well, if the patch altered the behaviour, that's a possibility.

What was the patch?

> multipart/gpg message sent if I don't enter a proper passphrase.

Yeah, an incorrect passphrase will error out, it won't produce a bad
message.

> bug in the mime parsing (or creating) code...

That is where I would start looking. If you tweak crypto.rb so that it
dumps the payload somewhere (look in #format_payload), you can then
compare that to what ends up in your sent.mbox.

Also you can look at encrypting messages to yourself. Are you able to
decrypt them reliably? If not, is there a pattern? (Non-ASCII in the
headers, body, etc.?)
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (William Morgan)
Date: Mon, 08 Jun 2009 11:25:10 -0700

Reformatted excerpts from Marc Hartstein's message of 2009-06-08:
> The regexp fix for messages with very long lines.

Yeah, that shouldn't change anything. Doesn't even change Sup's output!

> Yeah, it bounces me back to pinentry, where I proceeded to enter it
> correctly.  It *shouldn't* produce a bad message, it was just one of
> the only things I could think of that had changed between the two
> messages which might have led to different behavior.

Except the message content, I guess. :)

> > Also you can look at encrypting messages to yourself. Are you able
> > to decrypt them reliably? If not, is there a pattern? (Non-ASCII in
> > the headers, body, etc.?)
> 
> I expect this will have the same behavior as checking signatures on
> messages I send, no?

It should; I was just suggesting it as an alternative approach to
figuring out what was causing the problem. Then Ben isn't in the loop
any more and you can spend all night happily debuggin this. :)

> Ben is using gpg 1 after correspondents complained the switch to gpg 2
> caused his messages to have bad signatures.

Was he using Sup the entire time?

> I am using gpg 2.0.11
> 
> I see *all* Ben's messages as having bad signatures, and see all my
> own (either in sent.mbox or bounced back to me from the list) as good.
> I also see Ben's signatures as bad when looking at the same messages
> through mutt.  I see the same thing going back to his first signed
> message to sup-talk, and also in his direct emails to me.
>
> Ben sees most of my signatures as good, but has recently experienced
> an intermittent issue where my signatures are bad.

It sounds like there might be some possibility that it's a GPG version
incompatibility, though I'd be a little surprised if that were really
the case. It might be helpful if you guys could do a control experiment
with Mutt, since I have a fair amount of faith in its GPG
implementation.