diff options
author | Tobias Brunner <tobias@strongswan.org> | 2016-06-27 11:01:43 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2016-06-29 11:09:36 +0200 |
commit | a6c43a8d8acd3eceeaa3992a368374759bb838c8 (patch) | |
tree | 2899987e6c4e76e7b355e6da73d684fdb98c84d3 /src/libstrongswan/plugins/openssl/openssl_plugin.c | |
parent | c01df20ebfa03b2bf4a953cc70c3c71196de196e (diff) | |
download | strongswan-a6c43a8d8acd3eceeaa3992a368374759bb838c8.tar.bz2 strongswan-a6c43a8d8acd3eceeaa3992a368374759bb838c8.tar.xz |
openssl: OpenSSL 1.1.0 is thread-safe so we don't have to setup callbacks
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/openssl/openssl_plugin.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ -66,6 +66,11 @@ struct private_openssl_plugin_t { }; /** + * OpenSSL is thread-safe since 1.1.0 + */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L + +/** * Array of static mutexs, with CRYPTO_num_locks() mutex */ static mutex_t **mutex = NULL; @@ -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 */ |