Triggering new DTLS

584 views
Skip to first unread message

kiranr...@gmail.com

unread,
Apr 5, 2024, 9:56:59 AM4/5/24
to discuss-webrtc
Hi All

I tried going through the WebRTC documentation to get any information on how to trigger new DTLS connection. I tried doing ICE restart but the fingerprint is same all the time. 

Is there any API to let the WebRTC stack know that it has to trigger new DTLS  ?? 

Sean DuBois

unread,
Apr 5, 2024, 11:46:49 AM4/5/24
to 'Neil Young' via discuss-webrtc
I don’t believe you can initiate one via Javascript. If Chrome gets a RemoteOffer where the fingerprint has changed it will do the restart. 

It also isn’t supported across all browsers [0]. I have seen some interest in DTLS Restarts from developers.
The lack of maturity makes them not ship it though.

--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/43315c19-d548-480f-adea-950bed135f47n%40googlegroups.com.

Roman Shpount

unread,
Apr 5, 2024, 11:51:59 AM4/5/24
to discuss-webrtc
You can create a new PeerConnection. Some browsers will start a new DTLS connection if they get a different fingerprint from a remote side, but this does not work everywhere. Since initiating a new DTLS connection requires an ICE restart, there is little benefit from starting a new DTLS connection compared to starting an entirely new PeerConnection. An added benefit of starting a new PeerConnection is that it will work with all browsers.
_____________
Roman Shpount

kiranr...@gmail.com

unread,
Apr 8, 2024, 4:38:37 AM4/8/24
to discuss-webrtc
Thanks for the replies.
I thought I missed some config parameters. Now I understood that it’s not that simple as it seems.
I guess creating a new peer connection ends the existing session. I can’t do that at this moment.

Harald Alvestrand

unread,
Apr 8, 2024, 4:49:33 AM4/8/24
to discuss...@googlegroups.com
You can have any number (well, 501 doesn't work, but 2 definitely does) of PeerConnections simultaneously open - creating a new one won't affect any existing connection.

What effect are you trying to achieve that led you to trying to "trigger a new DTLS connection"?
Note that in some cases, it's possible to cause a PeerConnection to connect to a different remote end - see the test at https://github.com/web-platform-tests/wpt/blob/master/webrtc/protocol/handover.html - this handover will involve a new DTLS connection.


--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

Roman Shpount

unread,
Apr 8, 2024, 10:35:04 AM4/8/24
to discuss-webrtc
As far as I know, this method is still broken with Firefox: https://wpt.fyi/results/webrtc/protocol/handover.html?label=experimental&label=master&aligned
I do not think you can trigger a new DTLS connection with Firefox without creating a new PeerConnection due to https://bugzilla.mozilla.org/show_bug.cgi?id=1320903.

kiranr...@gmail.com

unread,
Apr 15, 2024, 2:06:51 PM4/15/24
to discuss-webrtc
Server has to  support multiple simultaneous peer connections for that to work, in my case it doesn’t.

 is it possible to add tls-id in webrtc’s sdp ?

Roman Shpount

unread,
Apr 15, 2024, 2:27:05 PM4/15/24
to discuss-webrtc
No browsers currently support tls-id.

With recent Chrome or Safari, if the remote provides a new digest in the offer, this causes a new DTLS connection. Firefox will never initiate a new DTLS connection for the same peer connection.

Kiran Ravuri

unread,
Apr 15, 2024, 3:05:21 PM4/15/24
to discuss...@googlegroups.com
Thanks for the info.  It’s very helpful

You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/ISja4FHrwbg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/6d71de6e-8d01-4d7b-a0d6-44a482c875b8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages