diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-27 13:43:58 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-27 23:07:42 +0900 |
commit | e605469019f038a01f385ee65a886a2057fd24f8 (patch) | |
tree | 2df432c3a35c66d426175a029d09e3b99768ad87 /ext/openssl/ossl_engine.c | |
parent | 70f1019cbfbe7a65e2195dc7512ce108868fe1fd (diff) | |
download | ruby-e605469019f038a01f385ee65a886a2057fd24f8.tar.gz |
ext/openssl: make ENGINE.cleanup no-op if using OpenSSL 1.1.0
Diffstat (limited to 'ext/openssl/ossl_engine.c')
-rw-r--r-- | ext/openssl/ossl_engine.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |