diff options
author | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2021-01-07 18:47:01 +0100 |
---|---|---|
committer | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2021-04-29 11:26:57 +0200 |
commit | 5b689181853ca6d240d756cd7d65678124838b11 (patch) | |
tree | a30cc04f4ef4069dbcee94476e4a562ad31ee8d4 /Configurations/unix-Makefile.tmpl | |
parent | c3bda8a2e0d51a8be2c2c0afc673048bc9457dcd (diff) |
Configure/Makefile: separate install of the FIPS module
Fixes #13693
Co-authored-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13684)
Diffstat (limited to 'Configurations/unix-Makefile.tmpl')
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 9d5bfe0bd1..778c198972 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -164,12 +164,21 @@ INSTALL_ENGINES={- && $unified_info{attributes}->{modules}->{$_}->{engine} } @{$unified_info{modules}})) -} +INSTALL_FIPS={- + join(" \\\n" . ' ' x 16, + fill_lines(" ", $COLUMNS - 16, + map { platform->dso($_) } + grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} + && $unified_info{attributes}->{modules}->{$_}->{fips} } + @{$unified_info{modules}})) +-} INSTALL_MODULES={- join(" \\\n" . ' ' x 16, fill_lines(" ", $COLUMNS - 16, map { platform->dso($_) } grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} - && !$unified_info{attributes}->{modules}->{$_}->{engine} } + && !$unified_info{attributes}->{modules}->{$_}->{engine} + && !$unified_info{attributes}->{modules}->{$_}->{fips} } @{$unified_info{modules}})) -} INSTALL_PROGRAMS={- @@ -585,7 +594,15 @@ install_docs: install_man_docs install_html_docs uninstall_docs: uninstall_man_docs uninstall_html_docs $(RM) -r $(DESTDIR)$(DOCDIR) -install_fips: install_sw +install_fips: + @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1) + @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(MODULESDIR) + @$(ECHO) "*** Installing FIPS module" + @$(ECHO) "install $(INSTALL_FIPS) -> $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME)" + @cp "$(INSTALL_FIPS)" $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).new + @chmod 755 $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).new + @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 \ @@ -593,9 +610,11 @@ install_fips: install_sw -out $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf \ -macopt 'hexkey:$(FIPSKEY)' -uninstall_fips: uninstall_sw +uninstall_fips: @$(ECHO) "*** Uninstalling FIPS module configuration" $(RM) $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf + @$(ECHO) "*** Uninstalling FIPS module" + $(RM) $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME) install_ssldirs: @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/certs |