Replies: 1 comment
-
local openssl_ctx = require "openssl.ssl.context"
local http_tls = require "http.tls"
-- Set up a TLS context that doesn't do verification
local tls_ctx = http_tls.new_client_context()
tls_ctx:setVerify(openssl_ctx.VERIFY_NONE)
local ws = assert(websocket.new_from_uri(uri, headers))
ws.request.ctx = tls_ctx
assert(ws:connect()) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using Lua 5.1.5 (I know, old) and trying to get past an error:
starttls: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:self signed certificate
I've read through the websocket section and I'm not entirely sure how to bypass this l like I would using wscat (wscat --no-check -c):
`
local uri = "wss://"..<$IP_ADDRESS>.."<$ENDPOINT>=".. <$VARIABLE>
local headers = {["Cookie"] = "TOKEN=" .. sessionCookie }
local ws = assert(websocket.new_from_uri(uri, headers))
assert(ws:connect())
`
Any suggestions/assistance is greatly appreciated. I'm using this module successfully for other projects, however their certs are not self-signed.
Beta Was this translation helpful? Give feedback.
All reactions