LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-26-2018, 12:01 PM   #1
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Anyone using -current and have trouble with weechat connecting to SSL servers?


Since the past week, this happened out of the blue (i don't believe i upgraded any packages prior to this happening).

I can only connect to EFNet with SSL. All other networks, be that FreeNode, Mozilla, oftc, Rizon, SnooNet, SwiftIRC and others... SSL fails with this message;

Code:
irc: TLS handshake failed
irc: error: The operation was cancelled due to user error
I have been told it's related to something involving openssl packages, however these haven't been upgraded since at least May, so i doubt that can be the problem.

I posted elsewhere about this too;
https://www.linuxquestions.org/quest....php?p=5884125

Does anyone know how i can get back to using SSL connections with weechat? The strange thing is that EFNEt works fine, despite no other network wanting to connect. I have no idea how to solve this.
 
Old 07-26-2018, 12:31 PM   #2
bosth
Member
 
Registered: Apr 2011
Location: British Columbia, Canada
Posts: 304

Rep: Reputation: 127Reputation: 127
Works for me still (including disconnect/reconnect). What's in your irc.conf?
 
Old 07-26-2018, 01:23 PM   #3
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by bosth View Post
Works for me still (including disconnect/reconnect). What's in your irc.conf?
Too many passwords/servers/channels i'd rather not post here, lol.
However, my irc.conf hasn't changed from my most recent backup i have on another disk, where it has previously been working fine for the past 2 years or so.

Like i say in that other thread, i'm baffled at the cause for this. Because the fact that EFNet connects fine over SSL, yet no other network does. I have tried with irssi, and hexchat... these all work fine as normal. I don't know where else to look.

Last edited by coralfang; 07-26-2018 at 01:24 PM.
 
Old 07-26-2018, 01:48 PM   #4
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
Try as root maybe? Just a guess.
Code:
update-ca-certificates -f
 
1 members found this post helpful.
Old 07-26-2018, 01:53 PM   #5
jakedp
Member
 
Registered: Oct 2016
Location: Canada
Distribution: Slackware64, Mageia
Posts: 226

Rep: Reputation: 184Reputation: 184
With HexChat and FreeNode I had to switch too SASL authentication.
 
Old 07-26-2018, 02:59 PM   #6
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by jakedp View Post
With HexChat and FreeNode I had to switch too SASL authentication.
I've been using SASL with certificate auth for at least a year on Freenode, but cannot connect with this since this problem started happening.

Also;

Quote:
Originally Posted by mralk3 View Post
Try as root maybe? Just a guess.
Code:
update-ca-certificates -f
This doesn't fix the situation. Another thing is that for several irc servers i visit, they have invalid/unsigned certs, so i have to connect with ssl verification disabled, but even those servers throw up the same error messages and i can never connect.

I'm not sure what to do, as i have tried with a clean irc.conf, reconfiguring a new server to use SSL etc, but the same problem occurs, i can only literally connect to EFNet, i guess i will just have to use a different IRC client for now, as i have no idea what is causing this, but like i say, irssi, hexchat (and even kvirc) these work fine connecting to SSL servers... so i have no idea what has happened to weechat, despite rebuilding it and even upgrading it.

Last edited by coralfang; 07-26-2018 at 03:02 PM.
 
1 members found this post helpful.
Old 07-26-2018, 03:05 PM   #7
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
For what it's worth, i've also tried reinstalling openssl packages;

Code:
$ sudo slackpkg reinstall openssl-1.1.0h-x86_64-2 openssl-solibs-1.1.0h-x86_64-2  openssl10-1.0.2o-x86_64-1  openssl10-solibs-1.0.2o-x86_64-1
But to no avail, and the problem persists.
 
Old 08-02-2018, 07:01 PM   #8
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Apparently, weechat doesn't use openssl, it uses gnutls. Now after learning of this, i grepped the changelog and spotted this:

Code:
+--------------------------+
Tue Jul 17 21:16:10 UTC 2018
Happy 25th anniversary to the Slackware 1.00 release! When the original
announcement went out on Usenet, I believe it had a UTC timestamp which has
led to some confusion over whether the anniversary falls on the 16th (which
was the date when I made the post) or on the 17th (which is when most people
first saw it)... but really, what's the difference? We can celebrate on both
days as far as I'm concerned. Thanks for sticking with the project all these
years. Glad I was able to help. :)
Here's a link to the 1.00 announcement:
  http://www.slackware.com/announce/1.0.php
And here's a nice article that was posted on opensource.com:
  https://opensource.com/article/18/7/stackware-turns-25
a/kernel-firmware-20180717_8d69bab-noarch-1.txz:  Upgraded.
l/pulseaudio-12.2-x86_64-1.txz:  Upgraded.
n/gnutls-3.6.3-x86_64-1.txz:  Upgraded.
n/mutt-1.10.1-x86_64-1.txz:  Upgraded.
  This update fixes bugs and security issues. Upstream strongly recommends
  that all IMAP and POP users upgrade as soon as possible.
  (* Security fix *)
+--------------------------+
The same date is around the time i started experiencing issues with weechat.
I asked in #weechat on freenode, and it seems i'm not the only one...

Someone grepped their logs for someone else asking about the same issue on slackware -current and posted this:
Quote:
2018-07-31 04:21:02 rimmah Hey, I'm on Slackware current, weechat 2.2, and I'm having issues connecting to any server. On connection this is the result: 'irc: TLS handshake failed', 'irc: error: The operation was cancelled due to user error'. Started a few days ago when I finally rebooted for a new kernel, but SSL/TLS packages have remained constant.
So now i feel this either being a problem with the gnutls package that was upgraded, or whether it's a bug in weechat itself. Despite having rebuilt weechat package multiple times since, the problem still persists.
 
Old 08-02-2018, 08:02 PM   #9
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Just to make sure, is your system time correct? Almost every time I run into this problem its because the system time is wrong.
 
Old 08-03-2018, 10:35 AM   #10
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by orbea View Post
Just to make sure, is your system time correct? Almost every time I run into this problem its because the system time is wrong.
Yes 100% it is synchronized with ntp, if i manually force ntpdate to sync, then i get drift of -0.00000000000005 or similar. So it's definitely not that, plus i've heard reports of at least 3 people on -current experiencing this issue now.

It's one or the other, something to do with gnutls, or weechat. However, the previous version of weechat suffered from this issue after gnutls was updated it seems.
 
Old 08-04-2018, 06:08 PM   #11
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Sorry to keep bumping this, but it's still broken. I've also just installed -current to a fresh virtual machine, built weechat from ponce's slackbuilds branch, and the same problems occur (EFNet SSL works fine... but literally no other network will connect?). I had also tried a fresh ~/.weechat/irc.conf config, and same problem exists on my desktop.

I still can't understand why EFNet connects fine, but everything else is broken, that's really odd. However, i'm pretty sure it's something involving the gnutls package.
 
Old 08-15-2018, 01:08 AM   #12
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Rep: Reputation: 167Reputation: 167
EDIT:The problem I mention below is now fixed

Quote:
Originally Posted by coralfang View Post
I have been told it's related to something involving openssl packages, however these haven't been upgraded since at least May, so i doubt that can be the problem.
They were updated yesterday, and so I made sure I'm all up to date. That didn't fix the problem for me until I ran
Code:
update-ca-certificates -f
. Now I can connect to FreeNode using HexChat.

ENDEDIT

I'm having this problem with HexChat as well

Code:
* Looking up chat.freenode.net
* Connecting to chat.freenode.net (162.213.39.42:6697)
* * Subject: /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
* * Issuer: /O=Digital Signature Trust Co./CN=DST Root CA X3
* * Subject: /CN=weber.freenode.net
* * Issuer: /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
* * Certification info:
*   Subject:
*     CN=weber.freenode.net
*   Issuer:
*     C=US
*     O=Let's Encrypt
*     CN=Let's Encrypt Authority X3
*   Public key algorithm: rsaEncryption (4096 bits)
*   Sign algorithm sha256WithRSAEncryption
*   Valid since Jun 18 05:01:12 2018 GM to Sep 16 05:01:12 2018 GM
* * Cipher info:
*   Version: TLSv1.2, cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)
* Connection failed (unable to get local issuer certificate.? (20))

Last edited by Andy Alt; 08-15-2018 at 01:19 AM.
 
Old 08-15-2018, 01:42 AM   #13
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by Andy Alt View Post
EDIT:The problem I mention below is now fixed



They were updated yesterday, and so I made sure I'm all up to date. That didn't fix the problem for me until I ran
Code:
update-ca-certificates -f
. Now I can connect to FreeNode using HexChat.

ENDEDIT

I'm having this problem with HexChat as well
That's something completely different, hexchat uses OpenSSL (which i have had no problems with). weechat relies on gnutls for SSL connections, i opened a bug report here for weechat: https://github.com/weechat/weechat/issues/1231
 
1 members found this post helpful.
Old 08-15-2018, 06:29 PM   #14
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648
Blog Entries: 2

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
actually I have started to experience this issue on current as well with one network... utonet. For me it only effects one network.
 
Old 08-23-2018, 10:10 AM   #15
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
I ran into this issue too, after some time completely failing to build the gnutls upstream master I looked at what other distros were doing and found this patch backporting upstream fixes from Fedora.

Code:
diff --git a/lib/cert-cred.c b/lib/cert-cred.c
index d3777e51f..2150e903f 100644
--- a/lib/cert-cred.c
+++ b/lib/cert-cred.c
@@ -387,6 +387,13 @@ static int call_legacy_cert_cb1(gnutls_session_t session,
 	if (ret < 0)
 		return gnutls_assert_val(ret);
 
+	if (st2.ncerts == 0) {
+		*pcert_length = 0;
+		*ocsp_length = 0;
+		*privkey = NULL;
+		return 0;
+	}
+
 	if (st2.cert_type != GNUTLS_CRT_X509) {
 		gnutls_assert();
 		ret = GNUTLS_E_INVALID_REQUEST;
@@ -503,7 +510,10 @@ void gnutls_certificate_set_retrieve_function
      gnutls_certificate_retrieve_function * func)
 {
 	cred->legacy_cert_cb1 = func;
-	cred->get_cert_callback3 = call_legacy_cert_cb1;
+	if (!func)
+		cred->get_cert_callback3 = NULL;
+	else
+		cred->get_cert_callback3 = call_legacy_cert_cb1;
 }
 
 static int call_legacy_cert_cb2(gnutls_session_t session,
@@ -578,7 +588,10 @@ void gnutls_certificate_set_retrieve_function2
      gnutls_certificate_retrieve_function2 * func) 
 {
 	cred->legacy_cert_cb2 = func;
-	cred->get_cert_callback3 = call_legacy_cert_cb2;
+	if (!func)
+		cred->get_cert_callback3 = NULL;
+	else
+		cred->get_cert_callback3 = call_legacy_cert_cb2;
 }
 
 /**
diff --git a/lib/hello_ext.c b/lib/hello_ext.c
index a3027130a..f72afe77f 100644
--- a/lib/hello_ext.c
+++ b/lib/hello_ext.c
@@ -208,7 +208,7 @@ int hello_ext_parse(void *_ctx, unsigned tls_id, const uint8_t *data, unsigned d
 
 	if (tls_id == PRE_SHARED_KEY_TLS_ID) {
 		ctx->seen_pre_shared_key = 1;
-	} else if (ctx->seen_pre_shared_key) {
+	} else if (ctx->seen_pre_shared_key && session->security_parameters.entity == GNUTLS_SERVER) {
 		/* the pre-shared key extension must always be the last one,
 		 * draft-ietf-tls-tls13-28: 4.2.11 */
 		return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
https://src.fedoraproject.org/cgit/r...am-fixes.patch

After applying it to Pat's gnutls-3.6.3 SlackBuild I found I could connect to freenode with ssl again. I have not tried other networks however.
 
2 members found this post helpful.
  


Reply

Tags
-current, irc, ssl, tls, weechat



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Weechat 0.3.5 doesn't accept self-signed SSL-certificates thosch97 Linux - Software 1 10-18-2011 09:16 AM
Steam on Wine, cannot login,"Steam is having trouble connecting to the Steam servers" cantab Linux - Games 1 06-19-2010 06:32 AM
SSL Servers vs Apache SSL mlewis Linux - Networking 2 04-02-2008 10:13 AM
Apache, SSL, and Virtual servers riluve Linux - Software 6 05-14-2007 01:13 PM
SSL and name-based virtual servers psychobyte Linux - Networking 1 01-04-2006 05:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration