aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2020-02-20 16:46:42 +0000
committerKazuki Yamaguchi <k@rhe.jp>2020-02-21 08:38:48 +0000
commit92092537b84709394faf650c8cbb5e4e9506349c (patch)
treea4de6763a0645cb905ee45cf4089bbaa4b8a7fda
parentbb12a00a481f6e55e6efdfdffb5abb98c7e1f76e (diff)
downloadruby-openssl-92092537b84709394faf650c8cbb5e4e9506349c.tar.gz
engine: do not check for ENGINE_load_builtin_engines()
Remove dead code. The function, or a macro in OpenSSL 1.1.0 and newer, always exists unless the whole engine code is disabled with OPENSSL_NO_ENGINE.
-rw-r--r--ext/openssl/extconf.rb2
-rw-r--r--ext/openssl/ossl_engine.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index c16964f7..693e55cd 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -110,7 +110,7 @@ end
Logging::message "=== Checking for OpenSSL features... ===\n"
# compile options
have_func("RAND_egd")
-engines = %w{builtin_engines dynamic 4758cca aep atalla chil
+engines = %w{dynamic 4758cca aep atalla chil
cswift nuron sureware ubsec padlock capi gmp gost cryptodev}
engines.each { |name|
have_func("ENGINE_load_#{name}()", "openssl/engine.h")
diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
index 075adb62..f92c34dd 100644
--- a/ext/openssl/ossl_engine.c
+++ b/ext/openssl/ossl_engine.c
@@ -93,9 +93,6 @@ static const rb_data_type_t ossl_engine_type = {
static VALUE
ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
{
-#if !defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES)
- return Qnil;
-#else
VALUE name;
rb_scan_args(argc, argv, "01", &name);
@@ -151,7 +148,6 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
OSSL_ENGINE_LOAD_IF_MATCH(openssl, OPENSSL);
rb_warning("no such builtin loader for `%"PRIsVALUE"'", name);
return Qnil;
-#endif /* HAVE_ENGINE_LOAD_BUILTIN_ENGINES */
}
/*