From efe069210cd6009a9c3363e70fdbba79b231e236 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 2 Apr 1998 22:54:15 +0000 Subject: [PATCH] Version 1.9. Match 'Bad signature' pgp output to return exit status 3 by removing '^' in regexp matched on multiline string. --- pgpverify | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pgpverify b/pgpverify index 35d6365..012b24e 100755 --- a/pgpverify +++ b/pgpverify @@ -1,6 +1,10 @@ #! /usr/bin/perl -ws # written April 1996, tale@isc.org (David C Lawrence) -# Version 1.8 +# Version 1.9 +# +# Changes from 1.8 -> 1.9 +# -- match 'Bad signature' pgp output to return exit status 3 by removing +# '^' in regexp matched on multiline string. # # Changes from 1.7 -> 1.8 # -- ignore final dot-CRLF if article is in NNTP format @@ -163,12 +167,12 @@ print if $test; # 1024 bits, Key ID B88DA9C1, Created 1996-04-10 # "news.announce.newgroups" -if (/Good signature from user(: (.*)| "(.*)"\.)/ || - /Good signature made .* by key:\n.+\n +"(.*)"/) { +if (/Bad signature /) { + $ok = 3; +} elsif (/Good signature from user(: (.*)| "(.*)"\.)/ || + /Good signature made .* by key:\n.+\n +"(.*)"/) { $ok = 0; $signer = $+; -} elsif (/^Bad signature /) { - $ok = 3; } elsif (/Keyring file '(.*)' does not exist/) { &fail("$0: couldn't access $1. Bad \$HOME or \$PGPPATH?\n"); }