From nobody Tue May 31 06:18:28 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D3F31B6420E; Tue, 31 May 2022 06:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LC2CT0CRPz4X7B; Tue, 31 May 2022 06:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653977909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qoUJwIwl+Laq+jKDrITxqigkAQDdLvkMB8lD+JSkZFk=; b=Dl+FddvI1ERu2IjR6HEZz/9WusCqv1D8mLGFLsyFm6KizDkWfzlFP+X3bzwEdUXB2zlINI uRK8+HXiJBAGuqvvCtcHrr8ai4C7Sg2VvZSXl8ZMPI8b4EpqfG2KPXNoHjg+xVVatHbfzM m4TNmu4aboUsQp69BbOhsmL942UEZgbOXt8vEZRTSBFVx8tcQNjgPg/q1LHOwTR3yVVJ5Y m0WeFGMYxLowgPwM6C+/ChiO2cMtVw38g61bpbxdvE/wPwbiQ2WBFy7o2xuKUOEgvj6A3s kXC1FGyXKxNULzMv6sdGz2Etn1lFicJWzPk6J2r2+phd0ImjhPSK/KLU+hA5WA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D07F2262EC; Tue, 31 May 2022 06:18:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24V6ISW4033056; Tue, 31 May 2022 06:18:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24V6IS22033055; Tue, 31 May 2022 06:18:28 GMT (envelope-from git) Date: Tue, 31 May 2022 06:18:28 GMT Message-Id: <202205310618.24V6IS22033055@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 399af2d69e83 - main - databases/freetds: Runtime fix with latest openssl List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 399af2d69e8383a7e77ba9dfa0e3bd02bbdc9ab6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653977909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qoUJwIwl+Laq+jKDrITxqigkAQDdLvkMB8lD+JSkZFk=; b=W0IhsJ7MrcoQSwR1rmUl+E3KDaMKtmIlqZavObW3fapLMjQPJ8tdvGJgJO4Q7D2y5yagc0 9F8h6KLr7VyQzIYQrcWe+HMns2H72OdE8mRCJyXwNIJ35EjTBWfFWfQL2D0crRPVMKipnc j5jg5mRXjAAKnkhRuPk1Ibxy8DrC2jm0lY9lo6qu2kqO1cSZVkTC262Nk/tQ+tKLug2aAH +Rmt8laa/9fX9Cc1Nb899gN4uXmz/6FNsIkYqwNbbqHOkcoP2te3a7nn2qkKWgq+fyKz4c 80xFh7aqXN26KQAxEADqFt7/A/hrmsg8xaSv84QJGs/C9Pikv0Wrone9LjfJgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653977909; a=rsa-sha256; cv=none; b=WPf68uF/Nbt1q3LVULnnqwxu7OBr2vfZzbEupLLUX2u4E3D+HObk3M74uYj0DS+nzjWd1A OZPsLgTqZVyQeFZsTUk/C6ssfHarS2j9YHpjbR6e5R133KgxhgbEzGpXdEIhiTtIRrQw7H gkHWabMiM+gxwt4ZSW6UhunSISf3BO4hA1oXTRJPFMRjw4xB4rLCGMOXFZT/5XwlveX16L cnYFWjULsT7gD9HRzRzYgX5Me00KAbNZXqhCmDRhDrM97Un75iA9FOpuMNHmWpY2PBVx6u Var4St9LKAJaE4raA9oWzCXbZFESxUWZxsq4QK4BxnJD8avJdrz/MxkFPCw3cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=399af2d69e8383a7e77ba9dfa0e3bd02bbdc9ab6 commit 399af2d69e8383a7e77ba9dfa0e3bd02bbdc9ab6 Author: Muhammad Moinur Rahman AuthorDate: 2022-05-31 06:14:13 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2022-05-31 06:14:13 +0000 databases/freetds: Runtime fix with latest openssl - FreeTDS fails to connect with MsSQL after the latest updates of OpenSSL specially after the release of 13.1 SNAPSHOTS including 13.1-RELEASE and more specifically when openssl turned into 1.1.1l See the following for more details: https://github.com/FreeTDS/freetds/issues/458 - After the upgrade to version 1.3.9 FreeTDS fails to upgrade when using ports tree. [1] PR: 261967 263641 [1] Reported by: jsc@ntu.edu.tw eugen [1] --- databases/freetds/Makefile | 4 +- databases/freetds/files/patch-src_tds_tls.c | 70 ++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/databases/freetds/Makefile b/databases/freetds/Makefile index a9cce45c5a65..0283890c5679 100644 --- a/databases/freetds/Makefile +++ b/databases/freetds/Makefile @@ -2,6 +2,7 @@ PORTNAME= freetds PORTVERSION= 1.3.10 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= databases MASTER_SITES= https://www.freetds.org/files/stable/ \ @@ -75,7 +76,8 @@ post-patch: ${WRKSRC}/Makefile.am @${REINPLACE_CMD} -e 's|/pool.conf|/pool.conf.sample|g' \ ${WRKSRC}/src/pool/Makefile.am - @${REINPLACE_CMD} -e 's|\($$with_iodbc/include\)|\1/libiodbc|g' \ + @${REINPLACE_CMD} -e 's|\($$with_iodbc/include\)|\1/libiodbc|g ; \ + s| odbcss.h||g' \ ${WRKSRC}/configure.ac post-install: diff --git a/databases/freetds/files/patch-src_tds_tls.c b/databases/freetds/files/patch-src_tds_tls.c index 07a8cb8ec5ac..35612e6faff3 100644 --- a/databases/freetds/files/patch-src_tds_tls.c +++ b/databases/freetds/files/patch-src_tds_tls.c @@ -1,6 +1,6 @@ ---- src/tds/tls.c.orig 2017-11-30 09:00:01 UTC +--- src/tds/tls.c.orig 2021-08-31 09:00:01 UTC +++ src/tds/tls.c -@@ -50,6 +50,10 @@ +@@ -53,6 +53,10 @@ #include #endif @@ -9,9 +9,18 @@ +#endif + #include - #include + #include #include -@@ -72,6 +76,15 @@ +@@ -63,7 +67,7 @@ + + /** + * \addtogroup network +- * @{ ++ * @{ + */ + + #if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL) +@@ -75,6 +79,15 @@ #define SSL_PTR ptr #else @@ -25,5 +34,56 @@ +#endif + /* some compatibility layer */ - #if OPENSSL_VERSION_NUMBER < 0x1010000FL + #if !HAVE_BIO_GET_DATA static inline void +@@ -115,7 +128,7 @@ tds_pull_func_login(SSL_PULL_ARGS) + int have; + + tdsdump_log(TDS_DBG_FUNC, "in tds_pull_func_login\n"); +- ++ + /* here we are initializing (crypted inside TDS packets) */ + + /* if we have some data send it */ +@@ -450,7 +463,7 @@ tds_ssl_init(TDSSOCKET *tds) + const char *tls_msg; + + xcred = NULL; +- session = NULL; ++ session = NULL; + tls_msg = "initializing tls"; + + if (!tls_initialized) { +@@ -826,18 +839,25 @@ check_name_match(ASN1_STRING *name, const char *hostna + static int + check_name_match(ASN1_STRING *name, const char *hostname) + { +- char *name_utf8 = NULL; ++ char *name_utf8 = NULL, *tmp_name; + int ret, name_len; + + name_len = ASN1_STRING_to_UTF8((unsigned char **) &name_utf8, name); + if (name_len < 0) + return 0; + ++ tmp_name = tds_strndup(name_utf8, name_len); ++ OPENSSL_free(name_utf8); ++ if (!tmp_name) ++ return 0; ++ ++ name_utf8 = tmp_name; ++ + tdsdump_log(TDS_DBG_INFO1, "Got name %s\n", name_utf8); + ret = 0; + if (strlen(name_utf8) == name_len && check_wildcard(name_utf8, hostname)) + ret = 1; +- OPENSSL_free(name_utf8); ++ free(name_utf8); + return ret; + } + +@@ -1095,4 +1115,3 @@ tds_ssl_deinit(TDSCONNECTION *conn) + + #endif + /** @} */ +-