From e605469019f038a01f385ee65a886a2057fd24f8 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 27 Apr 2016 13:43:58 +0900 Subject: ext/openssl: make ENGINE.cleanup no-op if using OpenSSL 1.1.0 --- ext/openssl/ossl_engine.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/openssl/ossl_engine.c') 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; } -- cgit v1.2.3