summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2021-06-02 10:37:10 +1000
committerPauli <pauli@openssl.org>2021-06-03 11:56:21 +1000
commitc912e0c61682864a05d04273b141270084aa4df4 (patch)
tree243fd03abdb6d1e68a8cf1d81fb4734a81eab446 /util
parent8a5bd05da84ed635a8cb7a29004598e16f5dea70 (diff)
util: update FIPS checksumming script to be more aggressive with whitespace
Fixes #15562 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15574)
Diffstat (limited to 'util')
-rwxr-xr-xutil/lang-compress.pl14
1 files changed, 5 insertions, 9 deletions
diff --git a/util/lang-compress.pl b/util/lang-compress.pl
index 6898877587..ddf1d1ec6f 100755
--- a/util/lang-compress.pl
+++ b/util/lang-compress.pl
@@ -80,15 +80,7 @@ if ($lang eq 'C') {
s{
(?| # All things preserved end up in $1
- (\n)\h+ # Spaces at start of lines removed
-
- |
-
- \h+(\n) # Spaces at end of lines removed
-
- |
-
- \h+ # Other horizontal spaces replaced with one
+ \h+ # Horizontal spaces replaced with one
| # OR
@@ -104,6 +96,10 @@ if ($lang eq 'C') {
}
defined $1 ? $1 : " "
}gsxe;
+
+ # Clean up spaces at start and end of lines
+ s/^ //mg;
+ s/ $//mg;
} elsif ($lang eq 'S') {
# Because we use C++ style comments in our .S files, all we can do
# is to drop them