Page 4 of 4

Re: Client/Server TCP TLS communication problem

Posted: Thu Apr 17, 2025 10:08 am
by PBJim
tatanas wrote: Wed Apr 16, 2025 2:36 pm I think I found where the problem is coming from. It seems that the mixing of TLS and non-TLS clients connecting to the TLS server is the cause.
I'd intended to reply yesterday but didn't have chance. I did not think it was possible to open a non-encrypted client connection to a server expecting TLS, which you say you're doing...
And for now, I don't have separate loops to handle TLS and non TLS clients. I will change the port on TLS clients so only them could connect to the TLS server.
[...]
It seems that the mixing of TLS and non-TLS clients connecting to the TLS server is the cause.
Having now just tried it, I can confirm that it doesn't work. This is from the example TLS server and client https://www.purebasic.com/documentation ... rktls.html but removing the TLS switch at the client-side. It returns garbage at the client side, as I'd expected.

Image

Re: Client/Server TCP TLS communication problem

Posted: Thu Apr 17, 2025 10:11 am
by infratec
I wrote a ldap server and since 2 month I implemeted also TLS (before I used stunnel)

I create to servers, since the ports are different and you definately need to use NetworkServerEvent(Server) to specify the server
for the events.

It is not normal to do TLS and not crypted on the same port.

It is running without problems.

Re: Client/Server TCP TLS communication problem

Posted: Thu Apr 17, 2025 1:29 pm
by tatanas
I confirm, at the moment my server is handling 280 simultaneous TLS connections without problem.