lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am using LuaSec 0.7 and Lua 5.3.4 and this works fine for me:

hs = require("ssl.https")
hs.request([[https://www.attheraces.com/racecards]])

On Mon, Mar 25, 2019 at 4:51 AM Geoff Smith <spammealot1@live.co.uk> wrote:
I am trying to download a webpage using Lua 5.1 and Luasec (not sure which version)

I am seeing the same error on several pages, but one example is [[https://www.attheraces.com/racecards]]
I am getting an error stating "sslv3 alert handshake failure"

I am not an expert on the https protocol so not sure what I need to do to fix this problem. I am assuming i need to tell it to use TLS v1.2 or later to make it work. Not proved that this is the problem though. Here is gist of my latest code attempt that still gives me the same error.

ssl.newcontext({mode="client", protocol="tlsv1_2"})

local url = "" href="https://www.attheraces.com/racecards" target="_blank">https://www.attheraces.com/racecards]]

webText, code, headers, status = https.request({url=""  protocol="tlsv1_2"})
print(code, headers, status)

I have tried protocol = "sslv23" and "sslv3"  neither fixed the problem

Any help on this issue would be most appreciated, thanks.







Virus-free. www.avast.com