]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Make 'tests' depend on a generated 'providers/fipsmodule.cnf'
authorRichard Levitte <levitte@openssl.org>
Thu, 25 Feb 2021 16:46:36 +0000 (17:46 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 3 Mar 2021 13:47:43 +0000 (14:47 +0100)
providers/fipsmodule.cnf is generated using 'openssl fipsinstall' with
the openssl program in the build directory.

Fixes #14315

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

providers/build.info

index b365bda0eca9cec4a47044cc8ba931c96aad0e72..1fab34c28d1b0da20933e2eaf14b28d2390d3cb9 100644 (file)
@@ -142,6 +142,16 @@ IF[{- !$disabled{fips} -}]
   # statements, the final build file will not have a trace of it.
   MODULES{fips}=$FIPSGOAL
   LIBS{noinst}=$LIBFIPS
+
+  # For tests that try to use the FIPS module, we need to make a local fips
+  # module installation.  We have the output go to standard output, because
+  # the generated commands in build templates are expected to catch that,
+  # and thereby keep control over the exact output file location.
+  DEPEND[|tests|]=fipsmodule.cnf
+  GENERATE[fipsmodule.cnf]=../apps/openssl fipsinstall \
+        -module providers/$(FIPSMODULENAME) -provider_name fips \
+        -mac_name HMAC -section_name fips_sect -out -
+  DEPEND[fipsmodule.cnf]=$FIPSGOAL
 ENDIF
 
 #