From: Richard Levitte Date: Tue, 29 Sep 2020 16:31:58 +0000 (+0200) Subject: descrip.mms.tmpl: Add a target to install the FIPS module config X-Git-Tag: openssl-3.0.0-alpha7~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8cab385ec522aa9a78e8f507becc90ec3a6c8fdb;p=thirdparty%2Fopenssl.git descrip.mms.tmpl: Add a target to install the FIPS module config Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13032) --- diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index b30d08b53a2..a2f3293c546 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -121,6 +121,13 @@ SHLIB_TARGET={- $target{shared_target} -} LIBS={- join(", ", map { "-\n\t".$_.".OLB" } @libs) -} SHLIBS={- join(", ", map { "-\n\t".$_.".EXE" } @shlibs) -} +FIPSMODULENAME={- # We do some extra checking here, as there should be only one + my @fipsmodules = + grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} + && $unified_info{attributes}->{modules}->{$_}->{fips} } + @{$unified_info{modules}}; + die "More that one FIPS module" if scalar @fipsmodules > 1; + join(", ", map { basename platform->dso($_) } @fipsmodules) -} MODULES={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{modules}}) -} PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{programs}}) -} SCRIPTS={- join(", ", map { "-\n\t".$_ } @{$unified_info{scripts}}) -} @@ -539,6 +546,18 @@ install_docs : install_html_docs uninstall_docs : uninstall_html_docs +install_fips: install_sw + @ WRITE SYS$OUTPUT "*** Installing FIPS module configuration" + @ WRITE SYS$OUTPUT "fipsinstall $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).cnf" + openssl fipsinstall - + -module ossl_installroot:[MODULES{- $sover_dirname.$target{pointer_size} -}.'arch']$(FIPSMODULENAME) - + -out ossl_installroot:[MODULES{- $sover_dirname.$target{pointer_size} -}.'arch']$(FIPSMODULENAME).cnf - + -macopt "key:$(FIPSKEY)" + +uninstall_fips: uninstall_sw + @ WRITE SYS$OUTPUT "*** Uninstalling FIPS module configuration" + DELETE ossl_installroot:[MODULES{- $sover_dirname.$target{pointer_size} -}.'arch']$(FIPSMODULENAME).cnf;* + install_ssldirs : check_INSTALLTOP - CREATE/DIR/PROT=(S:RWED,O:RWE,G:RE,W:RE) OSSL_DATAROOT:[000000] IF F$SEARCH("OSSL_DATAROOT:[000000]CERTS.DIR;1") .EQS. "" THEN -