daurnimator / lua-http

HTTP Library for Lua. Supports HTTP(S) 1.0, 1.1 and 2.0; client and server.
https://daurnimator.github.io/lua-http/
MIT License
778 stars 80 forks source link

Error in tls.lua #209

Closed NeoN7777 closed 1 year ago

NeoN7777 commented 1 year ago

Hello! I'm trying to use lua-http on a pretty old device. When I run my lua script I get this error: luajit: /usr/local/share/lua/5.1/http/tls.lua:750: attempt to perform arithmetic on field 'OP_NO_COMPRESSION' (a nil value)

As far as I understand, the problem is due to my version of openSSL - it is OpenSSL 0.9.8o 01 Jun 2010. It doesn't have SSL_OP_NO_COMPRESSION define, which is used here: https://github.com/wahern/luaossl/blob/8e9622c22f76d550594212c8bf5057f39d76f383/src/openssl.c#L10433

I'm using cross-compiled luaossl (20170903) Is there any way to fix it?

daurnimator commented 1 year ago

That OpenSSL is too old to work on the modern internet. You'll need to upgrade your openssl version.