From: Tobias Brunner Date: Mon, 27 Jun 2016 09:01:43 +0000 (+0200) Subject: openssl: OpenSSL 1.1.0 is thread-safe so we don't have to setup callbacks X-Git-Tag: 5.5.0rc1~9^2~17 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6c43a8d8acd3eceeaa3992a368374759bb838c8;p=thirdparty%2Fstrongswan.git openssl: OpenSSL 1.1.0 is thread-safe so we don't have to setup callbacks --- diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c index e5c1dc0eef..ef02676f41 100644 --- a/src/libstrongswan/plugins/openssl/openssl_plugin.c +++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c @@ -65,6 +65,11 @@ struct private_openssl_plugin_t { openssl_plugin_t public; }; +/** + * OpenSSL is thread-safe since 1.1.0 + */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L + /** * Array of static mutexs, with CRYPTO_num_locks() mutex */ @@ -227,6 +232,14 @@ static void threading_cleanup() cleanup->destroy(cleanup); } +#else /* OPENSSL_VERSION_NUMBER */ + +#define threading_init() + +#define threading_cleanup() + +#endif + /** * Seed the OpenSSL RNG, if required */