Add basic certificate/fingerprint control. - #99
Conversation
| // we not set the fingerprint of all the peers certificates? | ||
| void setPeerFingerprint(DOMString fingerprint); | ||
|
|
||
| // After a viable CandidatePair has been found (by using probePath) then a |
There was a problem hiding this comment.
We should probably specify when the promise resolves.
| // After a viable CandidatePair has been found (by using probePath) then a | ||
| // successful handshake needs to be performed before `sendPackets` can be | ||
| // used. | ||
| promise<void> establishEncryption(CandidatePair candidatePair); |
There was a problem hiding this comment.
Promise should be capitalized.
| // Set the fingerprint of the certificate of the peer. | ||
| // TODO: The transport can be configured with multiple certificates, should | ||
| // we not set the fingerprint of all the peers certificates? | ||
| void setPeerFingerprint(DOMString fingerprint); |
There was a problem hiding this comment.
Should be called setRemoteFingerprint.
There was a problem hiding this comment.
Or just pass in the fingerprint into the establishEncryption method.
There was a problem hiding this comment.
If we want to send ClientHello with STUN pings I think this would need to be a separate function.
|
|
||
| // Set the fingerprint of the certificate of the peer. | ||
| // TODO: The transport can be configured with multiple certificates, should | ||
| // we not set the fingerprint of all the peers certificates? |
There was a problem hiding this comment.
The fingerprint should be a byte array, not a string.
| void setFormat(DOMString wireFormat); | ||
|
|
||
| // Set the fingerprint of the certificate of the peer. | ||
| // TODO: The transport can be configured with multiple certificates, should |
There was a problem hiding this comment.
Yes, we should probably allow providing multiple.
| // A name could be useful for debugging/devtools. | ||
| DOMString name; | ||
| // Certificates? | ||
| sequence<RTCCertificate> certificates; |
There was a problem hiding this comment.
Can the actual handshake use more than one certificate? I thought, at least with DTLS, it had to pick one. But maybe I'm wrong.
There was a problem hiding this comment.
This is the reason we use multiple certificates:
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#certificates
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#using_certificates
I guess it's a good way to future proof the API, if some new algorithm becomes recommended then this would help us migrate to it.
d91b15d to
5564081
Compare
No description provided.