Subject: [sup-devel] [issue100] GPG Signing Bug

From: Todd Eisenberger <[email-masked]>
Date: Sat, 08 May 2010 03:18:27 +0000

New submission from Todd Eisenberger <[email-masked]>:

After having a few messages fail verification on the recipient end, I discovered 
that sup is not compliant with the RFC for signing email with PGP/GPG.  RFC2015 
section 3 indicates that signed messages must be sent in a 7-bit format such as 
base64 or quoted-printable.  Attached is a patch to provide compliance by 
converting to base64 when crypto is used.  Note: I am unfamiliar with the code 
base, so it is possible this patch is not correct.

----------
files: gpg.patch
messages: 227
nosy: teisenbe
priority: bug
ruby_version: 1.8.7
status: unread
sup_version: git
title: GPG Signing Bug

_________________________________________
Sup issue tracker <[email-masked]>
<http://masanjin.net/sup-bugs/issue100>
_________________________________________

diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index c1537ae..a73a146 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -382,6 +382,8 @@ protected
     if @crypto_selector && @crypto_selector.val != :none
       from_email = Person.from_address(@header["From"]).email
       to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| Person.from_address(p).email }
+      m.header["Content-Transfer-Encoding"] = 'base64'
+      m.body = [m.body].pack('m')
 
       m = CryptoManager.send @crypto_selector.val, from_email, to_email, m
     end
@@ -401,7 +403,6 @@ protected
     m.header["Date"] = date.rfc2822
     m.header["Message-Id"] = @message_id
     m.header["User-Agent"] = "Sup/#{Redwood::VERSION}"
-    m.header["Content-Transfer-Encoding"] = '8bit'
     m
   end
 
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Rich Lane <[email-masked]>
Date: Tue, 11 May 2010 00:18:46 -0400

> base, so it is possible this patch is not correct.

Thanks, applied to master.
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel