[openssl] master update
Richard Levitte
levitte at openssl.org
Thu Jun 18 07:19:19 UTC 2020
The branch master has been updated
via 9a7319b0b0b9ddaa440b102dc8e197d267700756 (commit)
from bb361a27bafeb733417d9ab471973a333a924944 (commit)
- Log -----------------------------------------------------------------
commit 9a7319b0b0b9ddaa440b102dc8e197d267700756
Author: Matthias Kraft <Matthias.Kraft at softwareag.com>
Date: Mon May 25 10:10:24 2020 +0200
Configure DEPs for FIPS provider on AIX.
The binder of the AIX linker needs to be told which functions to call on
loading and initializing a shared object. Therefore another configuration
variable shared_fipsflag is introduced, which is appended to shared_defflag
when the providers/fips module gets configured.
It was suggested to refactor the line in the build file template to become
more generic and less magic. There is, however, currently no suggestion how
to actually achive this, so we leave a TODO comment.
The possible shared_fipsflag must only be appended to the shared_def iff
this code is acting on behalf of the fips provider module build.
Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11950)
-----------------------------------------------------------------------
Summary of changes:
Configurations/10-main.conf | 1 +
Configurations/unix-Makefile.tmpl | 3 ++-
providers/fips/self_test.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index a44a74cb32..3332f03765 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1164,6 +1164,7 @@ my %targets = (
module_ldflags => "-Wl,-G,-bsymbolic,-bnoentry",
shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry",
shared_defflag => "-Wl,-bE:",
+ shared_fipsflag => "-Wl,-binitfini:init:cleanup",
perl_platform => 'AIX',
},
"aix-gcc" => {
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 126180ace7..fc4f60770b 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -1485,7 +1485,8 @@ EOF
@{$args{objs}};
my @deps = compute_lib_depends(@{$args{deps}});
my $shared_def = join("", map { ' '.$target{shared_defflag}.$_ } @defs);
-
+ # TODO(3.0): next line needs to become "less magic" (see PR #11950)
+ $shared_def .= ' '.$target{shared_fipsflag} if (m/providers\/fips/ && defined $target{shared_fipsflag});
my $objs = join(" \\\n\t\t", fill_lines(' ', $COLUMNS - 16, @objs));
my $deps = join(" \\\n" . ' ' x (length($dso) + 2),
fill_lines(' ', $COLUMNS - length($dso) - 2,
diff --git a/providers/fips/self_test.c b/providers/fips/self_test.c
index 4619fedef5..c482544346 100644
--- a/providers/fips/self_test.c
+++ b/providers/fips/self_test.c
@@ -92,7 +92,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
return TRUE;
}
-#elif defined(__sun)
+#elif defined(__sun) || defined(_AIX)
DEP_DECLARE() /* must be declared before pragma */
# define DEP_INIT_ATTRIBUTE
More information about the openssl-commits
mailing list