From eb70bf3fbc69459043196de96030ada6015ce27f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Wed, 28 Dec 2016 12:44:27 +0100
Subject: Cleanup
---
common.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'common.c')
diff --git a/common.c b/common.c
index 347e82b..a822847 100644
--- a/common.c
+++ b/common.c
@@ -34,6 +34,21 @@
#include
#include
+static void
+init_openssl (void)
+{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init ();
+ // XXX: this list is probably not complete
+ atexit (EVP_cleanup);
+ SSL_load_error_strings ();
+ atexit (ERR_free_strings);
+#else
+ // Cleanup is done automatically via atexit()
+ OPENSSL_init_ssl (0, NULL);
+#endif
+}
+
// --- To be moved to liberty --------------------------------------------------
static ssize_t
--
cgit v1.2.3