Skip to content

Commit

Permalink
Configure/Makefile: use the correct openssl app for FIPS installation
Browse files Browse the repository at this point in the history
The `openssl` app was previously called without a path, which
would generally invoke the system's copy of the openssl application.
Currently, that's most likely an openssl version 1.1.1 application,
which does not recognize the `fipsinstall` command and terminates
with an error message.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#13684)
  • Loading branch information
mspncp committed Apr 29, 2021
1 parent 59cf286 commit b6821df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Configurations/unix-Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ uninstall_docs: uninstall_man_docs uninstall_html_docs
install_fips: install_sw
@$(ECHO) "*** Installing FIPS module configuration"
@$(ECHO) "fipsinstall $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).cnf"
@openssl fipsinstall -module $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME) \
@$(PERL) $(BLDDIR)/util/wrap.pl $(BLDDIR)/apps/openssl fipsinstall \
-module $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME) \
-out $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).cnf \
-macopt 'hexkey:$(FIPSKEY)'

Expand Down
11 changes: 6 additions & 5 deletions Configurations/windows-makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -472,15 +472,16 @@ uninstall_docs: uninstall_html_docs

install_fips: install_sw
@$(ECHO) "*** Installing FIPS module configuration"
@$(ECHO) "fipsinstall $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).cnf"
@openssl fipsinstall -module $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME) \
-out $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).cnf \
@$(ECHO) "fipsinstall $(MODULESDIR)\$(FIPSMODULENAME).cnf"
@$(PERL) "$(BLDDIR)\util\wrap.pl" "$(BLDDIR)\apps\openssl" fipsinstall \
-module "$(MODULESDIR)\$(FIPSMODULENAME)" \
-out "$(MODULESDIR)\$(FIPSMODULENAME).cnf" \
-macopt "hexkey:$(FIPSKEY)"

uninstall_fips: uninstall_sw
@$(ECHO) "*** Uninstalling FIPS module configuration"
@$(ECHO) "$(RM) $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).cnf"
@$(RM) $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).cnf
@$(ECHO) "$(RM) $(MODULESDIR)\$(FIPSMODULENAME).cnf"
@$(RM) "$(MODULESDIR)\$(FIPSMODULENAME).cnf"

install_ssldirs:
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(OPENSSLDIR)\certs"
Expand Down

0 comments on commit b6821df

Please sign in to comment.