Fix for pgpverify w/ gpg
    Alex Kiernan 
    alexk at demon.net
       
    Wed May 29 14:57:05 UTC 2002
    
    
  
I've not committed this as I'm not sure how the upstream is supposed
to work w/ pgpverify, but this patch fixes two problems - if you don't
have pgp installed the code gives up even if that wasn't what you
wanted to use, and secondly it looks for pubring.pgp rather than
pubring.gpg even when running gpg (which might be the right thing &
I've misunderstood how something's supposed to work).
Index: control/pgpverify.in
===================================================================
RCS file: /dist1/cvs/isc/inn/inn/control/pgpverify.in,v
retrieving revision 1.2
diff -u -r1.2 pgpverify.in
--- control/pgpverify.in	2002/04/18 04:29:17	1.2
+++ control/pgpverify.in	2002/05/29 14:53:20
@@ -170,7 +170,11 @@
   $keyring = $inn'newsetc . '/pgp' if -d $inn'newsetc . '/pgp';
 }
 
-if (! -x $pgp) {
+if ($gpgv) {
+  if (! -x $gpgv) {
+    &fail("$0: $gpgv: " . (-e _ ? "cannot execute" : "no such file") . "\n");
+  }
+} elsif (! -x $pgp) {
   &fail("$0: $pgp: " . (-e _ ? "cannot execute" : "no such file") . "\n");
 }
 
@@ -343,9 +347,9 @@
 
   $opts = '--quiet --status-fd=1 --logger-fd=1';
   if ($ring) {
-    $opts .= " --keyring=$ring/pubring.pgp";
+    $opts .= " --keyring=$ring/pubring.gpg";
   } else {
-    $opts .= " --keyring=pubring.pgp";
+    $opts .= " --keyring=pubring.gpg";
   }
 
   open(PGP, "$gpgv $opts $file 2> /dev/null |") ||
-- 
Alex Kiernan, Principal Engineer, Development, Thus PLC
    
    
More information about the inn-workers
mailing list