From owner-svn-ports-head@freebsd.org Sat Apr 21 19:39:39 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE5F7F91C85; Sat, 21 Apr 2018 19:39:39 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7436481998; Sat, 21 Apr 2018 19:39:39 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 506E832EF; Sat, 21 Apr 2018 19:39:39 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3LJdd4K030897; Sat, 21 Apr 2018 19:39:39 GMT (envelope-from brnrd@FreeBSD.org) Received: (from brnrd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3LJddVa030896; Sat, 21 Apr 2018 19:39:39 GMT (envelope-from brnrd@FreeBSD.org) Message-Id: <201804211939.w3LJddVa030896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brnrd set sender to brnrd@FreeBSD.org using -f From: Bernard Spil Date: Sat, 21 Apr 2018 19:39:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r467904 - head/devel/libevent/files X-SVN-Group: ports-head X-SVN-Commit-Author: brnrd X-SVN-Commit-Paths: head/devel/libevent/files X-SVN-Commit-Revision: 467904 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Apr 2018 19:39:40 -0000 Author: brnrd Date: Sat Apr 21 19:39:38 2018 New Revision: 467904 URL: https://svnweb.freebsd.org/changeset/ports/467904 Log: devel/libevent: Fix build with LibreSSL 2.7 - LibreSSL 2.7 implements most of OpenSSL 1.1 API PR: 226900 Reported by: Piotr Kubaj Approved by: maintainer time-out Modified: head/devel/libevent/files/patch-libressl Modified: head/devel/libevent/files/patch-libressl ============================================================================== --- head/devel/libevent/files/patch-libressl Sat Apr 21 18:56:01 2018 (r467903) +++ head/devel/libevent/files/patch-libressl Sat Apr 21 19:39:38 2018 (r467904) @@ -1,86 +1,103 @@ -LibreSSL uses a synthetic version in order to force consumers to check -individual features instead but API isn't compatible with OpenSSL 1.1.x. +From 28b8075400c70b2d2da2ce07e590c2ec6d11783d Mon Sep 17 00:00:00 2001 +From: Bernard Spil +Date: Mon, 2 Apr 2018 13:18:27 +0200 +Subject: [PATCH] Fix build with LibreSSL 2.7 -https://github.com/libevent/libevent/commit/d057c45e8f48 +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 +Closes: #617 (cherry-pick) --- openssl-compat.h.orig 2017-01-25 23:37:15 UTC +++ openssl-compat.h -@@ -1,7 +1,7 @@ +@@ -1,7 +1,8 @@ #ifndef OPENSSL_COMPAT_H #define OPENSSL_COMPAT_H -#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#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) { -@@ -30,6 +30,6 @@ static inline BIO_METHOD *BIO_meth_new(i +@@ -30,6 +31,11 @@ static inline BIO_METHOD *BIO_meth_new(i #define TLS_method SSLv23_method -#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ -+#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 */ --- sample/https-client.c.orig 2017-01-25 23:37:15 UTC +++ sample/https-client.c -@@ -312,7 +312,7 @@ main(int argc, char **argv) +@@ -312,7 +312,8 @@ main(int argc, char **argv) } uri[sizeof(uri) - 1] = '\0'; -#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#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(); -@@ -480,7 +480,7 @@ cleanup: +@@ -480,7 +481,8 @@ cleanup: 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) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) EVP_cleanup(); ERR_free_strings(); -@@ -492,7 +492,7 @@ cleanup: +@@ -492,7 +494,8 @@ cleanup: 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) */ ++#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */ #ifdef _WIN32 WSACleanup(); --- sample/le-proxy.c.orig 2017-01-25 23:37:15 UTC +++ sample/le-proxy.c -@@ -259,7 +259,7 @@ main(int argc, char **argv) +@@ -259,7 +259,8 @@ main(int argc, char **argv) if (use_ssl) { int r; -#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#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(); --- sample/openssl_hostname_validation.c.orig 2017-01-25 23:37:15 UTC +++ sample/openssl_hostname_validation.c -@@ -48,7 +48,7 @@ SOFTWARE. +@@ -48,7 +48,8 @@ SOFTWARE. #define HOSTNAME_MAX_SIZE 255 -#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#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 --- test/regress_ssl.c.orig 2017-01-25 23:37:15 UTC +++ test/regress_ssl.c -@@ -186,7 +186,7 @@ get_ssl_ctx(void) +@@ -186,7 +186,8 @@ get_ssl_ctx(void) void init_ssl(void) { -#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#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();