ruby: fix libressl-2.7

This commit is contained in:
Enno Boland 2018-04-23 19:09:19 +02:00
parent 5dd3d24656
commit dbd3fde38e
No known key found for this signature in database
GPG key ID: D09964719BDE9971
3 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,13 @@
$OpenBSD: patch-ext_openssl_extconf_rb,v 1.1 2018/02/23 09:54:25 sthen Exp $
Index: ext/openssl/extconf.rb
--- ext/openssl/extconf.rb.orig
+++ ext/openssl/extconf.rb
@@ -134,6 +134,7 @@ have_func("HMAC_CTX_free")
OpenSSL.check_func("RAND_pseudo_bytes", "openssl/rand.h") # deprecated
have_func("X509_STORE_get_ex_data")
have_func("X509_STORE_set_ex_data")
+have_func("X509_STORE_get_ex_new_index")
have_func("X509_CRL_get0_signature")
have_func("X509_REQ_get0_signature")
have_func("X509_REVOKED_get0_serialNumber")

View file

@ -0,0 +1,31 @@
$OpenBSD: patch-ext_openssl_openssl_missing_h,v 1.4 2018/02/23 09:54:25 sthen Exp $
Index: ext/openssl/openssl_missing.h
--- ext/openssl/openssl_missing.h.orig
+++ ext/openssl/openssl_missing.h
@@ -72,6 +72,9 @@ void ossl_HMAC_CTX_free(HMAC_CTX *);
#if !defined(HAVE_X509_STORE_SET_EX_DATA)
# define X509_STORE_set_ex_data(x, idx, data) \
CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))
+#endif
+
+#if !defined(HAVE_X509_STORE_GET_EX_NEW_INDEX)
# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \
(newf), (dupf), (freef))
@@ -145,6 +148,7 @@ void ossl_X509_REQ_get0_signature(const X509_REQ *, co
#endif
#if !defined(HAVE_OPAQUE_OPENSSL)
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL
#define IMPL_PKEY_GETTER(_type, _name) \
static inline _type *EVP_PKEY_get0_##_type(EVP_PKEY *pkey) { \
return pkey->pkey._name; }
@@ -196,6 +200,7 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
#undef IMPL_PKEY_GETTER
#undef IMPL_KEY_ACCESSOR2
#undef IMPL_KEY_ACCESSOR3
+#endif
#endif /* HAVE_OPAQUE_OPENSSL */
#if !defined(EVP_CTRL_AEAD_GET_TAG)

View file

@ -3,7 +3,7 @@ _ruby_abiver=2.5.0
pkgname=ruby
version=2.5.1
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-shared --disable-rpath
DOXYGEN=/usr/bin/doxygen DOT=/usr/bin/dot PKG_CONFIG=/usr/bin/pkg-config"