diff options
author | Richard Levitte <levitte@openssl.org> | 2021-04-26 19:44:24 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-05-04 11:32:16 +0200 |
commit | 27ca03ea829443ee750db148dde87cf3da900d9c (patch) | |
tree | 2b36a7381e188552b4bb33da8ddcb1baf0c71570 /Configurations | |
parent | Add OpenSSL::Config::Query and use it in configdata.pm (diff) | |
download | openssl-27ca03ea829443ee750db148dde87cf3da900d9c.tar.xz openssl-27ca03ea829443ee750db148dde87cf3da900d9c.zip |
Unix build file: Add a target to create providers/fips.module.sources
This file will be the basis for the FIPS module checksum calculation
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8871)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 4ace44477d..e730e1dee1 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -1137,6 +1137,42 @@ generate_doc_buildinfo: mv $(SRCDIR)/doc/build.info.new $(SRCDIR)/doc/build.info; \ fi ) +{- output_off() if $disabled{fips}; "" -} +generate_fips_sources: $(SRCDIR)/providers/fips.module.sources +$(SRCDIR)/providers/fips.module.sources: \ + $(SRCDIR)/Configure \ + {- join(" \\\n" . ' ' x 16, + fill_lines(" ", $COLUMNS - 16, + @{$config{build_file_templates}}, + @{$config{build_infos}}, + @{$config{conf_files}})) -} + rm -rf sources-tmp + mkdir sources-tmp + ( \ + srcdir=`cd $(SRCDIR); pwd`; \ + cd sources-tmp \ + && $$srcdir/Configure enable-fips \ + && ./configdata.pm --query 'get_sources("providers/fips")' > sources1 \ + && $$srcdir/Configure enable-fips no-asm \ + && ./configdata.pm --query 'get_sources("providers/fips")' > sources2 \ + ) + ( \ + 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/||"; \ + 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/md5/asm/*.pl \ + crypto/modes/asm/*.pl \ + crypto/sha/asm/*.pl; do \ + echo "$$x"; \ + done \ + ) | sort | uniq > $(SRCDIR)/providers/fips.module.sources + rm -rf sources-tmp +{- output_on() if $disabled{fips}; "" -} + # Set to -force to force a rebuild ERROR_REBUILD= errors: |