Version 1.3. Skip minor pgp signature headers like "charset:" after
"version:" header and until the empty line that starts the base64 signature block.
This commit is contained in:
parent
31a0b89189
commit
c27413448f
1 changed files with 13 additions and 8 deletions
21
signcontrol
21
signcontrol
|
@ -1,6 +1,10 @@
|
||||||
#!/usr/local/bin/perl5 -w
|
#!/usr/local/bin/perl5 -w
|
||||||
# written April 1996, tale@uunet.uu.net (David C Lawrence)
|
# written April 1996, tale@isc.org (David C Lawrence)
|
||||||
# Version 1.2.1
|
# Version 1.3
|
||||||
|
#
|
||||||
|
# Changes from 1.2.3 to 1.3:
|
||||||
|
# -- skip minor pgp signature headers like "charset:" after "version:" header
|
||||||
|
# and until the empty line that starts the base64 signature block
|
||||||
|
|
||||||
# CONFIGURATION
|
# CONFIGURATION
|
||||||
|
|
||||||
|
@ -25,9 +29,9 @@ $pgpheader = "X-PGP-Sig";
|
||||||
$force{'Path'} = 'bounce-back';
|
$force{'Path'} = 'bounce-back';
|
||||||
$force{'From'} = 'YOUR_ADDRESS_AND_NAME';
|
$force{'From'} = 'YOUR_ADDRESS_AND_NAME';
|
||||||
$force{'Approved'} = 'ADDRESS_FOR_Approved_HEADER';
|
$force{'Approved'} = 'ADDRESS_FOR_Approved_HEADER';
|
||||||
$force{'X-Info'}='ftp://ftp.uu.net/networking/news/misc/pgpcontrol/README.html'
|
$force{'X-Info'}='ftp://ftp.isc.org/pub/pgpcontrol/README.html'
|
||||||
. "\n\t"
|
. "\n\t"
|
||||||
. 'ftp://ftp.uu.net/networking/news/misc/pgpcontrol/README';
|
. 'ftp://ftp.isc.org/pub/pgpcontrol/README';
|
||||||
|
|
||||||
# host for message-id; this could be determined automatically based on where
|
# host for message-id; this could be determined automatically based on where
|
||||||
# it is run, but consistency is the goal here
|
# it is run, but consistency is the goal here
|
||||||
|
@ -183,9 +187,9 @@ readhead
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
chop($date = `$get_date`);
|
|
||||||
$header{'Date'} = $date;
|
|
||||||
$header{'Message-ID'} = '<' . time . ".$$\@$id_host>";
|
$header{'Message-ID'} = '<' . time . ".$$\@$id_host>";
|
||||||
|
$header{'Date'} = `$get_date`;
|
||||||
|
chop($header{'Date'}) if $header{'Date'};
|
||||||
|
|
||||||
for (@ignoreheaders) {
|
for (@ignoreheaders) {
|
||||||
$die .= "ignored header $_ also has forced value set\n" if $force{$_};
|
$die .= "ignored header $_ also has forced value set\n" if $force{$_};
|
||||||
|
@ -324,8 +328,9 @@ signit
|
||||||
unless /^Version: (\S+)$/;
|
unless /^Version: (\S+)$/;
|
||||||
$header{$pgpheader} = "$1 $signheaders";
|
$header{$pgpheader} = "$1 $signheaders";
|
||||||
|
|
||||||
chomp($_ = <FH>);
|
do { # skip other pgp headers like "charset:" until empty line
|
||||||
die "$0: didn't find an empty line after PGP Version\n" unless /^$/;
|
$_ = <FH>; # ... is charset significant to this application?
|
||||||
|
} while ! /^$/;
|
||||||
|
|
||||||
while (<FH>) {
|
while (<FH>) {
|
||||||
chomp;
|
chomp;
|
||||||
|
|
Loading…
Reference in a new issue