[ruby/openssl] engine: remove mention of LibreSSL from OpenSSL::Engine
These paths are only reachable when it is compiled against OpenSSL. LibreSSL 3.9 does not support ENGINE and defines OPENSSL_NO_ENGINE. https://github.com/ruby/openssl/commit/e153d6ab47
This commit is contained in:
parent
731d3ec301
commit
318519caaa
@ -123,6 +123,7 @@ version_ok = if have_macro("LIBRESSL_VERSION_NUMBER", "openssl/opensslv.h")
|
||||
checking_for("LibreSSL version >= 3.9.0") {
|
||||
try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x30900000L", "openssl/opensslv.h") }
|
||||
else
|
||||
is_openssl = true
|
||||
checking_for("OpenSSL version >= 1.0.2") {
|
||||
try_static_assert("OPENSSL_VERSION_NUMBER >= 0x10002000L", "openssl/opensslv.h") }
|
||||
end
|
||||
@ -143,11 +144,13 @@ ssl_h = "openssl/ssl.h".freeze
|
||||
|
||||
# compile options
|
||||
have_func("RAND_egd()", "openssl/rand.h")
|
||||
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")
|
||||
}
|
||||
if is_openssl
|
||||
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")
|
||||
}
|
||||
end
|
||||
|
||||
# added in 1.1.0
|
||||
if !have_struct_member("SSL", "ctx", "openssl/ssl.h") || is_libressl
|
||||
|
@ -47,7 +47,7 @@ static VALUE eEngineError;
|
||||
/*
|
||||
* Private
|
||||
*/
|
||||
#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000
|
||||
#if OSSL_OPENSSL_PREREQ(1, 1, 0)
|
||||
#define OSSL_ENGINE_LOAD_IF_MATCH(engine_name, x) \
|
||||
do{\
|
||||
if(!strcmp(#engine_name, RSTRING_PTR(name))){\
|
||||
@ -163,7 +163,7 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
|
||||
static VALUE
|
||||
ossl_engine_s_cleanup(VALUE self)
|
||||
{
|
||||
#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000
|
||||
#if !OSSL_OPENSSL_PREREQ(1, 1, 0)
|
||||
ENGINE_cleanup();
|
||||
#endif
|
||||
return Qnil;
|
||||
|
Loading…
x
Reference in New Issue
Block a user