Skip to content

Commit

Permalink
lang/ruby24: Fix build with LibreSSL 2.7
Browse files Browse the repository at this point in the history
 - LibreSSL 2.7 implements OpenSSL 1.1 API

See also: https://bugs.freebsd.org/226852
Upstream: ruby/openssl#193
Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
  • Loading branch information
Sp1l committed Apr 9, 2018
1 parent f05f59f commit 0306a03
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lang/ruby24/files/patch-ext_openssl_extconf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- ext/openssl/extconf.rb.orig 2017-09-08 14:38:12 UTC
+++ ext/openssl/extconf.rb
@@ -157,8 +157,11 @@ OpenSSL.check_func_or_macro("SSL_get_ser
have_func("SSL_is_server")
# added in 1.1.0
+if !have_struct_member("SSL", "ctx", "openssl/ssl.h") ||
+ try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", "openssl/opensslv.h")
+ $defs.push("-DHAVE_OPAQUE_OPENSSL")
+end
have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API")
-have_struct_member("SSL", "ctx", "openssl/ssl.h") || $defs.push("-DHAVE_OPAQUE_OPENSSL")
have_func("BN_GENCB_new")
have_func("BN_GENCB_free")
have_func("BN_GENCB_get_arg")

0 comments on commit 0306a03

Please sign in to comment.