Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [issue100] GPG Signing Bug
@ 2010-05-08  3:18 Todd Eisenberger
  2010-05-11  4:18 ` Rich Lane
  0 siblings, 1 reply; 2+ messages in thread
From: Todd Eisenberger @ 2010-05-08  3:18 UTC (permalink / raw)
  To: sup-devel

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


New submission from Todd Eisenberger <teisenbe@andrew.cmu.edu>:

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 <sup-bugs@masanjin.net>
<http://masanjin.net/sup-bugs/issue100>
_________________________________________

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gpg.patch --]
[-- Type: text/x-patch, Size: 881 bytes --]

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
 

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] [issue100] GPG Signing Bug
  2010-05-08  3:18 [sup-devel] [issue100] GPG Signing Bug Todd Eisenberger
@ 2010-05-11  4:18 ` Rich Lane
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Lane @ 2010-05-11  4:18 UTC (permalink / raw)
  To: Todd Eisenberger; +Cc: sup-devel

Excerpts from Todd Eisenberger's message of 2010-05-07 23:18:27 -0400:
> 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.

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-11  4:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-08  3:18 [sup-devel] [issue100] GPG Signing Bug Todd Eisenberger
2010-05-11  4:18 ` Rich Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox