Package: libgnupg-perl
Severity: wishlist
Tags: patch

gpg helpfully reports when signature validation fails because the
public key isn't here. libgnupg-perl rather less helpfully discards
this information. Here's a patch to propagate it.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |
--- /usr/share/perl5/GnuPG.pm   2005-03-08 19:58:42.000000000 +0000
+++ GnuPG.pm    2005-05-26 02:36:43.000000000 +0100
@@ -614,9 +614,17 @@
     $self->abort_gnupg( "invalid signature from ", $arg =~ /[^ ](.+)/, "\n" )
       if ( $cmd =~ /BADSIG/);
 
-    $self->abort_gnupg( "error verifying signature from ", 
-                       $arg =~ /([^ ])/, "\n" )
-      if ( $cmd =~ /ERRSIG/);
+    if ( $cmd =~ /ERRSIG/)
+      {
+        my ($keyid, $key_algo, $digest_algo, $sig_class, $timestamp, $rc)
+           = split ' ', $arg;
+        if ($rc == 9)
+          {
+            ($cmd, $arg) = $self->read_from_status();
+            $self->abort_gnupg( "no public key $keyid" );
+          }
+        $self->abort_gnupg( "error verifying signature from $keyid" )
+      }
 
     $self->abort_gnupg ( "protocol error: expected SIG_ID" )
       unless $cmd =~ /SIG_ID/;

Attachment: signature.asc
Description: Digital signature

Reply via email to