Article View: news.software.nntp
Article #52447Re: pgp (gnupg 1.0.5 ...)
From: Alex Kiernan
Date: Wed, 23 May 2001 12:43
Date: Wed, 23 May 2001 12:43
168 lines
7057 bytes
7057 bytes
valery.lang@cemef.cma.fr (Val๏ฟฝry LANG) writes:
> Is it possible to verify the good working of pgp (gnupg 1.0.5) in
> inn 2.3.2 with a special command on prompt ?
>
This isn't actually tested (yet), but I think it does the right thing
for gpg in 2.3.2; I haven't submitted it back though since as Russ
points out the plan is to do something different for 2.4 (note you
need to rerun autoconf after applying this, I haven't included the
configure patches as they're huge):
Index: upstream/inn/configure.in
diff -u upstream/inn/configure.in:1.1.1.2 upstream/inn/configure.in:1.2
--- upstream/inn/configure.in:1.1.1.2 Thu May 3 14:36:06 2001
+++ upstream/inn/configure.in Wed May 23 11:51:14 2001
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.1.1.2 2001/05/03 13:36:06 alexk Exp $
+dnl $Id: configure.in,v 1.2 2001/05/23 10:51:14 alexk Exp $
-AC_REVISION($Revision: 1.1.1.2 $)dnl
+AC_REVISION($Revision: 1.2 $)dnl
AC_PREREQ(2.13)
dnl FIXME: The separable tests in this file should be broken out into
@@ -426,11 +426,14 @@
INN_PERL_VERSION(5.003)
fi
-dnl Look for PGP 5.0's pgpv, or pgp/pgpgpg if pgpv is not found.
+dnl Look for GPG, then for PGP 5.0's pgpv, or pgp/pgpgpg if pgpv is not found.
pgpverify=true
-AC_PATH_PROGS(_PATH_PGP, pgpv pgp pgpgpg)
-if test -z "$_PATH_PGP" ; then
- pgpverify=false
+AC_PATH_PROGS(_PATH_GPG, gpg)
+if test -z "$_PATH_GPG" ; then
+ AC_PATH_PROGS(_PATH_PGP, pgpv pgp pgpgpg)
+ if test -z "$_PATH_PGP" ; then
+ pgpverify=false
+ fi
fi
AC_SUBST(pgpverify)
Index: upstream/inn/backends/gpgverify.in
diff -u upstream/inn/backends/gpgverify.in:1.1.1.1 upstream/inn/backends/gpgverify.in:1.2
--- upstream/inn/backends/gpgverify.in:1.1.1.1 Thu May 3 14:36:06 2001
+++ upstream/inn/backends/gpgverify.in Wed May 23 11:51:14 2001
@@ -49,9 +49,14 @@
# Path to gpg binary
my $gpg;
-foreach (split(/:/, $ENV{PATH}), qw(/usr/local/bin /opt/gnu/bin)) {
- if (-x "$_/gpg") {
- $gpg = "$_/gpg"; last;
+if ($inn::gpg) {
+ $gpg = $inn::gpg;
+}
+else {
+ foreach (split(/:/, $ENV{PATH}), qw(/usr/local/bin /opt/gnu/bin)) {
+ if (-x "$_/gpg") {
+ $gpg = "$_/gpg"; last;
+ }
}
}
fail('cannot find gpg binary') if not $gpg;
@@ -135,7 +140,7 @@
close TMP or errmsg("close $tmp: $!");
my $opts = '--verify --quiet --batch --no-tty --status-fd=1';
-$opts .= " --homedir=$gpghome" if $gpghome;
+#$opts .= " --homedir=$gpghome" if $gpghome;
open(PGP, "$gpg $opts < $tmp 2>&1 |") or fail("failed to execute $gpg: $!");
Index: upstream/inn/samples/parsecontrol.in
diff -u upstream/inn/samples/parsecontrol.in:1.1.1.1 upstream/inn/samples/parsecontrol.in:1.2
--- upstream/inn/samples/parsecontrol.in:1.1.1.1 Wed May 2 15:52:46 2001
+++ upstream/inn/samples/parsecontrol.in Wed May 23 11:51:14 2001
@@ -1,7 +1,7 @@
#! /bin/sh
# fixscript will replace this line with code to load innshellvars
-## $Revision: 1.1.1.1 $
+## $Revision: 1.2 $
## Initial parsing of control messages.
WRITELOG=${PATHBIN}/writelog
@@ -179,7 +179,12 @@
esac
if $PGPVERIFY; then
- PGPSENDER=`${SM} ${ARTICLE} | pgpverify`;
+ if [ -x ${GPG} ] ; then
+ VERIFY=gpgverify
+ else
+ VERIFY=pgpverify
+ fi
+ PGPSENDER=`${SM} ${ARTICLE} | ${VERIFY}`;
PGP_STATUS=$?
case "${ACTION}:${PGP_STATUS}" in
verify:0)
Index: upstream/inn/scripts/innshellvars.in
diff -u upstream/inn/scripts/innshellvars.in:1.1.1.1 upstream/inn/scripts/innshellvars.in:1.2
--- upstream/inn/scripts/innshellvars.in:1.1.1.1 Wed May 2 15:52:46 2001
+++ upstream/inn/scripts/innshellvars.in Wed May 23 11:51:14 2001
@@ -1,5 +1,5 @@
#!@_PATH_SH@
-## $Revision: 1.1.1.1 $
+## $Revision: 1.2 $
## Set up any and all shell variables that an INN shell script
## might need. Also sets umask.
@@ -72,6 +72,7 @@
EGREP=@_PATH_EGREP@
PERL=@_PATH_PERL@
PGP=@_PATH_PGP@
+GPG=@_PATH_GPG@
SORT="@_PATH_SORT@"
GETFTP="@GETFTP@"
COMPRESS=@COMPRESS@
Index: upstream/inn/scripts/innshellvars.pl.in
diff -u upstream/inn/scripts/innshellvars.pl.in:1.1.1.2 upstream/inn/scripts/innshellvars.pl.in:1.2
--- upstream/inn/scripts/innshellvars.pl.in:1.1.1.2 Thu May 3 14:36:09 2001
+++ upstream/inn/scripts/innshellvars.pl.in Wed May 23 11:51:14 2001
@@ -3,7 +3,7 @@
# Start Date: Sat, 24 Aug 1996 22:08:19 +0200
# Project: INN
# File: innshellvars.pl
-# RCSId: $Id: innshellvars.pl.in,v 1.1.1.2 2001/05/03 13:36:09 alexk Exp $
+# RCSId: $Id: innshellvars.pl.in,v 1.2 2001/05/23 10:51:14 alexk Exp $
# Description: Set up any and all variables that an INN perl script
# might need.
@@ -74,6 +74,7 @@
$egrep = "@_PATH_EGREP@" ;
$perl = "@_PATH_PERL@" ;
$pgp = "@_PATH_PGP@" ;
+$gpg = "@_PATH_GPG@" ;
$sort = "@_PATH_SORT@" ;
$getftp = "@GETFTP@" ;
$compress = "@COMPRESS@" ;
Index: upstream/inn/scripts/innshellvars.tcl.in
diff -u upstream/inn/scripts/innshellvars.tcl.in:1.1.1.1 upstream/inn/scripts/innshellvars.tcl.in:1.2
--- upstream/inn/scripts/innshellvars.tcl.in:1.1.1.1 Wed May 2 15:52:46 2001
+++ upstream/inn/scripts/innshellvars.tcl.in Wed May 23 11:51:14 2001
@@ -4,7 +4,7 @@
# Start Date: Sat, 24 Aug 1996 23:45:34 +0200
# Project: INN
# File: innshellvars.tcl
-# RCSId: $Id: innshellvars.tcl.in,v 1.1.1.1 2001/05/02 14:52:46 alexk Exp $
+# RCSId: $Id: innshellvars.tcl.in,v 1.2 2001/05/23 10:51:14 alexk Exp $
# Description: Set up any and all variables that an INN tcl script
# might need.
@@ -71,6 +71,7 @@
set inn_sed "@_PATH_SED@"
set inn_perl "@_PATH_PERL@"
set inn_pgp "@_PATH_PGP@"
+set inn_gpg "@_PATH_GPG@"
set inn_inndf "${inn_newsbin}/inndf"
set inn_egrep "@_PATH_EGREP@"
set inn_sort "@_PATH_SORT@"
--
Alex Kiernan, Principal Engineer, Development, Thus PLC
Technical Details
Message-ID:
<721ypgz14k.fsf@nd1.eng.demon.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!nd1.eng.demon.net!not-for-mailReferences:
<3b0a1034.60243936@newsbis.cma.fr>Show Full Headers
Complete Article Headers
Message-ID: <721ypgz14k.fsf@nd1.eng.demon.net> Subject: Re: pgp (gnupg 1.0.5 ...) Date: Wed, 23 May 2001 12:43:55 +0000 From: Alex Kiernan <alexk@demon.net> References: <3b0a1034.60243936@newsbis.cma.fr> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!nd1.eng.demon.net!not-for-mail Newsgroups: news.software.nntp Sender: alexk@nd1.eng.demon.net NNTP-Posting-Host: nd1.eng.demon.net X-NNTP-Posting-Host: nd1.eng.demon.net:194.217.90.2 X-Trace: news.demon.co.uk 990621835 nnrp-12:14215 NO-IDENT nd1.eng.demon.net:194.217.90.2 X-Complaints-To: abuse@demon.net User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Canyonlands) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 167