Version 1.9. Match 'Bad signature' pgp output to return exit status 3 by

removing '^' in regexp matched on multiline string.
This commit is contained in:
David Lawrence 1998-04-02 22:54:15 +00:00
parent 0732ff6e14
commit efe069210c

View file

@ -1,6 +1,10 @@
#! /usr/bin/perl -ws #! /usr/bin/perl -ws
# written April 1996, tale@isc.org (David C Lawrence) # 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 # Changes from 1.7 -> 1.8
# -- ignore final dot-CRLF if article is in NNTP format # -- 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 # 1024 bits, Key ID B88DA9C1, Created 1996-04-10
# "news.announce.newgroups" # "news.announce.newgroups"
if (/Good signature from user(: (.*)| "(.*)"\.)/ || if (/Bad signature /) {
/Good signature made .* by key:\n.+\n +"(.*)"/) { $ok = 3;
} elsif (/Good signature from user(: (.*)| "(.*)"\.)/ ||
/Good signature made .* by key:\n.+\n +"(.*)"/) {
$ok = 0; $ok = 0;
$signer = $+; $signer = $+;
} elsif (/^Bad signature /) {
$ok = 3;
} elsif (/Keyring file '(.*)' does not exist/) { } elsif (/Keyring file '(.*)' does not exist/) {
&fail("$0: couldn't access $1. Bad \$HOME or \$PGPPATH?\n"); &fail("$0: couldn't access $1. Bad \$HOME or \$PGPPATH?\n");
} }