summaryrefslogtreecommitdiffstats
path: root/providers/fips
diff options
context:
space:
mode:
authorRandall S. Becker <rsbecker@nexbridge.com>2020-09-21 00:30:14 +0200
committerRichard Levitte <levitte@openssl.org>2020-09-22 07:52:39 +0200
commit6b1428ac12749f7ff0e49be363e9f7097f0e58b0 (patch)
treef2954cdb481eb9589ed5076b05d0145502ad4db4 /providers/fips
parentAdd const to 'ppin' function parameter (diff)
downloadopenssl-6b1428ac12749f7ff0e49be363e9f7097f0e58b0.tar.xz
openssl-6b1428ac12749f7ff0e49be363e9f7097f0e58b0.zip
Added FIPS DEP initialization for the NonStop platform in fips/self_test.c.
CLA: Permission is granted by the author to the OpenSSL team to use these modifications. Fixes #12918 Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12928)
Diffstat (limited to 'providers/fips')
-rw-r--r--providers/fips/self_test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/providers/fips/self_test.c b/providers/fips/self_test.c
index 9d95f0ccf1..81f475e900 100644
--- a/providers/fips/self_test.c
+++ b/providers/fips/self_test.c
@@ -123,6 +123,22 @@ DEP_DECLARE()
#elif defined(__GNUC__)
# define DEP_INIT_ATTRIBUTE static __attribute__((constructor))
# define DEP_FINI_ATTRIBUTE static __attribute__((destructor))
+
+#elif defined(__TANDEM)
+DEP_DECLARE() /* must be declared before calling init() or cleanup() */
+# define DEP_INIT_ATTRIBUTE
+# define DEP_FINI_ATTRIBUTE
+
+/* Method automatically called by the NonStop OS when the DLL loads */
+void __INIT__init(void) {
+ init();
+}
+
+/* Method automatically called by the NonStop OS prior to unloading the DLL */
+void __TERM__cleanup(void) {
+ cleanup();
+}
+
#endif
#if defined(DEP_INIT_ATTRIBUTE) && defined(DEP_FINI_ATTRIBUTE)