You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unknown return value from SSL_accept: Success on ARM when using upsc from another ARM Linux box. #1899
One of the boxes is a WD NAS runinng NUT 2.6.4 (I can't really upgrade it, and WD seems pretty conservative in terms of their updates). The other one is an RaspberryPi running ARM Linux and the latest NUT 2.8.0.
When connecting from WD NAS to the Pi with upsc -l <ip-of-pi> I'm getting:
Apr 04 10:07:58 PiWM upsd[4100]: listening on * port 3493
Apr 04 10:07:58 PiWM nut-server[4100]: Connected to UPS [usbhid]: usbhid-ups-usbhid
Apr 04 10:07:58 PiWM upsd[4100]: Connected to UPS [usbhid]: usbhid-ups-usbhid
Apr 04 10:07:58 PiWM nut-server[4100]: Running as foreground process, not saving a PID file
Apr 04 10:07:58 PiWM upsd[4100]: Running as foreground process, not saving a PID file
Apr 04 10:09:15 PiWM nut-server[4100]: Unknown return value from SSL_accept: Success
Apr 04 10:09:15 PiWM upsd[4100]: Unknown return value from SSL_accept: Success
On the WD NAS side I'm getting the following error after a considerable delay:
That's a recent-ish development as the setup used to work up to some unspecified point in the past (I'm not sure when exactly it stopped working, as I only noticed today that the NAS didn't connect anymore).
The other commands such as upscmd do work correctly, so this seems to only affect upsc to the best of my knowledge.
I tried regenerating the cert file according to the docs in case it was an expired cert, but that's not it. Similarly, fiddling with DISABLE_WEAK_SSL didn't yield any results.
Seems like it was the cert after all, but it's odd, since both the new and the old cert used SHA256, which should be supported on the old client no problem:
I wonder if it is a similar issue as with older SSH clients not connecting to newer servers unless you enable obsoleted KEX algorithms on one or both sides... at least, the SSL library versions do provide default lists of algorithms etc. and remove insecure options over time at least from what is offered (implementations may still exist, just have to be enabled somehow).
Potentially, you can try building custom NUT (in an RPi container? on another PC for the sake of test?) against an older openssl release (0.9.x maybe?) to see if the sides would magically begin to talk. If yes, that's the culprit and we'd need to find a way (possibly create and PR one) to enable old security protocols on demand...
Alternatively, if this is in a trusted LAN, you might forgo SSL... not a generally good idea (better discover and fix what is broken), but at least a fallback option...
Thank's for the tips!
I dug way deeper into OpenSSL than I ever wanted to, but I managed to "fix" this. This comment contains the requisite changes for OpenSSL that allow using weaker ciphers in TLS1. For posterity:
--- a/etc/ssl/openssl.cnf+++ b/etc/ssl/openssl.cnf@@ -52,13 +52,6 @@ tsa_policy3 = 1.2.3.4.5.7
[openssl_init]
providers = provider_sect
+ssl_conf = ssl_sect++[ssl_sect]+system_default = system_default_sect++[system_default_sect]+CipherString = DEFAULT@SECLEVEL=0
# List of providers to load
[provider_sect]
Do note that this is a bad idea as these weaker ciphers were disabled for a reason. If you can manage, do update the older client to a more recent version.
Activity
Idorobots commentedon Apr 4, 2023
With debugging enabled it sheds some more light. With
DISABLE_WEAK_SSL:With weak SSL enabled:
Seems like it was the cert after all, but it's odd, since both the new and the old cert used SHA256, which should be supported on the old client no problem:
jimklimov commentedon Apr 4, 2023
I wonder if it is a similar issue as with older SSH clients not connecting to newer servers unless you enable obsoleted KEX algorithms on one or both sides... at least, the SSL library versions do provide default lists of algorithms etc. and remove insecure options over time at least from what is offered (implementations may still exist, just have to be enabled somehow).
Potentially, you can try building custom NUT (in an RPi container? on another PC for the sake of test?) against an older openssl release (0.9.x maybe?) to see if the sides would magically begin to talk. If yes, that's the culprit and we'd need to find a way (possibly create and PR one) to enable old security protocols on demand...
jimklimov commentedon Apr 4, 2023
Alternatively, if this is in a trusted LAN, you might forgo SSL... not a generally good idea (better discover and fix what is broken), but at least a fallback option...
Idorobots commentedon Apr 4, 2023
Thank's for the tips!
I dug way deeper into OpenSSL than I ever wanted to, but I managed to "fix" this.
This comment contains the requisite changes for OpenSSL that allow using weaker ciphers in TLS1. For posterity:
Do note that this is a bad idea as these weaker ciphers were disabled for a reason. If you can manage, do update the older client to a more recent version.
docs/FAQ.txt, docs/nut.dict: document downgrading OpenSSL capabilitie…