From c27413448f32544415e278a5f67e90f4d27fe168 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 8 Aug 1997 01:04:22 +0000 Subject: [PATCH] Version 1.3. Skip minor pgp signature headers like "charset:" after "version:" header and until the empty line that starts the base64 signature block. --- signcontrol | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/signcontrol b/signcontrol index 8f56a8c..3ccf330 100755 --- a/signcontrol +++ b/signcontrol @@ -1,6 +1,10 @@ #!/usr/local/bin/perl5 -w -# written April 1996, tale@uunet.uu.net (David C Lawrence) -# Version 1.2.1 +# written April 1996, tale@isc.org (David C Lawrence) +# 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 @@ -25,9 +29,9 @@ $pgpheader = "X-PGP-Sig"; $force{'Path'} = 'bounce-back'; $force{'From'} = 'YOUR_ADDRESS_AND_NAME'; $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" - . '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 # 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{'Date'} = `$get_date`; + chop($header{'Date'}) if $header{'Date'}; for (@ignoreheaders) { $die .= "ignored header $_ also has forced value set\n" if $force{$_}; @@ -324,8 +328,9 @@ signit unless /^Version: (\S+)$/; $header{$pgpheader} = "$1 $signheaders"; - chomp($_ = ); - die "$0: didn't find an empty line after PGP Version\n" unless /^$/; + do { # skip other pgp headers like "charset:" until empty line + $_ = ; # ... is charset significant to this application? + } while ! /^$/; while () { chomp;