]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
checksum: include header files in the checksumming output
authorPauli <pauli@openssl.org>
Thu, 20 May 2021 03:48:15 +0000 (13:48 +1000)
committerPauli <pauli@openssl.org>
Tue, 25 May 2021 09:36:27 +0000 (19:36 +1000)
Fixes #15133

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15365)

Configurations/unix-Makefile.tmpl
util/fips-checksums.sh

index 6fdd761bcea54933dd9d1c6537ffbd9202d85a78..c428b5f85a7e961e2cd996324a9cfd9107cb0d4b 100644 (file)
@@ -1234,24 +1234,46 @@ providers/fips.module.sources.new: \
        ( \
          srcdir=`cd $(SRCDIR); pwd`; \
          cd sources-tmp \
-         && $$srcdir/Configure --banner=Configured enable-fips \
+         && $$srcdir/Configure --banner=Configured enable-fips -O0 \
          && ./configdata.pm --query 'get_sources("providers/fips")' > sources1 \
-         && $$srcdir/Configure --banner=Configured enable-fips no-asm \
+         && $(MAKE) -sj 4 \
+         && find .. -name '*.d' | xargs cat > dep1 \
+          && $(MAKE) distclean \
+         && $$srcdir/Configure --banner=Configured enable-fips no-asm -O0 \
          && ./configdata.pm --query 'get_sources("providers/fips")' > sources2 \
+         && $(MAKE) -sj 4 \
+         && find .. -name '*.d' | xargs cat > dep2 \
+         && cat sources1 sources2 \
+            | grep -v ' : \\$$' | grep -v util/providers.num \
+            | sed -E -e 's:^ *([.][.]/)*$(SRCDIR)::' -e 's: \\::' \
+            | sort | uniq > sources \
+         && cat dep1 dep2 | grep -v providers/common/include/prov/der_ >deps \
        )
        ( \
-         srcdir2=`if [ "$(SRCDIR)" = "." ]; then echo ".."; elif echo "$(SRCDIR)" | grep '^/' > /dev/null; then echo "$(SRCDIR)"; else echo "../$(SRCDIR)"; fi`; \
-         cat sources-tmp/sources1 sources-tmp/sources2 \
-         | grep -v ' : \\$$' | sed -e 's| \\$$||' -e "s|^  $$srcdir2/||"; \
+         perl -p -e 's/\\\n//' sources-tmp/deps \
+            | sed -e 's/^.*: *//' -e 's/  */ /g' \
+            | fgrep -f sources-tmp/sources | tr ' ' '\n' \
+            | sed -E -e '/^include/s:$$:.in:' -e 's:^ *([.][.]/)*$(SRCDIR)::' -e 's:^/::' ; \
+         for x in providers/common/include/prov/*.h; do \
+           echo providers/common/der/`basename "$$x"`.in; \
+         done ; \
+         for x in providers/common/der/*.c; do \
+           echo "$$x".in; \
+         done ; \
+         for x in `cat sources-tmp/sources`; do \
+           if [ -f "$(SRCDIR)$$x" ]; then echo $$x | sed 's:^/::' ; fi ; \
+         done ; \
          cd $(SRCDIR); \
          for x in crypto/bn/asm/*.pl crypto/bn/asm/*.S \
                   crypto/aes/asm/*.pl crypto/aes/asm/*.S \
                   crypto/ec/asm/*.pl \
                   crypto/modes/asm/*.pl \
-                  crypto/sha/asm/*.pl; do \
+                  crypto/sha/asm/*.pl \
+                  crypto/x86_64cpuid.pl; do \
            echo "$$x"; \
          done \
-       ) | sort | uniq > providers/fips.module.sources.new
+       ) | sed -e 's:/[^/]*/[^/]*/[.][.]/[.][.]/:/:g' -e 's:/[^/]*/[.][.]/:/:g' \
+         | sort | uniq > providers/fips.module.sources.new
        rm -rf sources-tmp
 
 # Set to -force to force a rebuild
index 36e59bb70821e21fb49ed0c1882d15f505c14ff0..aff8d0ccce636482d52bcc4ace9f1262c591057e 100755 (executable)
@@ -8,7 +8,7 @@ for f in "$@"; do
     # the '*stdin' marker to the filename preceded by a space.  See the
     # sha1sum manual for a specification of the format.
     case "$f" in
-        *.c | *.)
+        *.c | *.c.in | *.h | *.h.in | *.inc)
             cat "$f" \
                 | $HERE/lang-compress.pl 'C' \
                 | unifdef -DFIPS_MODULE=1 \