SSL problems

You have issues with Luadch?
Post here
Post Reply
Boca_Chica

SSL problems

Post by Boca_Chica »

I can't get SSL to function properly on Luadch.

Maybe the problem is with the Raspberry Pi3.
Does anyone has encounter problems to with Encryption and solved it?
Please let me know, maybe i can learn from it.

Raspberry Pi3
Linux 5.10.27-v7+ armv7l GNU/Linux
OpenSSL 1.1.1g 21 Apr 2020
Luadch v2.22 RC3 [TLS: v1.3]
User avatar
curse
Site Admin
Posts: 15
Joined: Tue Apr 27, 2021 12:04 pm
Location: Gran Canaria, Spain
Contact:

Re: SSL problems

Post by curse »

I'll do some testing on my "TV Box" later, Arm, 2GB RAM, 8GB EMMC... It should be fairly similar to a raspberry Pi
User avatar
curse
Site Admin
Posts: 15
Joined: Tue Apr 27, 2021 12:04 pm
Location: Gran Canaria, Spain
Contact:

Re: SSL problems

Post by curse »

So, quick test done, and it works fine.
I didn't use the binary though, I compiled ity myself.
It runs Armbian, which is based on Debian/Ubuntu, so the commands are for Debian/Ubuntu/Mint and similar distributions

Code: Select all

sudo apt install build-essential lua5.3 libssl-dev git
mkdir Devel
cd Devel
git clone https://github.com/luadch/luadch.git
cd luadch
./compile
cd build_gxx/certs
./make_cert.sh
cd ..
./luadch
and the hub should start. login to <your IP>:5001 with nick dummy and pass test
Oh, you don't need the "mkdir Devel" and "cd Devel", it's just me that keep all my coding stuff in the same folder.

This is how it looks after logging in (and setting my nick)

Code: Select all

Your Nick:	curse
        Your IP:	192.168.0.33
        Your Level:	100  [ HUBOWNER ]

        Client Version:	AirDC++w 2.10.0
        Client Mode:	active

        Regged by:	dummy
        Regged on:	2021-04-30 / 16:37:40

        Last visit:  <UNKNOWN>

        Client SSL:	yes
        TLS Mode:	TLSv1.2
        TLS Cipher:	ECDHE-ECDSA-AES128-GCM-SHA256
        
Boca.Chica
Posts: 6
Joined: Fri Apr 30, 2021 6:18 am
Contact:

Re: SSL problems

Post by Boca.Chica »

I did it and got this in my log:

[2021-05-01 | 09:34:20] scripts.lua: lua error in script 'etc_keyprint.lua': ././scripts/etc_keyprint.lua:20: module 'openssl' not found:
no field package.preload['openssl']
no file './openssl.lua'
no file '/usr/local/share/lua/5.1/openssl.lua'
no file '/usr/local/share/lua/5.1/openssl/init.lua'
no file '/usr/local/lib/lua/5.1/openssl.lua'
no file '/usr/local/lib/lua/5.1/openssl/init.lua'
no file '././core/openssl.lua'
no file '././lib/openssl/openssl.lua'
no file '././lib/luasocket/lua/openssl.lua'
no file '././lib/luasec/lua/openssl.lua'
no file './openssl.so'
no file '/usr/local/lib/lua/5.1/openssl.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '././lib/openssl/openssl.so'
no file '././lib/luasocket/openssl/openssl.so'
no file '././lib/luasec/openssl/openssl.so'
[2021-05-01 | 09:34:21] server.lua: function 'addserver': luasec not found
[2021-05-01 | 09:42:32] scripts.lua: lua error in script 'etc_keyprint.lua': ././scripts/etc_keyprint.lua:20: loop or previous error loading module 'ssl'
[2021-05-01 | 09:42:33] server.lua: function 'addserver': luasec not found

So,.. i looked and i found out i didn't have a 'lua' in my share folder, so the rest is also not there.
That is strange.
I think i must start over.
NeedM adc://86.107.187.54:5000
User avatar
curse
Site Admin
Posts: 15
Joined: Tue Apr 27, 2021 12:04 pm
Location: Gran Canaria, Spain
Contact:

Re: SSL problems

Post by curse »

Did you compile it or use the binary?
For compiling, I mentioned the packages to install
libssl-dev takes care of the "module 'openssl' not found" error
and lua5.3 should take care of the rest...
If not compiled, you might need those packages on your system as well, since the libssl-dev makes your certificate and the whole hubsoft is written in lua and use lua files for all scripts. build-essential is needed for compiling and git for downloading the source from github.
Boca.Chica
Posts: 6
Joined: Fri Apr 30, 2021 6:18 am
Contact:

Re: SSL problems

Post by Boca.Chica »

Yes, i installed the packages you mentioned and did the compiling.
No errors.
I think the problem is with openssl on the raspberry.
So i need somehow re-install openssl.
Making certificate's went fine.
Your instructions were good!
NeedM adc://86.107.187.54:5000
User avatar
curse
Site Admin
Posts: 15
Joined: Tue Apr 27, 2021 12:04 pm
Location: Gran Canaria, Spain
Contact:

Re: SSL problems

Post by curse »

Yes, try to reinstall OpenSSL. Keep me informed about your progress...
BTW... if you want to "edit" the name of your hubsoft... Look at the file /luadch/core/const.lua (before compiling it), just make sure that you keep the names in the copyright(feel free to add your own, after all, you have changed stuff by editing the name of the hubsoft, and perhaps call it RC4, I did that... lol)

Code: Select all

    PROGRAM_NAME = "TFOLuadch",
    VERSION = "v2.22 RC4",
    COPYRIGHT = "blastbeat and pulsar (2007-2020) curse (2021)",
    
hehehe

Do you run Raspbian or? Just wondering so I give you the right commands...

Code: Select all

sudo apt update
sudo apt --reinstall install openssl
Boca.Chica
Posts: 6
Joined: Fri Apr 30, 2021 6:18 am
Contact:

Re: SSL problems

Post by Boca.Chica »

I have an old RPi2.
Installed it with Stretch and did your commands above.
And,.. it works. got TLS1.2 SSL but 1.3 did not work.
When i update SSL, it's does not work anymore, also 1.2 does not work anymore.
So there is the problem.
Thanks for your help!
NeedM adc://86.107.187.54:5000
Post Reply