Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] improvement: add self as recipient on sent messages
@ 2008-10-30 13:57 Tomas Pospisek ML
  2008-10-30 17:03 ` [sup-talk] improvement: add self as recipient on crypted " Tomas Pospisek ML
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Pospisek ML @ 2008-10-30 13:57 UTC (permalink / raw)



Currently sup seems to call gpg with the recipient only. However sup
should add "self" also to the recipients. Otherwise one is not able to
read sent, encrypted mails any more.
*t


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

* [sup-talk] improvement: add self as recipient on crypted sent messages
  2008-10-30 13:57 [sup-talk] improvement: add self as recipient on sent messages Tomas Pospisek ML
@ 2008-10-30 17:03 ` Tomas Pospisek ML
  2008-11-02 19:30   ` William Morgan
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Pospisek ML @ 2008-10-30 17:03 UTC (permalink / raw)



On 10/30/2008, "Tomas Pospisek ML" <tpo2 at sourcepole.ch> wrote:

>
>Currently sup seems to call gpg with the recipient only. However sup
>should add "self" also to the recipients. Otherwise one is not able to
>read sent, encrypted mails any more.

Patch is below. Two comments:

1. is there a less ugly way to create a new Array with an additional
element?
2. the patch assumes that adding "From: " to gpg's" --recipient"s is
a sensible thing to do and thus it does it with no questions asked

OK?
*t

--- sup/crypto.rb.orig	2008-10-30 16:36:37.000000000 +0100
+++ sup/crypto.rb	2008-10-30 17:40:07.000000000 +0100
@@ -53,7 +53,7 @@
     payload_fn.write format_payload(payload)
     payload_fn.close

-    recipient_opts = to.map { |r| "--recipient '<#{r}>'" }.join("
")
+    recipient_opts = (to + [ from ] ).map { |r| "--recipient
'<#{r}>'" }.join(" ")
     sign_opts = sign ? "--sign --local-user '#{from}'" : ""
     gpg_output = run_gpg "--output - --armor --encrypt --textmode
#{sign_opts} #{recipient_opts} #{payload_fn.path}"
     raise Error, (gpg_output || "gpg command failed: #{cmd}") unless
$?.success?


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

* [sup-talk] improvement: add self as recipient on crypted sent messages
  2008-10-30 17:03 ` [sup-talk] improvement: add self as recipient on crypted " Tomas Pospisek ML
@ 2008-11-02 19:30   ` William Morgan
  0 siblings, 0 replies; 3+ messages in thread
From: William Morgan @ 2008-11-02 19:30 UTC (permalink / raw)


Reformatted excerpts from Tomas Pospisek ML's message of 2008-10-30:
> Patch is below. Two comments:

Applied, thanks!

> 1. is there a less ugly way to create a new Array with an additional
> element?

Nope, that's the right way.

> 2. the patch assumes that adding "From: " to gpg's" --recipient"s is a
> sensible thing to do and thus it does it with no questions asked

Seems reasonable to me.
-- 
William <wmorgan-sup at masanjin.net>


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

end of thread, other threads:[~2008-11-02 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-30 13:57 [sup-talk] improvement: add self as recipient on sent messages Tomas Pospisek ML
2008-10-30 17:03 ` [sup-talk] improvement: add self as recipient on crypted " Tomas Pospisek ML
2008-11-02 19:30   ` William Morgan

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