Questions tagged [luasec]

LuaSec is a binding for OpenSSL library to provide TLS/SSL communication.

LuaSec depends on OpenSSL, and integrates with LuaSocket to make it easy to add secure connections to any Lua applications or scripts.

Useful links

16 questions
6
votes
2 answers

Get HTTPS page content with Lua

I'm trying to access the contents of a webpage from my lua code. The following code works for non-HTTPS pages local http=require("socket.http") body,c,l,h = http.request("http://www.example.com:443") print("status line",l) print("body",body) But…
John Boga
  • 484
  • 6
  • 14
5
votes
2 answers

Lua for windows https error: "%1 is not a valid Win32 application"

I've got a question about Lua and https. I'm developing some software for a router which supports Lua. The bad thing is that this router doesn't support debugging. So I was looking for an IDE for Lua. I'm using the Lua Development Tools and…
ChristianR
  • 133
  • 2
  • 7
2
votes
0 answers

Error while installing lua-requests using luarocks

Hello good people of stackoverflow, I'm having trouble installing the lua-requests module using luarocks install lua-requests in the command line. A few of the dependencies of said module will be installed without a problem but luasec is causing a…
Fabio
  • 23
  • 6
2
votes
1 answer

luasec fails in 5.1 and 5.2 but OK in 5.3

I'm installing LuaSec 0.9 via LuaRocks 3.3.1 with OpenSSL 1.1.1g (via MacPorts). I use luarocks install OPENSSL_DIR=/opt/local luasec The compilation/installation is successful for Lua 5.1, 5.2, and 5.3 However, when I attempt to use it, I get…
LiamF
  • 523
  • 3
  • 13
1
vote
4 answers

Could not find header file for OPENSSL

I am trying to install Luasec on Ubuntu terminal, but it just keeps displaying this error to me: Error: Could not find header file for OPENSSL No file openssl/ssl.h in /usr/local/include No file openssl.h/ssl.h/ in /usr/include No file…
Joohane
  • 49
  • 1
  • 5
1
vote
1 answer

lua 5.3.5 + luasocket 3.0-rc1 + luasec 0.8 : WIN32 DLL with multiple luaopen_xxx_xxx exported function names

I am using Embarcadero C++Builder 10.1 32 bit on a Windows 7 64 bit computer. I am compiling everything with the CB10.1 32 bit free version of the Embarcadero IDE. I have compiled lua 5.3.5 to a dll. Then I compiled lua.c into a DOS executable…
1
vote
1 answer

Luasec Luasocket https.request with user agent and return body

I want to make a https.request with a custom user-agent using LuaSec. I've tried the method described here: https://github.com/brunoos/luasec/wiki/LuaSec-0.4#httpsrequesturl---body But I don't know how to pass http headers to this function with…
Oxy Synth
  • 154
  • 2
  • 11
0
votes
1 answer

error loading module 'ssl.core'; luaL_setfuncs: symbol not found

I want to use luasec package to construct a SSL call. I am doing this under Alpine 3.9. I have Lua 5.1, openssl-1.1.1k-r0 and openssl-dev-1.1.1k-r0. I install luasec by using "luarocks install luasec". The installation passed without error. But when…
0
votes
1 answer

lua - How to send POST data properly using luasec?

I'm trying to POST some json datas in lua with luasec, but while following examples, it looks like no data is sent. It occurs even with GET requests. Maybe I'm not using ltn12 correctly ? Here is the code I tried : local ltn12 =…
pguimier
  • 1
  • 1
0
votes
0 answers

Lua - Handle a 301 Moved Permanently error and then save generated image from resulting URL

I’m trying to make a http.request to have a graph created, and then save the resulting .png graph image that is created. The problem is I want to do this with Lua, yet I’m struggling on two parts. (If you take url, you’ll see that this should work…
nodecentral
  • 446
  • 3
  • 16
0
votes
1 answer

smtp.lua:80: attempt to call field 'b64' (a nil value) when trying to send an email using lua socket

So I tried sending an email using the luasocket smtp function with ssl but for some reason I get this error /usr/local/share/lua/5.1/socket/smtp.lua:80: attempt to call field 'b64' (a nil value) I have all the libraries downloaded and I don't know…
ElpersonPL
  • 17
  • 1
  • 4
0
votes
0 answers

How to set a timeout for Luasoap using https

Im developing an sdk to connect to a soap server. (Under https) Im using LuaSoap to do it and its working as espected with the xml request but now i need to be able to configure the timeout (im in online payments industry and its really important)…
0
votes
1 answer

Why would a web server reply with 301 and the exact location that was requested?

I'm trying to retrieve pages from a web server via https, using lua with luasec. For most pages my script works as intended, but if the ressource contains special characters (like ,'é), I'm being sent into a loop with 301 responses. let this code…
0
votes
1 answer

Lua - HTTPS / tlsv1 alert internal error

I am trying to interact with the Cleverbot API with Lua. I've got a key and a username, so I tested with Postman and it worked perfectly. Then I tried to do the same thing with Lua but I'm having a weird error. This is the code: local https =…
bokirov
  • 13
  • 1
  • 4
0
votes
1 answer

Luasec - send email via gmail using SMTP

I have tried using luasec to connect to my gmail account and send email via SMTP, and though after a while I was able to allow insecure apps to connect, I'd like to find out how to implement a secure connection via gmail. I've used the following…
Nepaluz
  • 669
  • 1
  • 12
  • 27
1
2