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:
parent
0732ff6e14
commit
efe069210c
1 changed files with 9 additions and 5 deletions
14
pgpverify
14
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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue