array-io-keychain icon indicating copy to clipboard operation
array-io-keychain copied to clipboard

Need to use ssl connection with ws server

Open roman-modelist-dev opened this issue 6 years ago • 3 comments

Need to use ssl connection with ws server.

roman-modelist-dev avatar Dec 05 '18 12:12 roman-modelist-dev

It seems that websocketd support ssl connection. https://github.com/joewalnes/websocketd/issues/17

roman-modelist-dev avatar Dec 05 '18 12:12 roman-modelist-dev

Need to generate ssl certificate with private key. Certificate must be signed by certificate agency. Next need to run websocketd server with following parameters: --ssl --sslcert=cert_file_name --sslkey=cert_priv_key_file --sslca=cert_ca_file_name

roman-modelist-dev avatar Dec 06 '18 05:12 roman-modelist-dev

There is no clear solution for all platforms at this moment. Because of localhost we cannot use standard public CA for sign our ssl certificate. We need to use self signed certificate and import our certificate into system certificate storage. However, on Linux and Windows browser do not use system certificate storage for verifying ssl connection. Browser on Linux and Windows use self storage for storing CA certificates instead.

Summary:

  1. On MacOS we can import our certificate into keychain (macos system storage) during installation.
  2. On Linux and Windows we need
  • either use unsecured websocket connection and Well-known ports (< 1024)
  • or find all supported browsers in the OS and import our certificate into browser storage. Need to figure how to import our certificate to the browser storage and how difficult is it?

roman-modelist-dev avatar Dec 06 '18 08:12 roman-modelist-dev