-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeTDS with Openssl 1.1.1m fails to connect #458
Comments
The warning should be removed surely but it's not the issue. I cannot see why a minor update could lead to this. Instead what I would check is if they removed some cipher with the update. Recently in many cases the OpenSSL requirements for cipher are not satisfied by MS. |
On my system "OpenSSL 1.1.1k-freebsd 24 Aug 2021" and "OpenSSL 1.1.1o-freebsd 3 May 2022" have same ciphers. |
This issue is not FreeBSD related as it exist also with Linux:
So the first version that doesn't work is 1.1.1l. |
Can you try this? diff --git a/src/tds/tls.c b/src/tds/tls.c
index 64c6bba2..bc63e2cf 100644
--- a/src/tds/tls.c
+++ b/src/tds/tls.c
@@ -826,18 +826,25 @@ tds_check_wildcard_test(void)
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;
}
|
Yes it works with 1.1.1l so I guess it will work with newer versions too. Thank you. I will ask @5u623l20 to create a patch for FreeBSD port until you release a new version with this patch. |
Will take care of it tomorrow. |
Thank you both. |
- 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: FreeTDS/freetds#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]
Fixed in 1.3.11 |
Unfortunately, the problem with connection still appears with OpenSSL 1.1.1t-freebsd on FreeBSD 13.2. I temporarily switched to GnuTLS which can properly handle connections. |
I am the maintainer of the freetds port in FreeBSD and reporting a failure of connection on behalf of other users:
This is the case when we are using OpenSSL 1.1.1m. But in case we are using OpenSSL 1.1.1k or GNUTLS it works without any problems.
Here is the buildlog:
https://pdr.bofh.network/data/latest-per-pkg/freetds/1.3.9%2C1/130-default.log
And in case it's difficult to find I can find some warnings although it doesn't look like a showstopper to me:
The text was updated successfully, but these errors were encountered: