Firefox 断开 websockets 连接以获得自签名证书 [英] Firefox disconnects websockets connection for a self signed certificate

查看:16
本文介绍了Firefox 断开 websockets 连接以获得自签名证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试与使用自签名证书的后端服务器建立 websocket 连接.在 Firefox 中,我为自签名证书添加了一个例外.

I am trying to make websocket connection to a backend server that uses a self-signed certificate. In firefox I've added an exception for the self-signed cert.

但是我的 websocket 连接 wss://连接失败.我收到一个代码为 1006 的关闭事件,这是一个捕获所有代码.

However my websocket connection wss:// fails to connect. I get a close event with code 1006 which is a catch all code.

Chrome 和 IE websockets 工作.由于我使用的是 Windows,因此我使用 certmgr.exe 作为受信任的证书安装了证书.

Chrome and IE websockets work. Since I am using windows, I've installed the cert using certmgr.exe as a trusted cert.

我现在的猜测是 firefox websockets 不适用于证书例外,需要信任.

My guess right now is that firefox websockets do not work with certificate exceptions and need to be trusted.

这种情况对其他人有用吗?

Has this scenario worked for anyone else?

推荐答案

以防万一它可以帮助任何人,在撰写本文 (v61.0.1) 时,OP 的回答中提到的内容并不正确.

Just in case it could help anyone, what is mentioned in OP's answer is not true at this time of writing (v61.0.1).

我使用 https 导航到我的 WS 服务器的地址,因为任何 WS 服务器实际上都是一个 HTTP 服务器,然后出现通常的无效证书屏幕并允许我添加一个例外.之后,任何 wss 连接到相同的主机和端口都成功了.

I navigated to the address of my WS server using https, as any WS server is practically an HTTP server, then the usual invalid certificate screen appeared and allowed me to add an exception. After that any wss connection made to the same host and port is successful.

这篇关于Firefox 断开 websockets 连接以获得自签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆