From: "Michael Raitza" <spacefrogg-devel@instandbesetzt.net>
To: "sup-devel" <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] fix for problem with gpg verifying signatures
Date: Mon, 30 Aug 2010 12:29:30 +0200 [thread overview]
Message-ID: <1283164026-sup-6827@leandros> (raw)
[-- 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
reply other threads:[~2010-08-30 10:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1283164026-sup-6827@leandros \
--to=spacefrogg-devel@instandbesetzt.net \
--cc=sup-devel@rubyforge.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox