aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/extconf.rb3
-rw-r--r--ext/openssl/ossl_engine.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index b2a09675e4..6f312220a6 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -112,7 +112,7 @@ have_func("EVP_MD_CTX_free")
have_func("HMAC_CTX_new")
have_func("HMAC_CTX_free")
have_func("HMAC_CTX_reset")
-have_func("RAND_pseudo_bytes", ["openssl/rand.h"], "-Werror=deprecated-declarations")
+have_func("RAND_pseudo_bytes", ["openssl/rand.h"], "-Werror=deprecated-declarations") # deprecated
have_func("X509_STORE_get_ex_data")
have_func("X509_STORE_set_ex_data")
have_func("X509_CRL_get0_signature")
@@ -131,6 +131,7 @@ have_func("SSL_CTX_get_ciphers")
have_func_like("SSL_CTX_set_min_proto_version", "openssl/ssl.h")
have_func("SSL_SESSION_up_ref")
have_func("EVP_PKEY_up_ref")
+have_func("ENGINE_cleanup") # removed
Logging::message "=== Checking done. ===\n"
diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
index 06c2867c2f..2553b30d8b 100644
--- a/ext/openssl/ossl_engine.c
+++ b/ext/openssl/ossl_engine.c
@@ -160,12 +160,16 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
* It is only necessary to run cleanup when engines are loaded via
* OpenSSL::Engine.load. However, running cleanup before exit is recommended.
*
+ * If you are using OpenSSL 1.1.0 or newer, this method is no-op.
+ *
* See also, https://www.openssl.org/docs/crypto/engine.html
*/
static VALUE
ossl_engine_s_cleanup(VALUE self)
{
+#if defined(HAVE_ENGINE_CLEANUP)
ENGINE_cleanup();
+#endif
return Qnil;
}