Skip to content
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

DtlsTransport.getLocalParameters and certificate creation #211

Closed
aboba opened this issue May 28, 2015 · 4 comments
Closed

DtlsTransport.getLocalParameters and certificate creation #211

aboba opened this issue May 28, 2015 · 4 comments

Comments

@aboba
Copy link
Contributor

aboba commented May 28, 2015

If a certificate is created when DtlsTransport.getLocalParameters is called or when the object is constructed, then it is possible that getLocalParameters would not be able to return immediately. This can be addressed either by making getLocalParameters() a Promise, or via the certificate management API.

@aboba
Copy link
Contributor Author

aboba commented Jun 4, 2015

How about this for Section 4.3.2?

getLocalParameters
Obtain the DTLS parameters of the local RTCDtlsTransport asynchronously. When the getLocalParameters() method is invoked, the user agent must queue a task to run the following steps:

Let p be a new promise.
Check whether RTCDtlsTransport.state is "closed"; if so, reject p with an InvalidStateError.
Return, but continue the following steps in the background.
Start gathering the local parameters.
When the local parameters have been gathered, return a new RTCDtlsParameters object.

@aboba
Copy link
Contributor Author

aboba commented Jun 15, 2015

There is another related issue. In the forking scenario, the offerer can signal dtlsTransport.getLocalParameters, and get one or more replies. In this scenario, each of the answerer(s) will have called RTCDtlsTransport.start(), providing the signaled local parameters as an argument. Therefore, each additional reply beyond the first requires a new dtlsTransport to be constructed on the local peer, with the same fingerprint as the original, so that RTCDtlsTransport.start() can be called with the received remote DTLS parameters. However, without the certificate management API recently added to WebRTC 1.0 (see: http://w3c.github.io/webrtc-pc/archives/20150611/webrtc.html), this cannot be accomplished; by default, the newly constructed RTCDtlsTransport will have a new certificate and fingerprint.

@aboba
Copy link
Contributor Author

aboba commented Jun 16, 2015

The latest WebRTC 1.0 specification (http://w3c.github.io/webrtc-pc/archives/20150611/webrtc.html) includes a Certificate Management API in Section 5.5. This provides for a getCertificate() method that returns a promise. So there is a need to discuss how the certificate management API would affect this issue (e.g. the certificate could be created and then passed to the DtlsTransport constructor, so that getLocalParameters could return immediately).

@aboba
Copy link
Contributor Author

aboba commented Jun 24, 2015

Resolution discussed at the ORTC CG meeting was to add a certificate as a mandatory argument in the DtlsTransport constructor. That way, getLocalParameters would not need to be a Promise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant