Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

213
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda