From 66f1a6afa363c5495c38548298f2aeb87014b3cc Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 25 Jan 2017 18:06:42 +0100 Subject: Fix OpenSSL 1.1 compatibility --- json-rpc-shell.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'json-rpc-shell.c') diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 8b6da1b..cf6523b 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -2241,10 +2241,15 @@ backend_ws_new (struct app_context *ctx, self->endpoint = xstrdup (endpoint); self->url = *url; +#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 return &self->super; } -- cgit v1.2.3-54-g00ecf