aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-01 16:57:43 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-01 16:57:43 +0100
commit5570898aca147e0e7bde470d72965d8ea8b62eee (patch)
tree749191950619c13a9d8696e098b96ea278f0095e
parent5f5d58b3da848daaea0e75b8807c24d42ba5ed67 (diff)
downloadponymap-5570898aca147e0e7bde470d72965d8ea8b62eee.tar.gz
ponymap-5570898aca147e0e7bde470d72965d8ea8b62eee.tar.xz
ponymap-5570898aca147e0e7bde470d72965d8ea8b62eee.zip
Fix OpenSSL 1.1 compatibility
-rw-r--r--ponymap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ponymap.c b/ponymap.c
index 9fea7b0..a9ecd4c 100644
--- a/ponymap.c
+++ b/ponymap.c
@@ -2115,10 +2115,15 @@ main (int argc, char *argv[])
init_terminal ();
atexit (free_terminal);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
SSL_library_init ();
atexit (EVP_cleanup);
SSL_load_error_strings ();
atexit (ERR_free_strings);
+#else
+ // Cleanup is done automatically via atexit()
+ OPENSSL_init_ssl (0, NULL);
+#endif
struct error *e = NULL;
if (!simple_config_update_from_file (&ctx.config, &e))