Re: [webrtc-pc] RTCCertificate.getAlgorithm for implicitly generated local certificates

As I was about to write a PR I realized this can get a bit messy. Certificates are generated asynchronously, e.g. when creating an offer: "If connection was not constructed with a set of certificates, and one has not yet been generated, wait for it to be generated." This means that we might do getConfiguration() and no certificate is generated, or we do it an some of the certificates have been generated but not all of them.

We might do getConfiguration() and get certificates: [ A ] and then we do setConfiguration a non-undefined certificates is expected to be [ A, B ]. We could say that setConfiguration expects certificates to be a subset of the true |certificates| but this would just get confusing, then certificates: [ B ] would be accepted when A is in fact the one currently in use.

I opt to leave "default certificates" undefined for default-generated, have get/setConfiguration be means to get and set configurations consistently rather than means to obtain certificate information. If you want information about certificates used you can use RTCPeerConnection.getStats() instead.

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1120#issuecomment-294765374 using your GitHub account

Received on Tuesday, 18 April 2017 10:17:25 UTC