sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 496d4859ff656e4aa41993ddbe031b29d58f179f
parent 504100df8424584ee1217716a6dd9def30aebb91
Author: Lars Fischer <fischer@wiwi.uni-siegen.de>
Date:   Sun, 29 Dec 2013 18:51:49 +0100

Multiple Signers did not work with gpgme 2.0.2

Exchanged :signers with :signer, this seems to allow to create a
signature based on account or from.

Previously always the default or first private key had been used.

But I haven't communicated with the developers of gpgme.

Signed-off-by: Gaute Hope 

Diffstat:
M lib/sup/crypto.rb | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
@@ -128,7 +128,6 @@ EOS
     gpg_opts.merge!(gen_sign_user_opts(from))
     gpg_opts = HookManager.run("gpg-options",
                                {:operation => "sign", :options => gpg_opts}) || gpg_opts
-
     begin
       if GPGME.respond_to?('detach_sign')
         sig = GPGME.detach_sign(format_payload(payload), gpg_opts)
@@ -443,16 +442,18 @@ private
   # if    gpgkey set for this account, then use that
   # elsif only one account,            then leave blank so gpg default will be user
   # else                                    set --local-user from_email_address
+  # NOTE: multiple signers doesn't seem to work with gpgme (2.0.2, 1.0.8)
+  #       
   def gen_sign_user_opts from
     account = AccountManager.account_for from
     account ||= AccountManager.default_account
     if !account.gpgkey.nil?
-      opts = {:signers => account.gpgkey}
+      opts = {:signer => account.gpgkey}
     elsif AccountManager.user_emails.length == 1
       # only one account
       opts = {}
     else
-      opts = {:signers => from}
+      opts = {:signer => from}
     end
     opts
   end