Domoticz: update Domoticz to make use of libssl1.1

Created on 21 Apr 2019  路  18Comments  路  Source: domoticz/domoticz

Hi,

Since linux is evolving, some distros like ubuntu 19 rely on libssl1.1.
would it be possible to allow domoticz to use libssl1.1 ?

Regards

Most helpful comment

Hi,

I worked this around using

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.15_amd64.deb

then dpkg it. but still, it would be nice to have domoticz using the latest libraries from a security pint of vue.
Greetings

All 18 comments

After Ubuntu Update , I install the libssl1.0 manually, but it not help.. After the Domoticz started but I can not login, sometimes loading the login webgui, sometimes not.... So in Ubuntu 19.04 is very unstable...

looks like lybcrypto needs attention too as per systemd log

Apr 21 09:03:14 domoticz domoticz.sh[1640]: /opt/domoticz/domoticz: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: version `OPENSSL_1.0.0' not found (required by /opt/domoticz/domoticz)
Apr 21 09:03:14 domoticz domoticz.sh[1640]: /opt/domoticz/domoticz: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.1' not found (required by /opt/domoticz/domoticz)
Apr 21 09:03:14 domoticz domoticz.sh[1640]: /opt/domoticz/domoticz: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.0' not found (required by /opt/domoticz/domoticz)

ubuntu 19.04 default to libssl1.1 instead of libssl1.0

domoticz: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

after manually copying ubuntu 18.10 (cosmic) libs (libcrypto.so.1.0.0 and libssl.so.1.0.0) from libssl1.0 to /usr/lib/x86_64-linux-gnu fixes it

@DarkosGahan , i think you mean that some distros ship with libssl1... But you can always install libss0
You need to modify the CMakeList.txt file to make it use libssl1 i guess, please feel free to do so,
but make sure that when you run domoticz, that http calls work.
(Test with a hardware protocol that uses HTTP, for example DarkSky)
This was the current problem, it linked find, but there was an error using HTTP, so we kept using version 1.0
There should be another issue here explaining how to use the old version

Well, I don't seems there is an specific issue with lib ssl 1.1.
On my FreeBSD port I use libssl 1.1.1 :

ldd /usr/local/domoticz/domoticz
/usr/local/domoticz/domoticz:
        libssl.so.111 => /usr/lib/libssl.so.111 (0x800ad5000)
        libcrypto.so.111 => /lib/libcrypto.so.111 (0x800b6a000)
        libusb.so.3 => /usr/lib/libusb.so.3 (0x800e57000)
        libopenzwave.so.1.4 => /usr/local/lib/libopenzwave.so.1.4 (0x800e6f000)
        librt.so.1 => /usr/lib/librt.so.1 (0x800f8b000)
        libboost_thread.so.1.70.0 => /usr/local/lib/libboost_thread.so.1.70.0 (0x800f93000)
        libboost_system.so.1.70.0 => /usr/local/lib/libboost_system.so.1.70.0 (0x800fae000)
        libboost_chrono.so.1.70.0 => /usr/local/lib/libboost_chrono.so.1.70.0 (0x800fb2000)
        libboost_date_time.so.1.70.0 => /usr/local/lib/libboost_date_time.so.1.70.0 (0x800fbc000)
        libboost_atomic.so.1.70.0 => /usr/local/lib/libboost_atomic.so.1.70.0 (0x800fc9000)
        libz.so.6 => /lib/libz.so.6 (0x800fce000)
        libminizip.so.1 => /usr/local/lib/libminizip.so.1 (0x800fe8000)
        libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x800ff7000)
        libthr.so.3 => /lib/libthr.so.3 (0x801077000)
        liblua-5.2.so => /usr/local/lib/liblua-5.2.so (0x8010a2000)
        libm.so.5 => /lib/libm.so.5 (0x8010d9000)
        libmosquittopp.so.1 => /usr/local/lib/libmosquittopp.so.1 (0x80110b000)
        libsqlite3.so.0 => /usr/local/lib/libsqlite3.so.0 (0x801112000)
        libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x801269000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x80126e000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80133d000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80135e000)
        libc.so.7 => /lib/libc.so.7 (0x801376000)
        libnghttp2.so.14 => /usr/local/lib/libnghttp2.so.14 (0x801769000)
        libmosquitto.so.1 => /usr/local/lib/libmosquitto.so.1 (0x801794000)
        libcares.so.2 => /usr/local/lib/libcares.so.2 (0x8017a8000)
        libelf.so.2 => /lib/libelf.so.2 (0x8017c3000)

And there is no problems at all... (I use darksky / netatmo / evohome ...).

Regards,

@xbeaudouin , you compiled domoticz yourself ? anything that needed to be changed ?

Well I compiled it myself.
My FreeBSD port is at https://framagit.org/kiwi/freebsd-ports/tree/master/www/domoticz-devel
I really hope I can add the "devel" version RSN on the port tree, but nothing has been changed on the main code of domoticz. Everything is working like a charm.

I think the issue with libssl 1.0 vs 1.1 was the breakage on some linux distribution that links libssl 1.0 on curl / libcurl vs domoticz with libssl 1.1.

That was the issue. Unfortunatly when passing to use libssl 1.0, you will have complains about people that are still on old distributions.

You have 2 methods :

  • tell them to upgrade
  • build 2 versions...

I think the 1 way should be better.

Regards,
Xavier

What do you mean by 'devel" versoin and RSN ? have you looked at the makebeta/release scripts ? These use the version numbers

Well the official domoticz is already on the FreeBSD ports. Eg the released version current done.
The -devel one is one that use directly github tag to make the ports.
RSN : Really soon now. In fact I am waiting for OpenZWave port to be officialy added to the port tree.

Hi,

I worked this around using

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.15_amd64.deb

then dpkg it. but still, it would be nice to have domoticz using the latest libraries from a security pint of vue.
Greetings

@DarkosGahan , as you can see on the OpenSSL website, both versions are up2date

https://www.openssl.org/

There was a serious security issue in OpenSSL 1.0.2.

Also, version 1.0.2 been deprecated in NixOS, and I'm currently having issues building with the currently provided OpenSSL 1.1.1d.

-- Compiling Revision #1
-- ###########################
-- Use builtin lua library
-- Using builtin Mosquitto library
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found version "1.1.1d")
-- Failed to find the openssl library, no TLS support

Note the (found version "1.1.1d").

@nuxeh , which 1.0.2 ? there are many versions, still being maintained ? did you read the above post ?
Should be fixed in OpenSSL 1.1.1g
We should wait till 3.0 is finalized

libssl-dev/stable 1.1.1d-0+deb10u3 armhf
libssl1.1/stable 1.1.1d-0+deb10u3 armhf
openssl/stable 1.1.1d-0+deb10u3 armhf

Try using the instructions here:
https://www.domoticz.com/wiki/Build_Domoticz_from_source

Hi @gizmocuz , thanks.

The post you refer to is the OpenSSL homepage? I don't see 1.0.2 mentioned.

I have been following the build instructions you linked (they mostly don't apply in this case to NixOS, but...) I know that OpenSSL (1.1.1d) is properly installed, I just think there might be a bug in CMake (3.16) which stops it properly finding them, i'm not sure, it's got me a bit stumped for the moment.

So is there something I've missed here that means domoticz currently won't build with 1.1.1? I've now tried 1.1.1d, 1.1.1f and cmake 3.17, without success.

Ok, so I fixed it, Domoticz appears to build fine with OpenSSL 1.1.1. the problem was that CMakeLists.txt sets OPENSSL_USE_STATIC_LIBS by default, and if there are no static libs available it will fail, unless you set -DUSE_OPENSSL_STATIC=false.

@nuxeh , that is correct, that is why there is a option to disable this
Glad it is solved for you

Was this page helpful?
0 / 5 - 0 ratings