Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
how can i use certificate and private key with websocket in browser?

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()
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!