]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
openssl: OpenSSL 1.1.0 is thread-safe so we don't have to setup callbacks
authorTobias Brunner <tobias@strongswan.org>
Mon, 27 Jun 2016 09:01:43 +0000 (11:01 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 29 Jun 2016 09:09:36 +0000 (11:09 +0200)
src/libstrongswan/plugins/openssl/openssl_plugin.c

index e5c1dc0eeff7de7ae5654ddf037f08f83b22cee1..ef02676f413362bef29dd6c3aac23ae200a54066 100644 (file)
@@ -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
  */