]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Configure/Makefile: don't generate a fresh fipsmodule.cnf when installing it
authorDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Wed, 14 Apr 2021 18:37:37 +0000 (20:37 +0200)
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Thu, 29 Apr 2021 09:26:57 +0000 (11:26 +0200)
There is already a `providers/fipsmodule.cnf` target which is required by
the tests. Instead of creating another fipsmodule.cnf, the `install_fips`
target simply copies that configuration file to its final destination.

This commit also restores the minimal dependencies to build the `install_fips`
target immediately after configuring, which was broken after the removal
of the `install_sw` dependency.

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

Configurations/unix-Makefile.tmpl
Configurations/windows-makefile.tmpl

index 778c19897225100a0659214a4859212d28fd3ba1..bc82527579d061a42c0df3ab19420070d49fa19d 100644 (file)
@@ -594,7 +594,7 @@ install_docs: install_man_docs install_html_docs
 uninstall_docs: uninstall_man_docs uninstall_html_docs
        $(RM) -r $(DESTDIR)$(DOCDIR)
 
-install_fips:
+install_fips: build_sw providers/fipsmodule.cnf
        @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
        @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(MODULESDIR)
        @$(ECHO) "*** Installing FIPS module"
@@ -604,11 +604,8 @@ install_fips:
        @mv -f $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).new \
               $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME)
        @$(ECHO) "*** Installing FIPS module configuration"
-       @$(ECHO) "fipsinstall $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf"
-       @$(PERL) $(BLDDIR)/util/wrap.pl $(BLDDIR)/apps/openssl fipsinstall \
-               -module $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME) \
-               -out $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf \
-               -macopt 'hexkey:$(FIPSKEY)'
+       @$(ECHO) "install providers/fipsmodule.cnf -> $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf"
+       @cp providers/fipsmodule.cnf $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf
 
 uninstall_fips:
        @$(ECHO) "*** Uninstalling FIPS module configuration"
index 3685b4fa7a1e701bb96f24608886223f09ff1c47..1e388d0b5f6e480d1adc2c1d7a390cfa09eee60e 100644 (file)
@@ -477,7 +477,7 @@ install_docs: install_html_docs
 
 uninstall_docs: uninstall_html_docs
 
-install_fips:
+install_fips: build_sw providers\fipsmodule.cnf
 #      @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
        @$(PERL) $(SRCDIR)\util\mkdir-p.pl $(MODULESDIR)
        @$(ECHO) "*** Installing FIPS module"
@@ -486,11 +486,8 @@ install_fips:
        @move /Y $(MODULESDIR)\$(FIPSMODULENAME).new \
               $(MODULESDIR)\$(FIPSMODULENAME)
        @$(ECHO) "*** Installing FIPS module configuration"
-       @$(ECHO) "fipsinstall $(OPENSSLDIR)\fipsmodule.cnf"
-       @$(PERL) "$(BLDDIR)\util\wrap.pl" "$(BLDDIR)\apps\openssl" fipsinstall \
-               -module "$(MODULESDIR)\$(FIPSMODULENAME)" \
-               -out "$(OPENSSLDIR)\fipsmodule.cnf" \
-               -macopt "hexkey:$(FIPSKEY)"
+       @$(ECHO) "install providers\fipsmodule.cnf -> $(OPENSSLDIR)\fipsmodule.cnf"
+    @copy providers\fipsmodule.cnf "$(OPENSSLDIR)\fipsmodule.cnf"
 
 uninstall_fips:
        @$(ECHO) "*** Uninstalling FIPS module configuration"