* [sup-devel] [PATCH] fix for problem with gpg verifying signatures
@ 2010-08-30 10:29 Michael Raitza
0 siblings, 0 replies; only message in thread
From: Michael Raitza @ 2010-08-30 10:29 UTC (permalink / raw)
To: sup-devel
[-- Attachment #1.1: Type: text/plain, Size: 1376 bytes --]
Hi,
GPG seems to have a problem with verifying signatures if it doesn't know
the file name extension (!?). I fixed the problem with adding .asc as
extension to the temporary file names.
Diff attached.
Regards,
Michael.
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
index 04ca1c1..954d5c2 100644
--- a/lib/sup/crypto.rb
+++ b/lib/sup/crypto.rb
@@ -117,12 +117,12 @@ EOS
return unknown_status(cant_find_binary) unless @cmd
if detached
- payload_fn = Tempfile.new "redwood.payload"
+ payload_fn = Tempfile.new "redwood.payload.asc"
payload_fn.write format_payload(payload)
payload_fn.close
end
- signature_fn = Tempfile.new "redwood.signature"
+ signature_fn = Tempfile.new "redwood.signature.asc"
signature_fn.write signature.decode
signature_fn.close
@@ -139,11 +139,11 @@ EOS
def decrypt payload, armor=false # a RubyMail::Message object
return unknown_status(cant_find_binary) unless @cmd
- payload_fn = Tempfile.new "redwood.payload"
+ payload_fn = Tempfile.new "redwood.payload.asc"
payload_fn.write payload.to_s
payload_fn.close
- output_fn = Tempfile.new "redwood.output"
+ output_fn = Tempfile.new "redwood.output.asc"
output_fn.close
message = run_gpg "--output #{output_fn.path} --skip-verify --yes --decrypt #{payload_fn.path}", :interactive => true
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: 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] only message in thread
only message in thread, other threads:[~2010-08-30 10:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 10:29 [sup-devel] [PATCH] fix for problem with gpg verifying signatures Michael Raitza
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox