paullouisageneau / libdatachannel

C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
https://libdatachannel.org/
Mozilla Public License 2.0
1.81k stars 366 forks source link

Generate X.509 certificates? #972

Open achingbrain opened 1 year ago

achingbrain commented 1 year ago

There's a very exciting branch over at node-datachannel which will allow use of libdatachannel as a polyfill for WebRTC on node.js.

One of the features missing is being able to generate X.509 certificates. Currently this can be done in js with node-forge but it's an enormous dependency, or you shell out to openssl which requires it to be installed on the users' machine.

Is this something that can be exposed by libdatachannel?

paullouisageneau commented 1 year ago

This can be exposed by libdatachannel, the corresponding class is rtc::impl::Certificate. I guess the other missing part would be the corresponding config field in rtc::PeerConnection to be able to set a particular certificate.

xicilion commented 6 months ago

It is not necessary to implement creation, but passing in pem when creating a PeerConnection may be more necessary.

xicilion commented 6 months ago

I made some modifications to support setting up cert and key, and it's working fine so far.