From a6c43a8d8acd3eceeaa3992a368374759bb838c8 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 27 Jun 2016 11:01:43 +0200 Subject: openssl: OpenSSL 1.1.0 is thread-safe so we don't have to setup callbacks --- src/libstrongswan/plugins/openssl/openssl_plugin.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/libstrongswan/plugins/openssl/openssl_plugin.c') diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c index e5c1dc0ee..ef02676f4 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 */ -- cgit v1.2.3