pion / example-webrtc-applications

Examples of WebRTC applications that are large, or use 3rd party libraries
https://pion.ly/
MIT License
1.05k stars 248 forks source link

Better way to handle Security using PEM & Key #2

Closed ghost closed 3 years ago

ghost commented 5 years ago

https://github.com/pions/webrtc/blob/master/examples/sfu-ws/web.go#L16 This generating the PEM and Key.

However the example uses the browser and so we need a way to inject the the PEM into your browser. https://support.securly.com/hc/en-us/articles/206081828-How-to-manually-install-the-Securly-SSL-certificate-in-Chrome

Also it generates the new PEM on every run, and so you have to reinject it into the browser.

How about this ?

We need a common way for all he examples.

  1. Have a cmd to gen the PEM and Key
  2. Have a cert to inject it into the key store
  3. Then the examples can use that PEM and KEY.

this might help: https://github.com/FiloSottile/mkcert

Sean-Der commented 3 years ago

I removed certificates from sfu-ws

Users should fork+modify if they need this.