Date: Mon, 17 Apr 2023 10:44:55 GMT From: Bernard Spil <brnrd@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 6c9469b584ae - main - databases/galera26: Fix build with LibreSSL Message-ID: <202304171044.33HAitfJ074832@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=6c9469b584ae0b4d96fd0a7700d6d3451168b8d1 commit 6c9469b584ae0b4d96fd0a7700d6d3451168b8d1 Author: Bernard Spil <brnrd@FreeBSD.org> AuthorDate: 2023-04-17 10:42:49 +0000 Commit: Bernard Spil <brnrd@FreeBSD.org> CommitDate: 2023-04-17 10:42:49 +0000 databases/galera26: Fix build with LibreSSL * None of the LibreSSL versions (35+) in ports require patching https://github.com/codership/galera/pull/640 PR: 264180 --- .../files/patch-asio_asio_ssl_impl_context.ipp | 143 +++++++++++++++++++++ ...ch-galerautils_src_gu__asio__stream__engine.cpp | 11 -- 2 files changed, 143 insertions(+), 11 deletions(-) diff --git a/databases/galera26/files/patch-asio_asio_ssl_impl_context.ipp b/databases/galera26/files/patch-asio_asio_ssl_impl_context.ipp new file mode 100644 index 000000000000..8e9c85ca711e --- /dev/null +++ b/databases/galera26/files/patch-asio_asio_ssl_impl_context.ipp @@ -0,0 +1,143 @@ +--- asio/asio/ssl/impl/context.ipp.orig 2023-02-03 12:20:21 UTC ++++ asio/asio/ssl/impl/context.ipp +@@ -87,7 +87,7 @@ context::context(context::method m) + #endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2) + + // SSL v3. +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + case context::sslv3: + handle_ = ::SSL_CTX_new(::TLS_method()); + if (handle_) +@@ -132,7 +132,7 @@ context::context(context::method m) + #endif // defined(OPENSSL_NO_SSL3) + + // TLS v1.0. +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + case context::tlsv1: + handle_ = ::SSL_CTX_new(::TLS_method()); + if (handle_) +@@ -177,7 +177,7 @@ context::context(context::method m) + #endif // defined(SSL_TXT_TLSV1) + + // TLS v1.1. +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + case context::tlsv11: + handle_ = ::SSL_CTX_new(::TLS_method()); + if (handle_) +@@ -222,7 +222,7 @@ context::context(context::method m) + #endif // defined(SSL_TXT_TLSV1_1) + + // TLS v1.2. +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + case context::tlsv12: + handle_ = ::SSL_CTX_new(::TLS_method()); + if (handle_) +@@ -267,8 +267,7 @@ context::context(context::method m) + #endif // defined(SSL_TXT_TLSV1_2) + + // TLS v1.3. +-#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) + case context::tlsv13: + handle_ = ::SSL_CTX_new(::TLS_method()); + if (handle_) +@@ -294,7 +293,6 @@ context::context(context::method m) + } + break; + #else // (OPENSSL_VERSION_NUMBER >= 0x10101000L) +- // && !defined(LIBRESSL_VERSION_NUMBER) + case context::tlsv13: + case context::tlsv13_client: + case context::tlsv13_server: +@@ -302,7 +300,6 @@ context::context(context::method m) + asio::error::invalid_argument, "context"); + break; + #endif // (OPENSSL_VERSION_NUMBER >= 0x10101000L) +- // && !defined(LIBRESSL_VERSION_NUMBER) + + // Any supported SSL/TLS version. + case context::sslv23: +@@ -316,7 +313,7 @@ context::context(context::method m) + break; + + // Any supported TLS version. +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + case context::tls: + handle_ = ::SSL_CTX_new(::TLS_method()); + if (handle_) +@@ -386,8 +383,7 @@ context::~context() + { + if (handle_) + { +-#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER)) \ ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) \ + || defined(ASIO_USE_WOLFSSL) + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) +@@ -399,8 +395,7 @@ context::~context() + static_cast<detail::password_callback_base*>( + cb_userdata); + delete callback; +-#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER)) \ ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) \ + || defined(ASIO_USE_WOLFSSL) + ::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) +@@ -738,8 +733,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain( + bio_cleanup bio = { make_buffer_bio(chain) }; + if (bio.p) + { +-#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER)) \ ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) \ + || defined(ASIO_USE_WOLFSSL) + pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_); + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); +@@ -767,8 +761,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain( + ASIO_SYNC_OP_VOID_RETURN(ec); + } + +-#if ((OPENSSL_VERSION_NUMBER >= 0x10002000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER)) \ ++#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \ + || defined(ASIO_USE_WOLFSSL) + ::SSL_CTX_clear_chain_certs(handle_); + #else +@@ -846,8 +839,7 @@ ASIO_SYNC_OP_VOID context::use_private_key( + { + ::ERR_clear_error(); + +-#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER)) \ ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) \ + || defined(ASIO_USE_WOLFSSL) + pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_); + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); +@@ -915,8 +907,7 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key( + { + ::ERR_clear_error(); + +-#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER)) \ ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) \ + || defined(ASIO_USE_WOLFSSL) + pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_); + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); +@@ -1156,8 +1147,7 @@ int context::verify_callback_function(int preverified, + ASIO_SYNC_OP_VOID context::do_set_password_callback( + detail::password_callback_base* callback, asio::error_code& ec) + { +-#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \ +- && !defined(LIBRESSL_VERSION_NUMBER)) \ ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) \ + || defined(ASIO_USE_WOLFSSL) + void* old_callback = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); + ::SSL_CTX_set_default_passwd_cb_userdata(handle_, callback); diff --git a/databases/galera26/files/patch-galerautils_src_gu__asio__stream__engine.cpp b/databases/galera26/files/patch-galerautils_src_gu__asio__stream__engine.cpp deleted file mode 100644 index 6185cf594e4b..000000000000 --- a/databases/galera26/files/patch-galerautils_src_gu__asio__stream__engine.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- galerautils/src/gu_asio_stream_engine.cpp.orig 2021-11-15 21:09:11 UTC -+++ galerautils/src/gu_asio_stream_engine.cpp -@@ -100,7 +100,7 @@ class AsioTcpStreamEngine : public gu::AsioStreamEngin - - #include <openssl/ssl.h> - --#if OPENSSL_VERSION_NUMBER >= 0x1010100fL -+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER) - #define HAVE_READ_EX - #define HAVE_WRITE_EX - #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304171044.33HAitfJ074832>