[Tkabber-dev] [tclgpg] r71 committed - * tclgpg.tcl, tclgpg.test: Don't issue broken pipe error in case when...

codesite-noreply at google.com codesite-noreply at google.com
Sat Oct 10 01:25:25 MSD 2009


Revision: 71
Author: sgolovan
Date: Fri Oct  9 14:24:30 2009
Log: 	* tclgpg.tcl, tclgpg.test: Don't issue broken pipe error in case when
	  recipient's public key is missing or unusable.

	* gnupg/pubring.gpg~, gnupg/random_seed: Removed unnecessary files.

http://code.google.com/p/tclgpg/source/detail?r=71

Deleted:
  /trunk/gnupg/pubring.gpg~
  /trunk/gnupg/random_seed
Modified:
  /trunk/ChangeLog
  /trunk/tclgpg.tcl
  /trunk/tclgpg.test

=======================================
--- /trunk/gnupg/pubring.gpg~	Sat Aug 15 12:58:44 2009
+++ /dev/null	
Binary file, no diff available.
=======================================
--- /trunk/gnupg/random_seed	Mon Aug 31 08:52:03 2009
+++ /dev/null	
Binary file, no diff available.
=======================================
--- /trunk/ChangeLog	Mon Aug 31 08:52:03 2009
+++ /trunk/ChangeLog	Fri Oct  9 14:24:30 2009
@@ -1,3 +1,10 @@
+2009-10-10  Sergei Golovan  <sgolovan at nes.ru>
+
+	* tclgpg.tcl, tclgpg.test: Don't issue broken pipe error in case when
+	  recipient's public key is missing or unusable.
+
+	* gnupg/pubring.gpg~, gnupg/random_seed: Removed unnecessary files.
+
  2009-08-31  Sergei Golovan  <sgolovan at nes.ru>

  	* tclgpg.test: Fixed results in two tests and added cleanup code
=======================================
--- /trunk/tclgpg.tcl	Thu Aug 20 07:56:18 2009
+++ /trunk/tclgpg.tcl	Fri Oct  9 14:24:30 2009
@@ -1590,6 +1590,18 @@
              UNEXPECTED {
                  set state(sig:status) nosig
              }
+            INV_RECP {
+                switch -- [lindex $fields 2] {
+                    0 - 1 - 2 {
+                        FinishWithError $channels $commands "Public key  
not found"
+                        return
+                    }
+                    default {
+                        FinishWithError $channels $commands "Unusable  
public key"
+                        return
+                    }
+                }
+            }
          }
      }

=======================================
--- /trunk/tclgpg.test	Mon Aug 31 08:52:03 2009
+++ /trunk/tclgpg.test	Fri Oct  9 14:24:30 2009
@@ -385,6 +385,26 @@
      $c set -property signers -value  
0FCE5909C0AD7044BAF1C2A94A6276E6C52F1712
      $c sign -input $message
  } -returnCodes error -result {Bad passphrase} -cleanup {$c free}
+
+test encrypt-1.1 {Encrypt to unknown recipient} -body {
+    set c [::gpg::new]
+    set r [::gpg::recipient]
+    $r add -name unknown at example.org -validity full
+    $c encrypt -input $message -recipients $r
+} -cleanup {
+    $c free
+    $r free
+} -returnCodes error -result {Public key not found}
+
+#test encrypt-1.2 {Encrypt to a recipient with expired key} -body {
+#    set c [::gpg::new]
+#    set r [::gpg::recipient]
+#    $r add -name ??? -validity full
+#    $c encrypt -input $message -recipients $r
+#} -cleanup {
+#    $c free
+#    $r free
+#} -returnCodes error -result {Unusable public key}

  cleanupTests



More information about the Tkabber-dev mailing list