Issue 194: RTCDtlsTransport.start() needs to return a promise

Issue submitted by Robin Raymond:
https://github.com/openpeer/ortc/issues/194

Problem is how the developer knows whether the remote fingerprint has been validated or not.  Also, the question arises as to whether we can have incoming media (or outgoing media) before the fingerprint is validated.

>From Robin:
Suggested solution: For RTCDtlsTransport connected should imply that start has been called and is validated. However, incoming media can flow through prior to the connected state but outgoing media will not start sending until in the connected state.

[BA]  Here is a proposed update the state definition to reflect this:

2.7 enum RTCDtlsTransportState

RTCDtlsTransportState indicates the state of the DTLS transport.

enum RTCDtlsTransportState {

    "new<http://internaut.com:8080/~baboba/ortc/ortc-5-01-2015.html#idl-def-RTCDtlsTransportState.new>",

    "connecting<http://internaut.com:8080/~baboba/ortc/ortc-5-01-2015.html#idl-def-RTCDtlsTransportState.connecting>",

    "connected<http://internaut.com:8080/~baboba/ortc/ortc-5-01-2015.html#idl-def-RTCDtlsTransportState.connected>",

    "closed<http://internaut.com:8080/~baboba/ortc/ortc-5-01-2015.html#idl-def-RTCDtlsTransportState.closed>"

};
Enumeration description

new


The RTCDtlsTransport<http://internaut.com:8080/~baboba/ortc/ortc-5-01-2015.html#idl-def-RTCDtlsTransport> object has been created and has not started negotiating yet.

connecting


DTLS is in the process of negotiating a secure connection. Once a secure connection is negotiated and DTLS-SRTP has derived keys (but prior to verification of the remote fingerprint, enabled by calling start()), incoming media can flow through.

connected


DTLS has completed negotiation of a secure connection (including DTLS-SRTP and remote fingerprint verification). Outgoing media can now flow through.

closed


The DTLS connection has been closed intentionally via a call to stop() or as the result of an error (such as a failure to validate the remote fingerprint). Calling transport.stop() will also result in a transition to the "closed" state.

Received on Friday, 1 May 2015 17:25:16 UTC