return (0);
}
-#ifdef USE_TLS
+#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
/* ssl_cleanup - free memory allocated in the OpenSSL library */
CRYPTO_cleanup_all_ex_data();
}
-#endif
+#endif /* USE_TLS && OPENSSL_VERSION_NUMBER < 0x10100000L */
/* run - do what we were asked to do. */
/* Be valgrind friendly and clean-up */
cleanup(&state);
-#ifdef USE_TLS
+
+ /* OpenSSL 1.1.0 and later (de)initialization is implicit */
+#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
ssl_cleanup();
#endif