From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B8100138350 for ; Sat, 25 Jan 2020 19:43:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B61E1E0806; Sat, 25 Jan 2020 19:42:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 89593E0806 for ; Sat, 25 Jan 2020 19:42:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E8EC434E2CF for ; Sat, 25 Jan 2020 19:42:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B748ED for ; Sat, 25 Jan 2020 19:42:56 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1579981366.af5234eeeb8e6208d80bd5d97fe43d37dcbc563a.whissi@gentoo> Subject: [gentoo-commits] proj/mysql-extras:master commit in: / X-VCS-Repository: proj/mysql-extras X-VCS-Files: 20018_all_mysql-5.7.29-fix-libressl-support.patch X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: af5234eeeb8e6208d80bd5d97fe43d37dcbc563a X-VCS-Branch: master Date: Sat, 25 Jan 2020 19:42:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d4171dd8-aded-4077-b70b-1911e002e85f X-Archives-Hash: f4e771386677d397178943c164c7ad84 commit: af5234eeeb8e6208d80bd5d97fe43d37dcbc563a Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Jan 25 19:42:46 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Jan 25 19:42:46 2020 +0000 URL: https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=af5234ee Add 20018_all_mysql-5.7.29-fix-libressl-support.patch Signed-off-by: Thomas Deutschmann gentoo.org> 20018_all_mysql-5.7.29-fix-libressl-support.patch | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/20018_all_mysql-5.7.29-fix-libressl-support.patch b/20018_all_mysql-5.7.29-fix-libressl-support.patch new file mode 100644 index 0000000..c3604cb --- /dev/null +++ b/20018_all_mysql-5.7.29-fix-libressl-support.patch @@ -0,0 +1,79 @@ +--- a/cmake/ssl.cmake ++++ b/cmake/ssl.cmake +@@ -186,7 +186,8 @@ MACRO (MYSQL_CHECK_SSL) + OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}" + ) + ENDIF() +- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0") ++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION) ++ IF(HAVE_TLS1_3_VERSION) + ADD_DEFINITIONS(-DHAVE_TLSv13) + SET(HAVE_TLSv13 1) + IF(SOLARIS) +@@ -196,7 +197,7 @@ MACRO (MYSQL_CHECK_SSL) + IF(OPENSSL_INCLUDE_DIR AND + OPENSSL_LIBRARY AND + CRYPTO_LIBRARY AND +- OPENSSL_MAJOR_VERSION STREQUAL "1" ++ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1" + ) + SET(OPENSSL_FOUND TRUE) + ELSE() +--- a/sql/auth/sha2_password_common.cc ++++ b/sql/auth/sha2_password_common.cc +@@ -116,7 +116,8 @@ bool SHA256_digest::retrieve_digest(unsigned char *digest, + DBUG_RETURN(true); + } + m_ok= EVP_DigestFinal_ex(md_context, m_digest, NULL); +-#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x02090000fL) + EVP_MD_CTX_cleanup(md_context); + #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + EVP_MD_CTX_reset(md_context); +--- a/sql/mysqld.cc ++++ b/sql/mysqld.cc +@@ -3419,7 +3419,7 @@ int warn_self_signed_ca() + static int init_ssl() + { + #ifdef HAVE_OPENSSL +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + CRYPTO_malloc_init(); + #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + OPENSSL_malloc_init(); +--- a/vio/viosslfactories.c ++++ b/vio/viosslfactories.c +@@ -123,21 +123,19 @@ static DH *get_dh2048(void) + DH *dh; + if ((dh=DH_new())) + { +- BIGNUM *p= BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL); +- BIGNUM *g= BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); +- if (!p || !g +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L +- || !DH_set0_pqg(dh, p, NULL, g) +-#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ +- ) { +- /* DH_free() will free 'p' and 'g' at once. */ ++ BIGNUM *p = BN_bin2bn(dh2048_p,sizeof(dh2048_p), NULL); ++ BIGNUM *g = BN_bin2bn(dh2048_g,sizeof(dh2048_g), NULL); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) ++ dh->p=p; ++ dh->g=g; ++ if (! dh->p || ! dh->g) ++#else ++ if (!DH_set0_pqg(dh, p, NULL, g)) ++#endif ++ { + DH_free(dh); +- return NULL; ++ dh = NULL; + } +-#if OPENSSL_VERSION_NUMBER < 0x10100000L +- dh->p= p; +- dh->g= g; +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + } + return(dh); + }