#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
}
while ( defined($_ = $io->getline) ) {
- if ( /^-----BEGIN PGP (SIGNED )?MESSAGE-----/ ) {
+ if ( /^-----BEGIN PGP (SIGNED )?MESSAGE-----\s*$/ ) {
return $1? 'signed': 'encrypted';
}
- elsif ( $check_for_signature && !/^-----BEGIN PGP SIGNATURE-----/ ) {
+ elsif ( $check_for_signature && !/^-----BEGIN PGP SIGNATURE-----\s*$/ ) {
return 'signature';
}
}
binmode $block_fh, ':raw';
while ( defined(my $str = $io->getline) ) {
- if ( $in_block && $str =~ /^-----END PGP (?:MESSAGE|SIGNATURE)-----/ ) {
+ if ( $in_block && $str =~ /^-----END PGP (?:MESSAGE|SIGNATURE)-----\s*$/ ) {
print $block_fh $str;
$in_block--;
next if $in_block > 0;
binmode $block_fh, ':raw';
$in_block = 0;
}
- elsif ( $str =~ /^-----BEGIN PGP (SIGNED )?MESSAGE-----/ ) {
+ elsif ( $str =~ /^-----BEGIN PGP (SIGNED )?MESSAGE-----\s*$/ ) {
$in_block++;
print $block_fh $str;
}