[webrtc-pc] Allow to import existing certificate (#2179)

ibsusu has just created a new issue for https://github.com/w3c/webrtc-pc:

== Allow to import existing certificate ==
In-browser, RTCPeerConnection provides an option to generate RTCCertificate or can generate it by itself.
https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-generatecertificate

It would be helpful to allow it to import existing certificates, for instance when we want to use the same certificate for communication with signalling server.

Generator with such functionality(FromPEM) is already implemented in Chromium code:
https://github.com/chromium/chromium/blob/0aee4434a4dba42a42abaea9bfbc0cd196a63bc1/content/renderer/media/webrtc/rtc_certificate_generator.h
-------------------------------------------
This was previously discussed here:
https://github.com/w3c/webrtc-pc/issues/1853


I believe that this was the wrong decision and makes browsers second class citizens when considering torrenting or distributed file transfer in the browser.  Allowing users to connect directly to peers that they've connected to in the past without the round trip negotiation dance would be incredibly useful.  Torrenting already comes with mechanisms to make sure that the files transferred are correct (hashing) and mechanisms to ban bad users, irrespective of the cert used to connect.

This should be allowed as it smooths out the reconnect process when we know where we're connecting.  Add it in, please. Pretty please.

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2179 using your GitHub account

Received on Wednesday, 24 April 2019 19:55:42 UTC