-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the remote description after SDP negotiation? #1203
Comments
sure, this is a feature that is needed on the listening side, I tried to make some modifications but may need to change the const attribute of libdatachannel's checkFingerprint function, which feels bad. |
I opened #1204 to implement this and edit up removing the |
Yes, I noticed that, adding |
@achingbrain I think there is a misunderstanding about what The situation you are discussing here does not happen in the standard because a peer is supposed to reject fingerprints that don't match, but the sure thing is that set descriptions must not be updated according to what happens on the wire. In this case changing the description might even be misleading as users could consider it as the source of truth for what the expected fingerprint was. I appreciate the effort, however |
Returns a vector that contains the certificate fingerprints used by the connection to the remote peer. Closes paullouisageneau#1203 Refs paullouisageneau#1166
Returns a vector that contains the certificate fingerprints used by the connection to the remote peer. Closes paullouisageneau#1203 Refs paullouisageneau#1166
Returns a vector that contains the certificate fingerprints used by the connection to the remote peer. Closes paullouisageneau#1203 Refs paullouisageneau#1166
I chose #1206 adds the suggested |
Sure, all descriptions can change, only they have to be changed by signaling, and
Thank you for adding! |
This is related to #1166
For libp2p WebRTC-Direct after the DTLS handshake has taken place and the connection becomes ready to use, we open a datachannel and use it to verify the local and remote certificate fingerprints and the peer identifier so we can assert that the remote peer is the peer we think they are.
During connection we set the remote certificate fingerprint to a dummy value and disable fingerprint validation, since we are going to do it later.
When we come to do it we need access to the fingerprint of the remote certificate.
The browser
RTCPeerConnection
has a .currentRemoteDescription property - this returns:and includes the fingerprint of the remote connection.
The node.js polyfill returns the remoteDescription when this property is accessed, the same as
.remoteDescription
- this is not quite right as the.remoteDescription
property should return what was passed to .setRemoteDescription - this can be different to the currently negotiated state of remote end of the connection.The Description class parses the fingerprint out of the description passed to
.setRemoteDescription
, later on that fingerprint is verified or not, depending on config - would it be possible to have a copy of the local Description that gets updated with the actual fingerprint the connection uses?If this is done along with the final ICE candidates etc it would make it possible to implement
.currentRemoteDescription
on the polyfill correctly and also for me to implement the final piece of the WebRTC-Direct connection listener.I can try to implement this if it's acceptable though it's really stretching my C++!
The text was updated successfully, but these errors were encountered: