Can't connect to TLSv1_2 server
d4rkmen opened this issue · comments
d4rkmen commented
The protocol is set to https
, the secure protocol is TLS
It always sending TLSv1 client hello, and need TLSv1_2
Server response:
TLSv1 Record Layer: Alert (Level: Fatal, Description: Handshake Failure)
Content Type: Alert (21)
Version: TLS 1.0 (0x0301)
Length: 2
Alert Message
Level: Fatal (2)
Description: Handshake Failure (40)
d4rkmen commented
local http = require('https')
local API_TOKEN = "----"
local options = {
host = "api.ukrainealarm.com",
protocol = "https",
port = 443,
path = "/api/v3/regions",
headers = {{"Authorization", API_TOKEN}}
}
local req = http.request(options, function (res, err)
p(">>>>>>>>>>>>>>>>", res, err)
res:on('data', function (chunk)
p("ondata", #chunk)
end)
end)
req:done()
p("sent")
George Zhao commented
please try set to options.ciphers = 'ALL'
d4rkmen commented
Solved somehow using options = http.parseUrl()
and then https.request()
thanks