Firefox disconnects websockets connection for a self signed certificate

前端 未结 2 480
别跟我提以往
别跟我提以往 2020-12-16 06:43

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.

Howev

2条回答
  •  忘掉有多难
    2020-12-16 07:09

    Firefox works with secure websockets (wss://) only when the certificate of the site is trusted.

    With a self-signed certificate I was able to browse the site by adding an exception to the certificate. The exception is not used for websockets and the connection was dropped during the ssl handshake.

    Instead I created my own Root CA cert and then another signed cert for the webserver. In Options > View Certificates > Authorities I imported the Root cert. Now firefox is able to connect over secure websockets without any issue.

    Firefox does not allow for importing of self-signed certs as Authorities. Windows Certificate manager allows importing of self signed certs into the "Trusted Root Certificate Authorities" list.

提交回复
热议问题