sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit ffb641e0d5b4f661014706833c9b0211f115513c
parent d2d716b1de623ea01cc33e30658d731da2eb8d20
Author: Hamish Downer <dmishd@gmail.com>
Date:   Sun, 17 Oct 2010 23:25:20 +0100

Stop worrying notice when no signature present

When no signature is present, there was a message saying
"Unable to determine validity of cryptographic signature".
This fix means that if there are no error messages and no
messages about signature verification then the message is
assumed to not be signed at all. This fix also saves the
encrypted messages to a temp file with a suffix of .asc
to stop gpg complaining about "unknown suffix".

Diffstat:
M lib/sup/crypto.rb | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
@@ -108,6 +108,9 @@ EOS
       else
         Chunk::CryptoNotice.new :invalid, $1, output_lines
       end
+    elsif output_lines.length == 0 && rc == 0
+      # the message wasn't signed
+      Chunk::CryptoNotice.new :valid, "Encrypted message wasn't signed", output_lines
     else
       unknown_status output_lines
     end