Remove ENGINESDIR variable and engines installation from Makefiles.

For compatibility reasons, OPENSSL_ENGINES_DIR and OPENSSL_INFO_ENGINES_DIR
are still supported but return values like with engines disabled.

The OPENSSL_ENGINES environment variable will be removed with engine
removal later.

Resolves: https://github.com/openssl/project/issues/1425

Signed-off-by: Milan Broz <gmazyland@gmail.com>

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29305)
This commit is contained in:
Milan Broz
2025-09-19 13:03:07 +02:00
committed by Neil Horman
parent 03771bcd3f
commit cfd96295fc
18 changed files with 23 additions and 179 deletions

View File

@@ -72,7 +72,6 @@ jobs:
run: | run: |
echo ${Env:OSSL_VERSION} echo ${Env:OSSL_VERSION}
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32 reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v ENGINESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32 reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32 reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32
- name: get cpu info - name: get cpu info

View File

@@ -63,7 +63,6 @@ jobs:
run: | run: |
echo ${Env:OSSL_VERSION} echo ${Env:OSSL_VERSION}
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32 reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v ENGINESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32 reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32 reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32
- name: download coreinfo - name: download coreinfo
@@ -130,7 +129,6 @@ jobs:
run: | run: |
echo ${Env:OSSL_VERSION} echo ${Env:OSSL_VERSION}
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32 reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v ENGINESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32 reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32 reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32
- name: download coreinfo - name: download coreinfo

View File

@@ -56,13 +56,8 @@
map { platform->sharedname($_) // () } map { platform->sharedname($_) // () }
grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} } grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
@{$unified_info{libraries}}; @{$unified_info{libraries}};
our @install_engines =
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
&& $unified_info{attributes}->{modules}->{$_}->{engine} }
@{$unified_info{modules}};
our @install_modules = our @install_modules =
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
&& !$unified_info{attributes}->{modules}->{$_}->{engine}
&& !$unified_info{attributes}->{modules}->{$_}->{fips} } && !$unified_info{attributes}->{modules}->{$_}->{fips} }
@{$unified_info{modules}}; @{$unified_info{modules}};
our @install_fipsmodules = our @install_fipsmodules =
@@ -109,7 +104,6 @@
@{$config{lib_defines}}, @{$config{shared_defines}}, @{$config{lib_defines}}, @{$config{shared_defines}},
@cnf_defines, @cnf_defines,
'OPENSSLDIR="""$(OPENSSLDIR_C)"""', 'OPENSSLDIR="""$(OPENSSLDIR_C)"""',
'ENGINESDIR="""$(ENGINESDIR_C)"""',
'MODULESDIR="""$(MODULESDIR_C)"""' 'MODULESDIR="""$(MODULESDIR_C)"""'
) )
. '$(DEFINES)' . '$(DEFINES)'
@@ -353,7 +347,6 @@ GENERATED={- # common0.tmpl provides @generated
INSTALL_LIBS={- join(", ", map { "-\n\t".$_.".OLB" } @install_libs) -} INSTALL_LIBS={- join(", ", map { "-\n\t".$_.".OLB" } @install_libs) -}
INSTALL_SHLIBS={- join(", ", map { "-\n\t".$_.".EXE" } @install_shlibs) -} INSTALL_SHLIBS={- join(", ", map { "-\n\t".$_.".EXE" } @install_shlibs) -}
INSTALL_ENGINES={- join(", ", map { "-\n\t".$_.".EXE" } @install_engines) -}
INSTALL_MODULES={- join(", ", map { "-\n\t".$_.".EXE" } @install_modules) -} INSTALL_MODULES={- join(", ", map { "-\n\t".$_.".EXE" } @install_modules) -}
INSTALL_FIPSMODULE={- join(", ", map { "-\n\t".$_.".EXE" } @install_fipsmodules) -} INSTALL_FIPSMODULE={- join(", ", map { "-\n\t".$_.".EXE" } @install_fipsmodules) -}
INSTALL_FIPSMODULECONF=[.providers]fipsmodule.cnf INSTALL_FIPSMODULECONF=[.providers]fipsmodule.cnf
@@ -387,8 +380,6 @@ OPENSSLDIR={- catdir($config{openssldir}) or
: "SYS\$COMMON:[OPENSSL-COMMON]" -} : "SYS\$COMMON:[OPENSSL-COMMON]" -}
# The same, but for C # The same, but for C
OPENSSLDIR_C={- platform->osslprefix() -}DATAROOT:[000000] OPENSSLDIR_C={- platform->osslprefix() -}DATAROOT:[000000]
# Where installed ENGINE modules reside, for C
ENGINESDIR_C={- platform->osslprefix() -}ENGINES{- $sover_dirname.$target{pointer_size} -}:
# Where modules reside, for C # Where modules reside, for C
MODULESDIR_C={- platform->osslprefix() -}MODULES{- $target{pointer_size} -}: MODULESDIR_C={- platform->osslprefix() -}MODULES{- $target{pointer_size} -}:
@@ -598,10 +589,10 @@ depend : descrip.mms
# Install helper targets ############################################# # Install helper targets #############################################
install_sw : install_dev install_engines install_modules - install_sw : install_dev install_modules -
install_runtime install_startup install_ivp install_runtime install_startup install_ivp
uninstall_sw : uninstall_dev uninstall_modules uninstall_engines - uninstall_sw : uninstall_dev uninstall_modules -
uninstall_runtime uninstall_startup uninstall_ivp uninstall_runtime uninstall_startup uninstall_ivp
install_docs : install_html_docs install_docs : install_html_docs
@@ -660,15 +651,6 @@ install_dev : check_INSTALLTOP install_runtime_libs
map { "COPY/PROT=W:R $_.OLB ossl_installroot:[LIB.'arch']" } map { "COPY/PROT=W:R $_.OLB ossl_installroot:[LIB.'arch']" }
@install_libs) -} @install_libs) -}
install_engines : check_INSTALLTOP install_runtime_libs build_modules
@ {- output_off() unless scalar @install_engines; "" -} !
@ WRITE SYS$OUTPUT "*** Installing engines"
- CREATE/DIR ossl_installroot:[ENGINES{- $sover_dirname.$target{pointer_size} -}.'arch']
{- join("\n ",
map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[ENGINES$sover_dirname$target{pointer_size}.'arch']" }
@install_engines) -}
@ {- output_on() unless scalar @install_engines; "" -} !
install_modules : check_INSTALLTOP install_runtime_libs build_modules install_modules : check_INSTALLTOP install_runtime_libs build_modules
@ {- output_off() unless scalar @install_modules; "" -} ! @ {- output_off() unless scalar @install_modules; "" -} !
@ WRITE SYS$OUTPUT "*** Installing modules" @ WRITE SYS$OUTPUT "*** Installing modules"

View File

@@ -183,20 +183,11 @@ INSTALL_SHLIB_INFO={-
grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} } grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
@{$unified_info{libraries}})) @{$unified_info{libraries}}))
-} -}
INSTALL_ENGINES={-
join(" \\\n" . ' ' x 16,
fill_lines(" ", $COLUMNS - 16,
map { platform->dso($_) }
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
&& $unified_info{attributes}->{modules}->{$_}->{engine} }
@{$unified_info{modules}}))
-}
INSTALL_MODULES={- INSTALL_MODULES={-
join(" \\\n" . ' ' x 16, join(" \\\n" . ' ' x 16,
fill_lines(" ", $COLUMNS - 16, fill_lines(" ", $COLUMNS - 16,
map { platform->dso($_) } map { platform->dso($_) }
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
&& !$unified_info{attributes}->{modules}->{$_}->{engine}
&& !$unified_info{attributes}->{modules}->{$_}->{fips} } && !$unified_info{attributes}->{modules}->{$_}->{fips} }
@{$unified_info{modules}})) @{$unified_info{modules}}))
-} -}
@@ -333,7 +324,6 @@ LIBDIR={- our $libdir = $config{libdir};
# $(libdir) is chosen to be compatible with the GNU coding standards # $(libdir) is chosen to be compatible with the GNU coding standards
libdir={- file_name_is_absolute($libdir) libdir={- file_name_is_absolute($libdir)
? $libdir : '$(INSTALLTOP)/$(LIBDIR)' -} ? $libdir : '$(INSTALLTOP)/$(LIBDIR)' -}
ENGINESDIR=$(libdir)/engines-{- $sover_dirname -}
MODULESDIR=$(libdir)/ossl-modules MODULESDIR=$(libdir)/ossl-modules
# Convenience variable for those who want to set the rpath in shared # Convenience variable for those who want to set the rpath in shared
@@ -450,7 +440,6 @@ LIB_CPPFLAGS={- our $lib_cppflags =
join(' ', $lib_cppflags, join(' ', $lib_cppflags,
(map { '-D'.$_ } (map { '-D'.$_ }
'OPENSSLDIR="\"$(OPENSSLDIR)\""', 'OPENSSLDIR="\"$(OPENSSLDIR)\""',
'ENGINESDIR="\"$(ENGINESDIR)\""',
'MODULESDIR="\"$(MODULESDIR)\""'), 'MODULESDIR="\"$(MODULESDIR)\""'),
'$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
LIB_CFLAGS={- join(' ', $target{lib_cflags} || (), LIB_CFLAGS={- join(' ', $target{lib_cflags} || (),
@@ -541,7 +530,7 @@ LANG=C
{- dependmagic('build_sw', 'Build all the software (default target)'); -}: build_libs_nodep build_modules_nodep build_programs_nodep link-utils {- dependmagic('build_sw', 'Build all the software (default target)'); -}: build_libs_nodep build_modules_nodep build_programs_nodep link-utils
{- dependmagic('build_libs', 'Build the libraries libssl and libcrypto'); -}: build_libs_nodep {- dependmagic('build_libs', 'Build the libraries libssl and libcrypto'); -}: build_libs_nodep
{- dependmagic('build_modules', 'Build the modules (i.e. providers and engines)'); -}: build_modules_nodep {- dependmagic('build_modules', 'Build the modules (i.e. providers)'); -}: build_modules_nodep
{- dependmagic('build_programs', 'Build the openssl executables, scripts and all other programs as configured (e.g. tests or demos)'); -}: build_programs_nodep {- dependmagic('build_programs', 'Build the openssl executables, scripts and all other programs as configured (e.g. tests or demos)'); -}: build_programs_nodep
{- dependmagic('build_inst_sw', 'Build all the software to be installed'); -}: build_libs_nodep build_modules_nodep build_inst_programs_nodep link-utils {- dependmagic('build_inst_sw', 'Build all the software to be installed'); -}: build_libs_nodep build_modules_nodep build_inst_programs_nodep link-utils
{- dependmagic('build_inst_programs', 'Build only the installable openssl executables and scripts'); -}: build_inst_programs_nodep {- dependmagic('build_inst_programs', 'Build only the installable openssl executables and scripts'); -}: build_inst_programs_nodep
@@ -675,9 +664,9 @@ install: Makefile ## Install software and documentation, create OpenSSL director
uninstall: {- "uninstall_docs" if !$disabled{docs}; -} uninstall_sw {- $disabled{fips} ? "" : "uninstall_fips" -} ## Uninstall software and documentation uninstall: {- "uninstall_docs" if !$disabled{docs}; -} uninstall_sw {- $disabled{fips} ? "" : "uninstall_fips" -} ## Uninstall software and documentation
install_sw: install_dev install_engines install_modules install_runtime ## Install just the software and libraries install_sw: install_dev install_modules install_runtime ## Install just the software and libraries
uninstall_sw: uninstall_runtime uninstall_modules uninstall_engines uninstall_dev ## Uninstall the software and libraries uninstall_sw: uninstall_runtime uninstall_modules uninstall_dev ## Uninstall the software and libraries
install_docs: install_man_docs install_html_docs ## Install manpages and HTML documentation install_docs: install_man_docs install_html_docs ## Install manpages and HTML documentation
@@ -894,30 +883,6 @@ uninstall_dev: uninstall_runtime_libs
_install_modules_deps: install_runtime_libs build_modules _install_modules_deps: install_runtime_libs build_modules
install_engines: _install_modules_deps
@[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
@$(PERL) $(SRCDIR)/util/mkdir-p.pl "$(DESTDIR)$(ENGINESDIR)/"
@$(ECHO) "*** Installing engines"
@set -e; for e in dummy $(INSTALL_ENGINES); do \
if [ "$$e" = "dummy" ]; then continue; fi; \
fn=`basename $$e`; \
$(ECHO) "install $$e -> $(DESTDIR)$(ENGINESDIR)/$$fn"; \
cp $$e "$(DESTDIR)$(ENGINESDIR)/$$fn.new"; \
chmod 755 "$(DESTDIR)$(ENGINESDIR)/$$fn.new"; \
mv -f "$(DESTDIR)$(ENGINESDIR)/$$fn.new" \
"$(DESTDIR)$(ENGINESDIR)/$$fn"; \
done
uninstall_engines:
@$(ECHO) "*** Uninstalling engines"
@set -e; for e in dummy $(INSTALL_ENGINES); do \
if [ "$$e" = "dummy" ]; then continue; fi; \
fn=`basename $$e`; \
$(ECHO) "$(RM) $(DESTDIR)$(ENGINESDIR)/$$fn"; \
$(RM) "$(DESTDIR)$(ENGINESDIR)/$$fn"; \
done
-$(RMDIR) "$(DESTDIR)$(ENGINESDIR)"
install_modules: _install_modules_deps install_modules: _install_modules_deps
@[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1) @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
@$(PERL) $(SRCDIR)/util/mkdir-p.pl "$(DESTDIR)$(MODULESDIR)/" @$(PERL) $(SRCDIR)/util/mkdir-p.pl "$(DESTDIR)$(MODULESDIR)/"

View File

@@ -101,29 +101,15 @@ INSTALL_SHLIBPDBS={-
grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} } grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
@{$unified_info{libraries}}) @{$unified_info{libraries}})
-} -}
INSTALL_ENGINES={-
join(" ", map { quotify1(platform->dso($_)) }
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
&& $unified_info{attributes}->{modules}->{$_}->{engine} }
@{$unified_info{modules}})
-}
INSTALL_ENGINEPDBS={-
join(" ", map { quotify1(platform->dsopdb($_)) }
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
&& $unified_info{attributes}->{modules}->{$_}->{engine} }
@{$unified_info{modules}})
-}
INSTALL_MODULES={- INSTALL_MODULES={-
join(" ", map { quotify1(platform->dso($_)) } join(" ", map { quotify1(platform->dso($_)) }
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} grep { !$unified_info{attributes}->{modules}->{$_}->{noinst}
&& !$unified_info{attributes}->{modules}->{$_}->{engine}
&& !$unified_info{attributes}->{modules}->{$_}->{fips} } && !$unified_info{attributes}->{modules}->{$_}->{fips} }
@{$unified_info{modules}}) @{$unified_info{modules}})
-} -}
INSTALL_MODULEPDBS={- INSTALL_MODULEPDBS={-
join(" ", map { quotify1(platform->dsopdb($_)) } join(" ", map { quotify1(platform->dsopdb($_)) }
grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} }
&& !$unified_info{attributes}->{modules}->{$_}->{engine} }
@{$unified_info{modules}}) @{$unified_info{modules}})
-} -}
INSTALL_FIPSMODULE={- INSTALL_FIPSMODULE={-
@@ -230,23 +216,15 @@ MODULESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath catpath);
our $modulesdir_dir = our $modulesdir_dir =
catdir($modulesprefix_dir, "ossl-modules"); catdir($modulesprefix_dir, "ossl-modules");
our $modulesdir = catpath($modulesdir_dev, $modulesdir_dir); our $modulesdir = catpath($modulesdir_dev, $modulesdir_dir);
our $enginesdir_dev = $modulesprefix_dev;
our $enginesdir_dir =
catdir($modulesprefix_dir, "engines-$sover_dirname");
our $enginesdir = catpath($enginesdir_dev, $enginesdir_dir);
$modulesdir_dev -} $modulesdir_dev -}
MODULESDIR_dir={- canonpath($modulesdir_dir) -} MODULESDIR_dir={- canonpath($modulesdir_dir) -}
ENGINESDIR_dev={- $enginesdir_dev -}
ENGINESDIR_dir={- canonpath($enginesdir_dir) -}
!IF "$(DESTDIR)" != "" !IF "$(DESTDIR)" != ""
INSTALLTOP=$(DESTDIR)$(INSTALLTOP_dir) INSTALLTOP=$(DESTDIR)$(INSTALLTOP_dir)
OPENSSLDIR=$(DESTDIR)$(OPENSSLDIR_dir) OPENSSLDIR=$(DESTDIR)$(OPENSSLDIR_dir)
ENGINESDIR=$(DESTDIR)$(ENGINESDIR_dir)
MODULESDIR=$(DESTDIR)$(MODULESDIR_dir) MODULESDIR=$(DESTDIR)$(MODULESDIR_dir)
!ELSE !ELSE
INSTALLTOP=$(INSTALLTOP_dev)$(INSTALLTOP_dir) INSTALLTOP=$(INSTALLTOP_dev)$(INSTALLTOP_dir)
OPENSSLDIR=$(OPENSSLDIR_dev)$(OPENSSLDIR_dir) OPENSSLDIR=$(OPENSSLDIR_dev)$(OPENSSLDIR_dir)
ENGINESDIR=$(ENGINESDIR_dev)$(ENGINESDIR_dir)
MODULESDIR=$(MODULESDIR_dev)$(MODULESDIR_dir) MODULESDIR=$(MODULESDIR_dev)$(MODULESDIR_dir)
!ENDIF !ENDIF
@@ -344,7 +322,6 @@ LIB_CPPFLAGS={- our $lib_cppflags =
join(' ', $lib_cppflags, join(' ', $lib_cppflags,
(map { '-D'.quotify1($_) } (map { '-D'.quotify1($_) }
"OPENSSLDIR=\"$openssldir\"", "OPENSSLDIR=\"$openssldir\"",
"ENGINESDIR=\"$enginesdir\"",
"MODULESDIR=\"$modulesdir\""), "MODULESDIR=\"$modulesdir\""),
'$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
LIB_CFLAGS={- join(' ', $target{lib_cflags} || (), LIB_CFLAGS={- join(' ', $target{lib_cflags} || (),
@@ -485,7 +462,6 @@ clean: libclean
{- join("\n\t", map { "-del /Q /F $_" } @GENERATED_MANDATORY) || "\@rem" -} {- join("\n\t", map { "-del /Q /F $_" } @GENERATED_MANDATORY) || "\@rem" -}
{- join("\n\t", map { "-del /Q /F $_" } @GENERATED) || "\@rem" -} {- join("\n\t", map { "-del /Q /F $_" } @GENERATED) || "\@rem" -}
-del /Q /S /F *.d *.obj *.pdb *.ilk *.manifest -del /Q /S /F *.d *.obj *.pdb *.ilk *.manifest
-del /Q /S /F engines\*.lib engines\*.exp
-del /Q /S /F apps\*.lib apps\*.rc apps\*.res apps\*.exp -del /Q /S /F apps\*.lib apps\*.rc apps\*.res apps\*.exp
-del /Q /S /F test\*.exp -del /Q /S /F test\*.exp
-rd /Q /S test\test-runs -rd /Q /S test\test-runs
@@ -502,9 +478,9 @@ depend: makefile
# Install helper targets ############################################# # Install helper targets #############################################
install_sw: install_dev install_engines install_modules install_runtime install_sw: install_dev install_modules install_runtime
uninstall_sw: uninstall_runtime uninstall_modules uninstall_engines uninstall_dev uninstall_sw: uninstall_runtime uninstall_modules uninstall_dev
install_docs: install_html_docs install_docs: install_html_docs
@@ -577,17 +553,6 @@ uninstall_dev:
_install_modules_deps: install_runtime_libs build_modules _install_modules_deps: install_runtime_libs build_modules
install_engines: _install_modules_deps
@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
@$(ECHO) "*** Installing engines"
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(ENGINESDIR)"
@if not "$(INSTALL_ENGINES)"=="" \
"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINES) "$(ENGINESDIR)"
@if not "$(INSTALL_ENGINES)"=="" \
"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINEPDBS) "$(ENGINESDIR)"
uninstall_engines:
install_modules: _install_modules_deps install_modules: _install_modules_deps
@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 ) @if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
@$(ECHO) "*** Installing modules" @$(ECHO) "*** Installing modules"

View File

@@ -112,11 +112,10 @@ install it to a variety of locations.
The following keys: The following keys:
`\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL-<version>-<ctx>\OPENSSLDIR` `\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL-<version>-<ctx>\OPENSSLDIR`
`\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL-<version>-<ctx>\ENGINESDIR`
`\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL-<version>-<ctx>\MODULESDIR` `\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL-<version>-<ctx>\MODULESDIR`
Can be administratively set, and openssl will take the paths found there as the Can be administratively set, and openssl will take the paths found there as the
values for OPENSSLDIR, ENGINESDIR and MODULESDIR respectively. values for OPENSSLDIR and MODULESDIR respectively.
To enable the reading of registry keys from windows builds, add To enable the reading of registry keys from windows builds, add
`-DOSSL_WINCTX=<string>`to the Configure command line. This define is used `-DOSSL_WINCTX=<string>`to the Configure command line. This define is used

View File

@@ -463,7 +463,7 @@ DEPEND[openssl.pc]=libcrypto.pc libssl.pc
GENERATE[builddata.pm]=util/mkinstallvars.pl \ GENERATE[builddata.pm]=util/mkinstallvars.pl \
PREFIX=. BINDIR=apps APPLINKDIR=ms \ PREFIX=. BINDIR=apps APPLINKDIR=ms \
LIBDIR= INCLUDEDIR=include "INCLUDEDIR=$(SRCDIR)/include" \ LIBDIR= INCLUDEDIR=include "INCLUDEDIR=$(SRCDIR)/include" \
ENGINESDIR=engines MODULESDIR=providers \ MODULESDIR=providers \
libdir= CMAKECONFIGDIR= PKGCONFIGDIR= \ libdir= CMAKECONFIGDIR= PKGCONFIGDIR= \
"VERSION=$(VERSION)" "LDLIBS=$(LIB_EX_LIBS)" "VERSION=$(VERSION)" "LDLIBS=$(LIB_EX_LIBS)"

View File

@@ -52,9 +52,6 @@ extern char ossl_cpu_info_str[];
/* size: MAX_PATH + sizeof("OPENSSLDIR: \"\"") */ /* size: MAX_PATH + sizeof("OPENSSLDIR: \"\"") */
static char openssldir[MAX_PATH + 15]; static char openssldir[MAX_PATH + 15];
/* size: MAX_PATH + sizeof("ENGINESDIR: \"\"") */
static char enginesdir[MAX_PATH + 15];
/* size: MAX_PATH + sizeof("MODULESDIR: \"\"") */ /* size: MAX_PATH + sizeof("MODULESDIR: \"\"") */
static char modulesdir[MAX_PATH + 15]; static char modulesdir[MAX_PATH + 15];
@@ -64,8 +61,6 @@ DEFINE_RUN_ONCE_STATIC(version_strings_setup)
{ {
BIO_snprintf(openssldir, sizeof(openssldir), "OPENSSLDIR: \"%s\"", BIO_snprintf(openssldir, sizeof(openssldir), "OPENSSLDIR: \"%s\"",
ossl_get_openssldir()); ossl_get_openssldir());
BIO_snprintf(enginesdir, sizeof(enginesdir), "ENGINESDIR: \"%s\"",
ossl_get_enginesdir());
BIO_snprintf(modulesdir, sizeof(modulesdir), "MODULESDIR: \"%s\"", BIO_snprintf(modulesdir, sizeof(modulesdir), "MODULESDIR: \"%s\"",
ossl_get_modulesdir()); ossl_get_modulesdir());
return 1; return 1;
@@ -99,8 +94,6 @@ const char *OpenSSL_version(int t)
#if defined(_WIN32) && defined(OSSL_WINCTX) #if defined(_WIN32) && defined(OSSL_WINCTX)
case OPENSSL_DIR: case OPENSSL_DIR:
return openssldir; return openssldir;
case OPENSSL_ENGINES_DIR:
return enginesdir;
case OPENSSL_MODULES_DIR: case OPENSSL_MODULES_DIR:
return modulesdir; return modulesdir;
#else #else
@@ -109,12 +102,6 @@ const char *OpenSSL_version(int t)
return "OPENSSLDIR: \"" OPENSSLDIR "\""; return "OPENSSLDIR: \"" OPENSSLDIR "\"";
# else # else
return "OPENSSLDIR: N/A"; return "OPENSSLDIR: N/A";
# endif
case OPENSSL_ENGINES_DIR:
# ifdef ENGINESDIR
return "ENGINESDIR: \"" ENGINESDIR "\"";
# else
return "ENGINESDIR: N/A";
# endif # endif
case OPENSSL_MODULES_DIR: case OPENSSL_MODULES_DIR:
# ifdef MODULESDIR # ifdef MODULESDIR
@@ -134,6 +121,8 @@ const char *OpenSSL_version(int t)
#else #else
return "OSSL_WINCTX: Undefined"; return "OSSL_WINCTX: Undefined";
#endif #endif
case OPENSSL_ENGINES_DIR:
return "ENGINESDIR: N/A";
} }
return "not available"; return "not available";
} }

View File

@@ -32,17 +32,6 @@ static char openssldir[MAX_PATH + 1];
*/ */
static char *openssldirptr = NULL; static char *openssldirptr = NULL;
/**
* @brief The directory where OpenSSL engines are located.
*/
static char enginesdir[MAX_PATH + 1];
/**
* @brief The pointer to the enginesdir buffer
*/
static char *enginesdirptr = NULL;
/** /**
* @brief The directory where OpenSSL modules are located. * @brief The directory where OpenSSL modules are located.
*/ */
@@ -122,7 +111,6 @@ static CRYPTO_ONCE defaults_setup_init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(do_defaults_setup) DEFINE_RUN_ONCE_STATIC(do_defaults_setup)
{ {
get_windows_regdirs(openssldir, sizeof(openssldir), L"OPENSSLDIR"); get_windows_regdirs(openssldir, sizeof(openssldir), L"OPENSSLDIR");
get_windows_regdirs(enginesdir, sizeof(enginesdir), L"ENGINESDIR");
get_windows_regdirs(modulesdir, sizeof(modulesdir), L"MODULESDIR"); get_windows_regdirs(modulesdir, sizeof(modulesdir), L"MODULESDIR");
/* /*
@@ -131,9 +119,6 @@ DEFINE_RUN_ONCE_STATIC(do_defaults_setup)
if (strlen(openssldir) > 0) if (strlen(openssldir) > 0)
openssldirptr = openssldir; openssldirptr = openssldir;
if (strlen(enginesdir) > 0)
enginesdirptr = enginesdir;
if (strlen(modulesdir) > 0) if (strlen(modulesdir) > 0)
modulesdirptr = modulesdir; modulesdirptr = modulesdir;
@@ -157,22 +142,6 @@ const char *ossl_get_openssldir(void)
#endif #endif
} }
/**
* @brief Get the directory where OpenSSL engines are located.
*
* @return A pointer to a string containing the engines directory path.
*/
const char *ossl_get_enginesdir(void)
{
#if defined(_WIN32) && defined (OSSL_WINCTX)
if (!RUN_ONCE(&defaults_setup_init, do_defaults_setup))
return NULL;
return (const char *)enginesdirptr;
#else
return ENGINESDIR;
#endif
}
/** /**
* @brief Get the directory where OpenSSL modules are located. * @brief Get the directory where OpenSSL modules are located.
* *

View File

@@ -452,8 +452,7 @@ ENGINE *ENGINE_by_id(const char *id)
* Prevent infinite recursion if we're looking for the dynamic engine. * Prevent infinite recursion if we're looking for the dynamic engine.
*/ */
if (strcmp(id, "dynamic")) { if (strcmp(id, "dynamic")) {
if ((load_dir = ossl_safe_getenv("OPENSSL_ENGINES")) == NULL) load_dir = ossl_safe_getenv("OPENSSL_ENGINES");
load_dir = ossl_get_enginesdir();
iterator = ENGINE_by_id("dynamic"); iterator = ENGINE_by_id("dynamic");
if (!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || if (!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) ||
!ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) || !ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) ||

View File

@@ -273,7 +273,7 @@ const char *OPENSSL_info(int t)
case OPENSSL_INFO_CONFIG_DIR: case OPENSSL_INFO_CONFIG_DIR:
return ossl_get_openssldir(); return ossl_get_openssldir();
case OPENSSL_INFO_ENGINES_DIR: case OPENSSL_INFO_ENGINES_DIR:
return ossl_get_enginesdir(); return NULL;
case OPENSSL_INFO_MODULES_DIR: case OPENSSL_INFO_MODULES_DIR:
return ossl_get_modulesdir(); return ossl_get_modulesdir();
case OPENSSL_INFO_DSO_EXTENSION: case OPENSSL_INFO_DSO_EXTENSION:

View File

@@ -142,12 +142,6 @@ if available, or C<platform: information not available> otherwise.
The B<OPENSSLDIR> setting of the library build in the form C<OPENSSLDIR: "..."> The B<OPENSSLDIR> setting of the library build in the form C<OPENSSLDIR: "...">
if available, or C<OPENSSLDIR: N/A> otherwise. if available, or C<OPENSSLDIR: N/A> otherwise.
=item OPENSSL_ENGINES_DIR
The B<ENGINESDIR> setting of the library build in the form C<ENGINESDIR: "...">
if available, or C<ENGINESDIR: N/A> otherwise. This option is deprecated in
OpenSSL 3.0.
=item OPENSSL_MODULES_DIR =item OPENSSL_MODULES_DIR
The B<MODULESDIR> setting of the library build in the form C<MODULESDIR: "..."> The B<MODULESDIR> setting of the library build in the form C<MODULESDIR: "...">
@@ -184,11 +178,6 @@ OPENSSL_info() also returns different strings depending on I<t>:
The configured C<OPENSSLDIR>, which is the default location for The configured C<OPENSSLDIR>, which is the default location for
OpenSSL configuration files. OpenSSL configuration files.
=item OPENSSL_INFO_ENGINES_DIR
The configured C<ENGINESDIR>, which is the default location for
OpenSSL engines.
=item OPENSSL_INFO_MODULES_DIR =item OPENSSL_INFO_MODULES_DIR
The configured C<MODULESDIR>, which is the default location for The configured C<MODULESDIR>, which is the default location for
@@ -256,6 +245,13 @@ L<crypto(7)>
The macros and functions described here were added in OpenSSL 3.0, The macros and functions described here were added in OpenSSL 3.0,
except for OPENSSL_VERSION_NUMBER and OpenSSL_version_num(). except for OPENSSL_VERSION_NUMBER and OpenSSL_version_num().
The B<ENGINESDIR> setting of the library is no longer supported
since OpenSSL 4.0.
The B<OPENSSL_ENGINES_DIR> and B<OPENSSL_INFO_ENGINES_DIR> strings
are no longer supported and, for compatibility reasons, will always
return values indicating that engine support was disabled.
=head1 BUGS =head1 BUGS
There was a discrepancy between this manual and commentary + code There was a discrepancy between this manual and commentary + code

View File

@@ -21,6 +21,6 @@ DEPEND[""]=openssl.pc
GENERATE[../installdata.pm]=../util/mkinstallvars.pl \ GENERATE[../installdata.pm]=../util/mkinstallvars.pl \
"PREFIX=$(INSTALLTOP)" BINDIR=bin "LIBDIR=$(LIBDIR)" "libdir=$(libdir)" \ "PREFIX=$(INSTALLTOP)" BINDIR=bin "LIBDIR=$(LIBDIR)" "libdir=$(libdir)" \
INCLUDEDIR=include APPLINKDIR=include/openssl \ INCLUDEDIR=include APPLINKDIR=include/openssl \
"ENGINESDIR=$(ENGINESDIR)" "MODULESDIR=$(MODULESDIR)" \ "MODULESDIR=$(MODULESDIR)" \
"PKGCONFIGDIR=$(PKGCONFIGDIR)" "CMAKECONFIGDIR=$(CMAKECONFIGDIR)" \ "PKGCONFIGDIR=$(PKGCONFIGDIR)" "CMAKECONFIGDIR=$(CMAKECONFIGDIR)" \
"LDLIBS=$(LIB_EX_LIBS)" "VERSION=$(VERSION)" "LDLIBS=$(LIB_EX_LIBS)" "VERSION=$(VERSION)"

View File

@@ -133,7 +133,6 @@ set(OPENSSL_LIBRARY_DIR "${_ossl_prefix}/{- unixify($OpenSSL::safe::installdata:
set(OPENSSL_INCLUDE_DIR{- $OUT = ''; set(OPENSSL_INCLUDE_DIR{- $OUT = '';
$OUT .= ' "${_ossl_prefix}/' . $_ . '"' $OUT .= ' "${_ossl_prefix}/' . $_ . '"'
foreach (@OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX); -}) foreach (@OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX); -})
set(OPENSSL_ENGINES_DIR "${_ossl_prefix}/{- unixify($OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0], 1); -}/{- unixify($OpenSSL::safe::installdata::ENGINESDIR_REL_LIBDIR[0], 1); -}")
set(OPENSSL_MODULES_DIR "${_ossl_prefix}/{- unixify($OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0], 1); -}/{- unixify($OpenSSL::safe::installdata::MODULESDIR_REL_LIBDIR[0], 1); -}") set(OPENSSL_MODULES_DIR "${_ossl_prefix}/{- unixify($OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0], 1); -}/{- unixify($OpenSSL::safe::installdata::MODULESDIR_REL_LIBDIR[0], 1); -}")
set(OPENSSL_RUNTIME_DIR "${_ossl_prefix}/{- unixify($OpenSSL::safe::installdata::BINDIR_REL_PREFIX[0], 1); -}") set(OPENSSL_RUNTIME_DIR "${_ossl_prefix}/{- unixify($OpenSSL::safe::installdata::BINDIR_REL_PREFIX[0], 1); -}")
{- output_off() if $disabled{uplink}; "" -} {- output_off() if $disabled{uplink}; "" -}

View File

@@ -11,7 +11,6 @@ libdir={- if (defined $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]) {
includedir={- $OUT = ''; includedir={- $OUT = '';
$OUT .= '${prefix}/' . $_ . ' ' $OUT .= '${prefix}/' . $_ . ' '
foreach (@OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX); -} foreach (@OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX); -}
enginesdir=${libdir}/{- $OpenSSL::safe::installdata::ENGINESDIR_REL_LIBDIR[0] -}
modulesdir=${libdir}/{- $OpenSSL::safe::installdata::MODULESDIR_REL_LIBDIR[0] -} modulesdir=${libdir}/{- $OpenSSL::safe::installdata::MODULESDIR_REL_LIBDIR[0] -}
Name: OpenSSL-libcrypto Name: OpenSSL-libcrypto

View File

@@ -229,7 +229,6 @@ static ossl_inline int ossl_is_absolute_path(const char *path)
} }
const char *ossl_get_openssldir(void); const char *ossl_get_openssldir(void);
const char *ossl_get_enginesdir(void);
const char *ossl_get_modulesdir(void); const char *ossl_get_modulesdir(void);
const char *ossl_get_wininstallcontext(void); const char *ossl_get_wininstallcontext(void);

View File

@@ -42,8 +42,6 @@ plan tests => 3;
my @expectossldir = run(cmd(["reg.exe", "query", $regkey, "/reg:32", "/t", "REG_EXPAND_SZ", "/v", "OPENSSLDIR"]), capture => 1); my @expectossldir = run(cmd(["reg.exe", "query", $regkey, "/reg:32", "/t", "REG_EXPAND_SZ", "/v", "OPENSSLDIR"]), capture => 1);
my @expectengdir = run(cmd(["reg.exe", "query", $regkey, "/reg:32", "/t", "REG_EXPAND_SZ", "/v", "ENGINESDIR"]), capture => 1);
my @expectmoddir = run(cmd(["reg.exe", "query", $regkey, "/reg:32", "/t", "REG_EXPAND_SZ", "/v", "MODULESDIR"]), capture => 1); my @expectmoddir = run(cmd(["reg.exe", "query", $regkey, "/reg:32", "/t", "REG_EXPAND_SZ", "/v", "MODULESDIR"]), capture => 1);
my @ossldir = run(app(["openssl", "version", "-d"]), capture => 1); my @ossldir = run(app(["openssl", "version", "-d"]), capture => 1);
@@ -59,18 +57,6 @@ $actual =~ s/OPENSSLDIR: *//;
ok(grep(/$expect/,$actual), "Confirming version output for openssldir from registry"); ok(grep(/$expect/,$actual), "Confirming version output for openssldir from registry");
my @osslengineout = run(app(["openssl", "version", "-e"]), capture => 1);
$expect = "@expectengdir";
$actual = "@osslengineout";
$expect =~ s/HKEY_LOCAL_MACHINE.*\n*//;
$expect =~ s/\n//g;
$expect =~ s/.*REG_EXPAND_SZ *//;
$expect =~ s/ .*$//;
$actual =~ s/ENGINESDIR: *//;
ok(grep(/$expect/, $actual) == 1, "Confirming version output for enginesdir from registry");
my @osslmoduleout = run(app(["openssl", "version", "-m"]), capture => 1); my @osslmoduleout = run(app(["openssl", "version", "-m"]), capture => 1);
$expect = "@expectmoddir"; $expect = "@expectmoddir";

View File

@@ -26,7 +26,7 @@ my @absolutes = qw(PREFIX libdir);
# since the LIBDIR subdirectories depend on the calculation of LIBDIR from # since the LIBDIR subdirectories depend on the calculation of LIBDIR from
# PREFIX. # PREFIX.
my @subdirs = _pairs (PREFIX => [ qw(BINDIR LIBDIR INCLUDEDIR APPLINKDIR) ], my @subdirs = _pairs (PREFIX => [ qw(BINDIR LIBDIR INCLUDEDIR APPLINKDIR) ],
LIBDIR => [ qw(ENGINESDIR MODULESDIR PKGCONFIGDIR LIBDIR => [ qw(MODULESDIR PKGCONFIGDIR
CMAKECONFIGDIR) ]); CMAKECONFIGDIR) ]);
# For completeness, other expected variables # For completeness, other expected variables
my @others = qw(VERSION LDLIBS); my @others = qw(VERSION LDLIBS);