PhuTa
PhuTa

Reputation: 71

Chrome 58, web extension cannot open secure websocket (wss) to localhost

Recently I update Chrome to 58 and my extension cannot open secure web socket to localhost (wss://localhost)

My web socket server uses self sign certificate (created by openssl) and install root CA to "Trusted Root Certification Authorities" to Chrome browser, it works fine for Chrome 56 or below, but now it don't

I find a page that mentions Chrome will block resource load from localhost https://bugs.chromium.org/p/chromium/issues/detail?id=378566

The question is: How I make my extension work again? In case I cannot go with localhost web socket, what is alternative solution?

Update:

Here is my URL to create WebSocket to localhost server: wss://localhost:30714/resourcePath

I post command lines to create self signed:

  1. openssl.exe dhparam -check -text -5 1024 -out "myHome DH.pem"

  2. openssl genrsa -des3 -out "CA.key" 1024

  3. openssl req -new -x509 -days 7320 -sha512 -key "CA.key" -out "myHome CA.crt"

  4. openssl req -newkey rsa:1024 -keyout "myHome.key" -nodes -sha512 -out "myHome.req"

  5. openssl ca -out "myHome.crt" -days 7320 -infiles "myHome.req"

Result of these commands above including openssl.conf file please found here Thanks.

I installed myHome CA.crt file to local machine "Trusted Root Certification Authorities". I worked on Chrome 56 or sooner, but now with Chrome 58 it did not.

Upvotes: 0

Views: 1312

Answers (2)

STWilson
STWilson

Reputation: 1708

Windows users, this script will create the certificate with required SAN: openssl script for Windows at GitHub

Upvotes: 0

PhuTa
PhuTa

Reputation: 71

I found a link here, it mentioned Chrome blocked access from web to localhost, is it root cause?

Upvotes: 1

Related Questions