TCP over SSL - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: TCP over SSL (/showthread.php?tid=446) |
TCP over SSL - oyvindi - 31.10.2016 Hi, anybody had any success creating an SSL server listener in LUA ? There seems to be an issue with the server socket not being able to receive() from the client. Sending from server to client however, works just fine. Note that I tried using it in a copas handler first, and then as a simple standalone luasec handler (running on my machine, not in LM) Simple test code looks like this: Code: local socket = require("socket") RE: TCP over SSL - admin - 01.11.2016 SSL server is not yet supported, we'll try to prepare an update this week though RE: TCP over SSL - oyvindi - 01.11.2016 (01.11.2016, 09:30)admin Wrote: SSL server is not yet supported, we'll try to prepare an update this week though Ok ! I assume it will be via luasec ? I got my code working though, turned out to be a hickup on the client side. RE: TCP over SSL - rocfusion - 16.10.2017 Hi Admin, Is there any update on running an ssl server on the lm? Can this be done without a cert? Thanks, Roger RE: TCP over SSL - admin - 16.10.2017 It's possible, but you cannot run it without a certificate. You can reuse web-server's self-signed certificate though. Here's a short example: Code: if not tcpserver then RE: TCP over SSL - rocfusion - 18.10.2017 Thanks Admin, that works.. RE: TCP over SSL - rocfusion - 19.10.2017 Hi Admin, A couple of questions, Will this server support multiple clients? I added a basic authentication, that just sets a global variable on connecting and closes the connection if the password is incorrect. The data received is passed another function parseC. Now I need to be able to respond back to the connected client where I declared a global function in this handler. Is this the right way to do this? Code: -- handle data frame Thanks, Roger RE: TCP over SSL - admin - 19.10.2017 Yes, it supports multiple clients. See this example on how to pass data to all connected clients: http://openrb.com/example-lm2-as-tcp-server-for-external-requests/ You can pass any number of arguments via pcall, you can pass both data and socket if you want to send a reply to a specific client. |