Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (b8d7019e372274059ab75a0812b7b6887de14267)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Treeve Jelbert <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (b8d7019e372274059ab75a0812b7b6887de14267)
  • Date: Thu, 5 Apr 2018 14:28:55 +0000

GIT changes to master grimoire by Treeve Jelbert <treeve AT sourcemage.org>:

ftp/curl/HISTORY
| 3
ftp/curl/PRE_BUILD
| 3
ftp/curl/patches/0001-openssl-fix-build-with-LibreSSL-2.7.patch
| 73 +++++

ftp/curl/patches/0002-openssl-provide-defines-for-argument-typecasts-to-bu.patch
| 42 +++
graphics-libs/opencv3/DETAILS
| 6
graphics-libs/opencv3/HISTORY
| 3
libs/libevent/HISTORY
| 4
libs/libevent/PRE_BUILD
| 3
libs/libevent/libressl.patch
| 106 --------
libs/libevent/patches/0001-libressl.patch
| 106 ++++++++
libs/libevent/patches/0002-Fix-build-with-LibreSSL-2.7.patch
| 124 ++++++++++
11 files changed, 362 insertions(+), 111 deletions(-)

New commits:
commit b8d7019e372274059ab75a0812b7b6887de14267
Author: Treeve Jelbert <treeve AT sourcemage.org>
Commit: Treeve Jelbert <treeve AT sourcemage.org>

curl - libressl-2.7 patches

commit b917b3691d917d6d744ca285d05767c3afabb197
Author: Treeve Jelbert <treeve AT sourcemage.org>
Commit: Treeve Jelbert <treeve AT sourcemage.org>

libevent - libressl-2.7 patch

commit 0c11cf449d0b7d9b07bf41b0dd7e50c1527707f0
Author: Treeve Jelbert <treeve AT sourcemage.org>
Commit: Treeve Jelbert <treeve AT sourcemage.org>

opencv3: => 3.4.1

diff --git a/ftp/curl/HISTORY b/ftp/curl/HISTORY
index 871c523..babaf62 100644
--- a/ftp/curl/HISTORY
+++ b/ftp/curl/HISTORY
@@ -1,3 +1,6 @@
+2018-04-05 Treeve Jelbert <treeve AT sourcemage.org>
+ * PRE_BUILD patches/*: apply upstream patches for libressl-2.7
+
2018-03-24 Treeve Jelbert <treeve AT sourcemage.org>
* DEPENDS: add brotli

diff --git a/ftp/curl/PRE_BUILD b/ftp/curl/PRE_BUILD
new file mode 100755
index 0000000..922c0ab
--- /dev/null
+++ b/ftp/curl/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+apply_patch_dir patches
diff --git a/ftp/curl/patches/0001-openssl-fix-build-with-LibreSSL-2.7.patch
b/ftp/curl/patches/0001-openssl-fix-build-with-LibreSSL-2.7.patch
new file mode 100644
index 0000000..d1277e7
--- /dev/null
+++ b/ftp/curl/patches/0001-openssl-fix-build-with-LibreSSL-2.7.patch
@@ -0,0 +1,73 @@
+From 7c90c93c0b061da81f69fabdd57125b2783c15fb Mon Sep 17 00:00:00 2001
+From: Bernard Spil <brnrd AT FreeBSD.org>
+Date: Mon, 2 Apr 2018 19:04:06 +0200
+Subject: [PATCH 1/3] openssl: fix build with LibreSSL 2.7
+
+ - LibreSSL 2.7 implements (most of) OpenSSL 1.1 API
+
+Fixes #2319
+Closes #2447
+Closes #2448
+
+Signed-off-by: Bernard Spil <brnrd AT FreeBSD.org>
+---
+ lib/vtls/openssl.c | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index 2a6b3cf..bbb8ec7 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -104,7 +104,8 @@
+ #endif
+
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && /* OpenSSL 1.1.0+ */ \
+- !defined(LIBRESSL_VERSION_NUMBER)
++ !(defined(LIBRESSL_VERSION_NUMBER) && \
++ LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
+ #define HAVE_X509_GET0_EXTENSIONS 1 /* added in 1.1.0 -pre1 */
+ #define HAVE_OPAQUE_EVP_PKEY 1 /* since 1.1.0 -pre3 */
+@@ -128,7 +129,8 @@ static unsigned long OpenSSL_version_num(void)
+ #endif
+
+ #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* 1.0.2 or later */ \
+- !defined(LIBRESSL_VERSION_NUMBER)
++ !(defined(LIBRESSL_VERSION_NUMBER) && \
++ LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #define HAVE_X509_GET0_SIGNATURE 1
+ #endif
+
+@@ -147,7 +149,7 @@ static unsigned long OpenSSL_version_num(void)
+ * Whether SSL_CTX_set_keylog_callback is available.
+ * OpenSSL: supported since 1.1.1
https://github.com/openssl/openssl/pull/2287
+ * BoringSSL: supported since d28f59c27bac (committed 2015-11-19)
+- * LibreSSL: unsupported in at least 2.5.1 (explicitly check for it since it
++ * LibreSSL: unsupported in at least 2.7.2 (explicitly check for it since it
+ * lies and pretends to be OpenSSL 2.0.0).
+ */
+ #if (OPENSSL_VERSION_NUMBER >= 0x10101000L && \
+@@ -259,7 +261,9 @@ static void tap_ssl_key(const SSL *ssl, ssl_tap_state_t
*state)
+ if(!session || !keylog_file_fp)
+ return;
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L &&
!defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
++ !(defined(LIBRESSL_VERSION_NUMBER) && \
++ LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ /* ssl->s3 is not checked in openssl 1.1.0-pre6, but let's assume that
+ * we have a valid SSL context if we have a non-NULL session. */
+ SSL_get_client_random(ssl, client_random, SSL3_RANDOM_SIZE);
+@@ -2082,8 +2086,7 @@ static CURLcode ossl_connect_step1(struct connectdata
*conn, int sockindex)
+ case CURL_SSLVERSION_TLSv1_2:
+ case CURL_SSLVERSION_TLSv1_3:
+ /* it will be handled later with the context options */
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
+- !defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ req_method = TLS_client_method();
+ #else
+ req_method = SSLv23_client_method();
+--
+2.17.0
+
diff --git
a/ftp/curl/patches/0002-openssl-provide-defines-for-argument-typecasts-to-bu.patch

b/ftp/curl/patches/0002-openssl-provide-defines-for-argument-typecasts-to-bu.patch
new file mode 100644
index 0000000..953bc70
--- /dev/null
+++
b/ftp/curl/patches/0002-openssl-provide-defines-for-argument-typecasts-to-bu.patch
@@ -0,0 +1,42 @@
+From 256b80fe81ad6de63e7fcffbef5e2ce554319ae8 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel AT haxx.se>
+Date: Wed, 4 Apr 2018 10:55:56 +0200
+Subject: [PATCH 2/3] openssl: provide defines for argument typecasts to build
+ warning-free
+
+... as OpenSSL >= 1.1.0 and libressl >= 2.7.0 use different argument types.
+---
+ lib/vtls/openssl.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index bbb8ec7..fc9ad47 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -112,6 +112,14 @@
+ #define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */
+ #define CONST_EXTS const
+ #define HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED 1
++
++/* funny typecast define due to difference in API */
++#ifdef LIBRESSL_VERSION_NUMBER
++#define ARG2_X509_signature_print (X509_ALGOR *)
++#else
++#define ARG2_X509_signature_print
++#endif
++
+ #else
+ /* For OpenSSL before 1.1.0 */
+ #define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)
+@@ -2802,7 +2810,7 @@ static CURLcode get_cert_chain(struct connectdata
*conn,
+ ASN1_STRING *a = ASN1_STRING_new();
+ if(a) {
+ X509_get0_signature(&psig, &palg, x);
+- X509_signature_print(mem, palg, a);
++ X509_signature_print(mem, ARG2_X509_signature_print palg, a);
+ ASN1_STRING_free(a);
+
+ if(palg) {
+--
+2.17.0
+
diff --git a/graphics-libs/opencv3/DETAILS b/graphics-libs/opencv3/DETAILS
index d2a1169..fd1df22 100755
--- a/graphics-libs/opencv3/DETAILS
+++ b/graphics-libs/opencv3/DETAILS
@@ -1,13 +1,13 @@
SPELL=opencv3
- VERSION=3.4.0
+ VERSION=3.4.1
IPPV=ippicv_2017u3_lnx_intel64_general_20170822.tgz
GIT=dfe3162c237af211e98b8960018b564bc209261d
-
SOURCE_HASH=sha512:aa7e475f356ffdaeb2ae9f7e9380c92cae58fabde9cd3b23c388f9190b8fde31ee70d16648042d0c43c03b2ff1f15e4be950be7851133ea0aa82cf6e42ba4710
+
SOURCE_HASH=sha512:e1fc14285090c6fe9e26e721f2d67d7096650c523147e925567426ef76aa7f4c6f12035d6f6ce3ec7991a75a6828a810fd4f9b75f78ed5fcccecefbadd79944b
SOURCE=${SPELL}-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/${SPELL//3}-${VERSION}
SOURCE_URL[0]=https://github.com/Itseez/opencv/archive/$VERSION.tar.gz
if ! list find "$CV_CONTRIB" none ;then
-
SOURCE2_HASH=sha512:53f6127304f314d3be834f79520d4bc8a75e14cad8c9c14a66a7a6b37908ded114d24e3a2c664d4ec2275903db08ac826f29433e810c6400f3adc2714a3c5be7
+
SOURCE2_HASH=sha512:431dfba0f413071d7faa18bc6e6f5e4f015285e2cc730c5dd69b2a4d6aa4250b7e0bcb1814ac6f06f5c76f103aea1f93f72f32aee6bc0cd7ddacdaf1f40075c1
SOURCE2=opencv_contrib-$VERSION.tar.gz

SOURCE2_URL[0]=https://github.com/Itseez/opencv_contrib/archive/$VERSION.tar.gz
fi
diff --git a/graphics-libs/opencv3/HISTORY b/graphics-libs/opencv3/HISTORY
index adba66e..b892f02 100644
--- a/graphics-libs/opencv3/HISTORY
+++ b/graphics-libs/opencv3/HISTORY
@@ -1,3 +1,6 @@
+2018-04-05 Treeve Jelbert <treeve AT sourcemage.org>
+ * DETAILS: version 3.4.1
+
2018-02-16 Treeve Jelbert <treeve AT sourcemage.org>
* DEPENDS: acutially use ninja
* PREPARE: add tracking moudel, neede by face module
diff --git a/libs/libevent/HISTORY b/libs/libevent/HISTORY
index 0f502b7..42cb983 100644
--- a/libs/libevent/HISTORY
+++ b/libs/libevent/HISTORY
@@ -1,3 +1,7 @@
+2018-04-05 Treeve Jelbert <treeve AT sourcemage.org>
+ * libressl-2.7.patch
+ * PRE_BUILD: apply all patches
+
2017-02-06 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 2.1.8, switched to GitHub
* PRE_BUILD, libressl…patch: added a libressl fix from upstream
diff --git a/libs/libevent/PRE_BUILD b/libs/libevent/PRE_BUILD
index 8bc7ab9..e762f65 100755
--- a/libs/libevent/PRE_BUILD
+++ b/libs/libevent/PRE_BUILD
@@ -1,4 +1,3 @@
default_pre_build &&
cd ${SOURCE_DIRECTORY} &&
-
-patch -Np1 < ${SPELL_DIRECTORY}/libressl.patch
+apply_patch_dir patches
diff --git a/libs/libevent/libressl.patch b/libs/libevent/libressl.patch
deleted file mode 100644
index f338d73..0000000
--- a/libs/libevent/libressl.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From d057c45e8f48aa90d8b340cac4c8ae4cc8b5d0ac Mon Sep 17 00:00:00 2001
-From: Jan Beich <jbeich AT FreeBSD.org>
-Date: Sat, 28 Jan 2017 16:42:13 +0000
-Subject: [PATCH] Unbreak build with LibreSSL after openssl 1.1 support added
-
-Fixes: 3e9e0a0d46e4 ("Make it build using OpenSSL 1.1.0")
-Fixes: #445
----
- openssl-compat.h | 4 ++--
- sample/https-client.c | 6 +++---
- sample/le-proxy.c | 2 +-
- sample/openssl_hostname_validation.c | 2 +-
- test/regress_ssl.c | 2 +-
- 5 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/openssl-compat.h b/openssl-compat.h
-index 69afc71..0f2dcb7 100644
---- a/openssl-compat.h
-+++ b/openssl-compat.h
-@@ -1,7 +1,7 @@
- #ifndef OPENSSL_COMPAT_H
- #define OPENSSL_COMPAT_H
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
-
- static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
- {
-@@ -30,6 +30,6 @@ static inline BIO_METHOD *BIO_meth_new(int type, const
char *name)
-
- #define TLS_method SSLv23_method
-
--#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER) */
-
- #endif /* OPENSSL_COMPAT_H */
-diff --git a/sample/https-client.c b/sample/https-client.c
-index 7483956..7566683 100644
---- a/sample/https-client.c
-+++ b/sample/https-client.c
-@@ -312,7 +312,7 @@ main(int argc, char **argv)
- }
- uri[sizeof(uri) - 1] = '\0';
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
- // Initialize OpenSSL
- SSL_library_init();
- ERR_load_crypto_strings();
-@@ -480,7 +480,7 @@ main(int argc, char **argv)
- SSL_CTX_free(ssl_ctx);
- if (type == HTTP && ssl)
- SSL_free(ssl);
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
- EVP_cleanup();
- ERR_free_strings();
-
-@@ -492,7 +492,7 @@ main(int argc, char **argv)
- CRYPTO_cleanup_all_ex_data();
-
- sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
--#endif /*OPENSSL_VERSION_NUMBER < 0x10100000L */
-+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER) */
-
- #ifdef _WIN32
- WSACleanup();
-diff --git a/sample/le-proxy.c b/sample/le-proxy.c
-index 8d9b529..e2fbf45 100644
---- a/sample/le-proxy.c
-+++ b/sample/le-proxy.c
-@@ -259,7 +259,7 @@ main(int argc, char **argv)
-
- if (use_ssl) {
- int r;
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
- SSL_library_init();
- ERR_load_crypto_strings();
- SSL_load_error_strings();
-diff --git a/sample/openssl_hostname_validation.c
b/sample/openssl_hostname_validation.c
-index 40312f2..a60e38c 100644
---- a/sample/openssl_hostname_validation.c
-+++ b/sample/openssl_hostname_validation.c
-@@ -48,7 +48,7 @@ SOFTWARE.
-
- #define HOSTNAME_MAX_SIZE 255
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
- #define ASN1_STRING_get0_data ASN1_STRING_data
- #endif
-
-diff --git a/test/regress_ssl.c b/test/regress_ssl.c
-index 681705f..490853f 100644
---- a/test/regress_ssl.c
-+++ b/test/regress_ssl.c
-@@ -186,7 +186,7 @@ get_ssl_ctx(void)
- void
- init_ssl(void)
- {
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
- SSL_library_init();
- ERR_load_crypto_strings();
- SSL_load_error_strings();
diff --git a/libs/libevent/patches/0001-libressl.patch
b/libs/libevent/patches/0001-libressl.patch
new file mode 100644
index 0000000..f338d73
--- /dev/null
+++ b/libs/libevent/patches/0001-libressl.patch
@@ -0,0 +1,106 @@
+From d057c45e8f48aa90d8b340cac4c8ae4cc8b5d0ac Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich AT FreeBSD.org>
+Date: Sat, 28 Jan 2017 16:42:13 +0000
+Subject: [PATCH] Unbreak build with LibreSSL after openssl 1.1 support added
+
+Fixes: 3e9e0a0d46e4 ("Make it build using OpenSSL 1.1.0")
+Fixes: #445
+---
+ openssl-compat.h | 4 ++--
+ sample/https-client.c | 6 +++---
+ sample/le-proxy.c | 2 +-
+ sample/openssl_hostname_validation.c | 2 +-
+ test/regress_ssl.c | 2 +-
+ 5 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/openssl-compat.h b/openssl-compat.h
+index 69afc71..0f2dcb7 100644
+--- a/openssl-compat.h
++++ b/openssl-compat.h
+@@ -1,7 +1,7 @@
+ #ifndef OPENSSL_COMPAT_H
+ #define OPENSSL_COMPAT_H
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
+
+ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+ {
+@@ -30,6 +30,6 @@ static inline BIO_METHOD *BIO_meth_new(int type, const
char *name)
+
+ #define TLS_method SSLv23_method
+
+-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
++#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER) */
+
+ #endif /* OPENSSL_COMPAT_H */
+diff --git a/sample/https-client.c b/sample/https-client.c
+index 7483956..7566683 100644
+--- a/sample/https-client.c
++++ b/sample/https-client.c
+@@ -312,7 +312,7 @@ main(int argc, char **argv)
+ }
+ uri[sizeof(uri) - 1] = '\0';
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
+ // Initialize OpenSSL
+ SSL_library_init();
+ ERR_load_crypto_strings();
+@@ -480,7 +480,7 @@ main(int argc, char **argv)
+ SSL_CTX_free(ssl_ctx);
+ if (type == HTTP && ssl)
+ SSL_free(ssl);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
+ EVP_cleanup();
+ ERR_free_strings();
+
+@@ -492,7 +492,7 @@ main(int argc, char **argv)
+ CRYPTO_cleanup_all_ex_data();
+
+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+-#endif /*OPENSSL_VERSION_NUMBER < 0x10100000L */
++#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER) */
+
+ #ifdef _WIN32
+ WSACleanup();
+diff --git a/sample/le-proxy.c b/sample/le-proxy.c
+index 8d9b529..e2fbf45 100644
+--- a/sample/le-proxy.c
++++ b/sample/le-proxy.c
+@@ -259,7 +259,7 @@ main(int argc, char **argv)
+
+ if (use_ssl) {
+ int r;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+diff --git a/sample/openssl_hostname_validation.c
b/sample/openssl_hostname_validation.c
+index 40312f2..a60e38c 100644
+--- a/sample/openssl_hostname_validation.c
++++ b/sample/openssl_hostname_validation.c
+@@ -48,7 +48,7 @@ SOFTWARE.
+
+ #define HOSTNAME_MAX_SIZE 255
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
+ #define ASN1_STRING_get0_data ASN1_STRING_data
+ #endif
+
+diff --git a/test/regress_ssl.c b/test/regress_ssl.c
+index 681705f..490853f 100644
+--- a/test/regress_ssl.c
++++ b/test/regress_ssl.c
+@@ -186,7 +186,7 @@ get_ssl_ctx(void)
+ void
+ init_ssl(void)
+ {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
diff --git a/libs/libevent/patches/0002-Fix-build-with-LibreSSL-2.7.patch
b/libs/libevent/patches/0002-Fix-build-with-LibreSSL-2.7.patch
new file mode 100644
index 0000000..51b86d7
--- /dev/null
+++ b/libs/libevent/patches/0002-Fix-build-with-LibreSSL-2.7.patch
@@ -0,0 +1,124 @@
+From 28b8075400c70b2d2da2ce07e590c2ec6d11783d Mon Sep 17 00:00:00 2001
+From: Bernard Spil <brnrd AT FreeBSD.org>
+Date: Mon, 2 Apr 2018 13:18:27 +0200
+Subject: [PATCH 1/3] Fix build with LibreSSL 2.7
+
+LibreSSL 2.7 implements OpenSSL 1.1 API except for BIO_get_init()
+
+See also: https://bugs.freebsd.org/226900
+Signed-off-by: Bernard Spil <brnrd AT FreeBSD.org>
+Closes: #617 (cherry-pick)
+---
+ openssl-compat.h | 10 ++++++++--
+ sample/https-client.c | 9 ++++++---
+ sample/le-proxy.c | 3 ++-
+ sample/openssl_hostname_validation.c | 3 ++-
+ test/regress_ssl.c | 3 ++-
+ 5 files changed, 20 insertions(+), 8 deletions(-)
+
+diff --git a/openssl-compat.h b/openssl-compat.h
+index bffd259..5d91ac6 100644
+--- a/openssl-compat.h
++++ b/openssl-compat.h
+@@ -4,7 +4,8 @@
+ #include <openssl/bio.h>
+ #include "util-internal.h"
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L)
+
+ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+ {
+@@ -33,6 +34,11 @@ static inline BIO_METHOD *BIO_meth_new(int type, const
char *name)
+
+ #define TLS_method SSLv23_method
+
+-#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER) */
++#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L) */
++
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >=
0x20700000L
++#define BIO_get_init(b) (b)->init
++#endif
+
+ #endif /* OPENSSL_COMPAT_H */
+diff --git a/sample/https-client.c b/sample/https-client.c
+index 8ef7598..4292f09 100644
+--- a/sample/https-client.c
++++ b/sample/https-client.c
+@@ -312,7 +312,8 @@ main(int argc, char **argv)
+ }
+ uri[sizeof(uri) - 1] = '\0';
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L)
+ // Initialize OpenSSL
+ SSL_library_init();
+ ERR_load_crypto_strings();
+@@ -488,7 +489,8 @@ cleanup:
+ SSL_CTX_free(ssl_ctx);
+ if (type == HTTP && ssl)
+ SSL_free(ssl);
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L)
+ EVP_cleanup();
+ ERR_free_strings();
+
+@@ -501,7 +503,8 @@ cleanup:
+ CRYPTO_cleanup_all_ex_data();
+
+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+-#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER) */
++#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L) */
+
+ #ifdef _WIN32
+ WSACleanup();
+diff --git a/sample/le-proxy.c b/sample/le-proxy.c
+index 4e1cf03..73c4888 100644
+--- a/sample/le-proxy.c
++++ b/sample/le-proxy.c
+@@ -261,7 +261,8 @@ main(int argc, char **argv)
+
+ if (use_ssl) {
+ int r;
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L)
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+diff --git a/sample/openssl_hostname_validation.c
b/sample/openssl_hostname_validation.c
+index a60e38c..4036ccb 100644
+--- a/sample/openssl_hostname_validation.c
++++ b/sample/openssl_hostname_validation.c
+@@ -48,7 +48,8 @@ SOFTWARE.
+
+ #define HOSTNAME_MAX_SIZE 255
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L)
+ #define ASN1_STRING_get0_data ASN1_STRING_data
+ #endif
+
+diff --git a/test/regress_ssl.c b/test/regress_ssl.c
+index 5004f7e..9202697 100644
+--- a/test/regress_ssl.c
++++ b/test/regress_ssl.c
+@@ -185,7 +185,8 @@ get_ssl_ctx(void)
+ void
+ init_ssl(void)
+ {
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ||
defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x20700000L)
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+--
+2.17.0
+



  • [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (b8d7019e372274059ab75a0812b7b6887de14267), Treeve Jelbert, 04/05/2018

Archive powered by MHonArc 2.6.24.

Top of Page