Browse code

Revert "tls: proper ifdef on libssl version for tls_init_locks()"

This reverts commit 60bd3aa284a5d9eb117a9763aa590aecf276ba16.

Victor Seva authored on 02/09/2020 12:27:18
Showing 1 changed files
... ...
@@ -140,7 +140,7 @@ unsigned long sr_ssl_id_f()
140 140
 /* returns -1 on error, 0 on success */
141 141
 int tls_init_locks()
142 142
 {
143
-/* OpenSSL is no longer supporting to set locking callbacks since 1.1.0 */
143
+/* OpenSSL is thread-safe since 1.1.0 */
144 144
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
145 145
 	/* init "static" tls locks */
146 146
 	n_static_locks=CRYPTO_num_locks();
... ...
@@ -185,13 +185,10 @@ int tls_init_locks()
185 185
 	 *  (only atomic_inc), fallback to the default use-locks mode
186 186
 	 * CRYPTO_set_add_lock_callback(atomic_add_f);
187 187
 	 */
188
+#endif
188 189
 
189 190
 	return 0;
190 191
 error:
191 192
 	tls_destroy_locks();
192 193
 	return -1;
193
-
194
-#else
195
-	return 0;
196
-#endif
197 194
 }