How to use certificate authentification for a websocket in the browser.
I did it with python, also i found many tutorials in doing it with nodejs, but is it possible in the browser with javascript too? I didn't find anything about that.
Here's my working python code(part of it to show what i mean)
import json
import websocket
import ssl
print("Start Websocket")
wsapp = websocket.WebSocketApp("wss://localhost:8080",
on_open=on_open,
on_message=on_message,
on_error=on_error,
on_ping=on_ping)
wsapp.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE, "certfile": "private.crt",
"keyfile": "private.key", "ssl_context.check_hostname": False})
wsapp.close()