[openssl] master update
Richard Levitte
levitte at openssl.org
Tue Apr 2 05:42:36 UTC 2019
The branch master has been updated
via 521b7cb3883605740fb4727120f18810ba47d50b (commit)
via 34786bdee0b2af74a84a32ca32bb1c2c256e6014 (commit)
via 22b414672d0260904ef2f5f5304b02f96c67dd7e (commit)
from 0b45d8eec051fd9816b6bf46a975fa461ffc983d (commit)
- Log -----------------------------------------------------------------
commit 521b7cb3883605740fb4727120f18810ba47d50b
Author: Richard Levitte <levitte at openssl.org>
Date: Sun Mar 31 15:26:26 2019 +0200
Correct the checks of module availability in provider test programs
Previously, the macro OPENSSL_NO_SHARED was defined of the test/p_test
module wasn't built, but the provider test programs didn't check that
macro. We rename it to OPENSSL_NO_MODULE, since that name describes
the situation more than OPENSSL_NO_SHARED does, and use it.
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8623)
commit 34786bdee0b2af74a84a32ca32bb1c2c256e6014
Author: Richard Levitte <levitte at openssl.org>
Date: Sun Mar 31 15:17:58 2019 +0200
Configuration / build: make it possible to disable building of modules
While we're at it, sort out inconsistencies with the build of modules:
- not building shared libraries means not building dynamic engines.
However, other modules may still be built.
- not having DSO functionality doesn't mean not to build modules (even
though we can't use them from apps linked with libraries that are
built this way).
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8623)
commit 22b414672d0260904ef2f5f5304b02f96c67dd7e
Author: Richard Levitte <levitte at openssl.org>
Date: Sun Mar 31 15:14:00 2019 +0200
Build cleanup: don't use SHARED_SOURCE with modules
SHARED_SOURCE is reserved for products that are expected to come in
dual shared / non-shared form, i.e. the routine libraries like
libcrypto and libssl, to distinguish source that should only appear in
their shared form.
Modules are always shared, so there's no need for them to have this
type of distinction.
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8623)
-----------------------------------------------------------------------
Summary of changes:
Configurations/common.tmpl | 4 ++--
Configure | 29 +++++++++++++++++++++--------
engines/build.info | 12 ++++++------
test/build.info | 9 +++++----
test/provider_internal_test.c | 9 ++-------
test/provider_test.c | 10 ++--------
6 files changed, 38 insertions(+), 35 deletions(-)
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl
index 5ca0d56..62b1102 100644
--- a/Configurations/common.tmpl
+++ b/Configurations/common.tmpl
@@ -151,9 +151,9 @@
return "" if $cache{$lib};
$OUT .= obj2dso(lib => $lib,
attrs => $unified_info{attributes}->{$lib},
- objs => $unified_info{shared_sources}->{$lib},
+ objs => $unified_info{sources}->{$lib},
deps => [ resolvedepends($lib) ]);
- foreach (@{$unified_info{shared_sources}->{$lib}}) {
+ foreach (@{$unified_info{sources}->{$lib}}) {
# If this is somehow a compiled object, take care of it that way
# Otherwise, it might simply be generated
if (defined $unified_info{sources}->{$_}) {
diff --git a/Configure b/Configure
index df66abb..62f4af5 100755
--- a/Configure
+++ b/Configure
@@ -377,6 +377,7 @@ my @disablables = (
"md2",
"md4",
"mdc2",
+ "module",
"msan",
"multiblock",
"nextprotoneg",
@@ -493,9 +494,23 @@ my @disable_cascades = (
"crypto-mdebug" => [ "crypto-mdebug-backtrace" ],
- # Without position independent code, there can be no shared libraries or DSOs
- "pic" => [ "shared" ],
+ # If no modules, then no dynamic engines either
+ "module" => [ "dynamic-engine" ],
+
+ # Without shared libraries, dynamic engines aren't possible.
+ # This is due to them having to link with libcrypto and register features
+ # using the ENGINE functionality, and since that relies on global tables,
+ # those *have* to be exacty the same as the ones accessed from the app,
+ # which cannot be guaranteed if shared libraries aren't present.
+ # (note that even with shared libraries, both the app and dynamic engines
+ # must be linked with the same library)
"shared" => [ "dynamic-engine" ],
+ # Other modules don't necessarily have to link with libcrypto, so shared
+ # libraries do not have to be a condition to produce those.
+
+ # Without position independent code, there can be no shared libraries
+ # or modules.
+ "pic" => [ "shared", "module" ],
"engine" => [ grep /eng$/, @disablables ],
"hw" => [ "padlockeng" ],
@@ -1206,7 +1221,7 @@ foreach my $what (sort keys %disabled) {
$config{options} .= " no-$what";
- if (!grep { $what eq $_ } ( 'buildtest-c++', 'threads', 'shared',
+ if (!grep { $what eq $_ } ( 'buildtest-c++', 'threads', 'shared', 'module',
'pic', 'dynamic-engine', 'makedepend',
'zlib-dynamic', 'zlib', 'sse2' )) {
(my $WHAT = uc $what) =~ s|-|_|g;
@@ -1312,9 +1327,8 @@ if ($target{shared_target} eq "")
{
$no_shared_warn = 1
if (!$disabled{shared} || !$disabled{"dynamic-engine"});
- $disabled{shared} = "no-shared-target";
$disabled{pic} = $disabled{shared} = $disabled{"dynamic-engine"} =
- "no-shared-target";
+ $disabled{module} = "no-shared-target";
}
if ($disabled{"dynamic-engine"}) {
@@ -2191,9 +2205,8 @@ EOF
src => [ 'sources',
'shared_sources' ],
dst => 'shared_sources' } },
- modules => { dso => { src => [ 'sources',
- 'shared_sources' ],
- dst => 'shared_sources' } },
+ modules => { dso => { src => [ 'sources' ],
+ dst => 'sources' } },
scripts => { script => { src => [ 'sources' ],
dst => 'sources' } }
} -> {$prodtype};
diff --git a/engines/build.info b/engines/build.info
index 16907da..3189f9f 100644
--- a/engines/build.info
+++ b/engines/build.info
@@ -21,7 +21,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[padlock]=../libcrypto
INCLUDE[padlock]=../include
IF[{- defined $target{shared_defflag} -}]
- SHARED_SOURCE[padlock]=padlock.ld
+ SOURCE[padlock]=padlock.ld
GENERATE[padlock.ld]=../util/engines.num
ENDIF
ENDIF
@@ -31,7 +31,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[capi]=../libcrypto
INCLUDE[capi]=../include
IF[{- defined $target{shared_defflag} -}]
- SHARED_SOURCE[capi]=capi.ld
+ SOURCE[capi]=capi.ld
GENERATE[capi.ld]=../util/engines.num
ENDIF
ENDIF
@@ -41,7 +41,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[afalg]=../libcrypto
INCLUDE[afalg]= ../include
IF[{- defined $target{shared_defflag} -}]
- SHARED_SOURCE[afalg]=afalg.ld
+ SOURCE[afalg]=afalg.ld
GENERATE[afalg.ld]=../util/engines.num
ENDIF
ENDIF
@@ -51,7 +51,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[devcrypto]=../libcrypto
INCLUDE[devcrypto]=../include
IF[{- defined $target{shared_defflag} -}]
- SHARED_SOURCE[devcrypto]=devcrypto.ld
+ SOURCE[devcrypto]=devcrypto.ld
GENERATE[devcrypto.ld]=../util/engines.num
ENDIF
ENDIF
@@ -61,14 +61,14 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[dasync]=../libcrypto
INCLUDE[dasync]=../include
IF[{- defined $target{shared_defflag} -}]
- SHARED_SOURCE[dasync]=dasync.ld
+ SOURCE[dasync]=dasync.ld
GENERATE[dasync.ld]=../util/engines.num
ENDIF
SOURCE[ossltest]=e_ossltest.c
DEPEND[ossltest]=../libcrypto
INCLUDE[ossltest]=../include
IF[{- defined $target{shared_defflag} -}]
- SHARED_SOURCE[ossltest]=ossltest.ld
+ SOURCE[ossltest]=ossltest.ld
GENERATE[ossltest.ld]=../util/engines.num
ENDIF
ENDIF
diff --git a/test/build.info b/test/build.info
index 13d6630..973536d 100644
--- a/test/build.info
+++ b/test/build.info
@@ -603,7 +603,7 @@ IF[{- !$disabled{tests} -}]
SOURCE[provider_test]=provider_test.c p_test.c
INCLUDE[provider_test]=../include ../apps/include
DEPEND[provider_test]=../libcrypto.a libtestutil.a
- IF[{- !$disabled{shared} -}]
+ IF[{- !$disabled{module} -}]
MODULES{noinst}=p_test
SOURCE[p_test]=p_test.c
INCLUDE[p_test]=../include
@@ -611,9 +611,10 @@ IF[{- !$disabled{tests} -}]
SOURCE[p_test]=p_test.ld
GENERATE[p_test.ld]=../util/providers.num
ENDIF
- ELSE
- DEFINE[provider_test]=OPENSSL_NO_SHARED
- DEFINE[provider_internal_test]=OPENSSL_NO_SHARED
+ ENDIF
+ IF[{- $disabled{module} || !$target{dso_scheme} -}]
+ DEFINE[provider_test]=OPENSSL_NO_MODULE
+ DEFINE[provider_internal_test]=OPENSSL_NO_MODULE
ENDIF
PROGRAMS{noinst}=params_test
diff --git a/test/provider_internal_test.c b/test/provider_internal_test.c
index 7f6bb20..cbb85c3 100644
--- a/test/provider_internal_test.c
+++ b/test/provider_internal_test.c
@@ -11,11 +11,6 @@
#include "internal/provider.h"
#include "testutil.h"
-#if !defined(DSO_VMS) && !defined(DSO_DLCFN) && !defined(DSO_DL) \
- && !defined(DSO_WIN32) && !defined(DSO_DLFCN)
-# define OPENSSL_NO_DSO
-#endif
-
extern OSSL_provider_init_fn PROVIDER_INIT_FUNCTION_NAME;
static char buf[256];
@@ -61,7 +56,7 @@ static int test_builtin_provider(void)
&& test_provider(prov);
}
-#ifndef OPENSSL_NO_DSO
+#ifndef OPENSSL_NO_MODULE
static int test_loaded_provider(void)
{
const char *name = "p_test";
@@ -76,7 +71,7 @@ static int test_loaded_provider(void)
int setup_tests(void)
{
ADD_TEST(test_builtin_provider);
-#ifndef OPENSSL_NO_DSO
+#ifndef OPENSSL_NO_MODULE
ADD_TEST(test_loaded_provider);
#endif
return 1;
diff --git a/test/provider_test.c b/test/provider_test.c
index cba7cba..ee6f94c 100644
--- a/test/provider_test.c
+++ b/test/provider_test.c
@@ -11,12 +11,6 @@
#include <openssl/provider.h>
#include "testutil.h"
-#if !defined(DSO_VMS) && !defined(DSO_DLCFN) && !defined(DSO_DL) \
- && !defined(DSO_WIN32) && !defined(DSO_DLFCN)
-# define OPENSSL_NO_DSO
-#endif
-
-
extern OSSL_provider_init_fn PROVIDER_INIT_FUNCTION_NAME;
static char buf[256];
@@ -55,7 +49,7 @@ static int test_builtin_provider(void)
&& test_provider(name);
}
-#ifndef OPENSSL_NO_DSO
+#ifndef OPENSSL_NO_MODULE
static int test_loaded_provider(void)
{
const char *name = "p_test";
@@ -67,7 +61,7 @@ static int test_loaded_provider(void)
int setup_tests(void)
{
ADD_TEST(test_builtin_provider);
-#ifndef OPENSSL_NO_DSO
+#ifndef OPENSSL_NO_MODULE
ADD_TEST(test_loaded_provider);
#endif
return 1;
More information about the openssl-commits
mailing list