From 1ab8ae02a0b19fd7cc83e86673bb730e64e72dbe Mon Sep 17 00:00:00 2001 From: Bernard Aboba Date: Wed, 12 Sep 2018 11:03:00 -0700 Subject: [PATCH 1/2] Make certificates optional in the DtlsTransport constructor Fix for Issue https://github.com/w3c/ortc/issues/866 --- index.html | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index 47cff64..1adb18f 100644 --- a/index.html +++ b/index.html @@ -2288,7 +2288,7 @@

Operation

Interface Definition

-        [ Constructor (RTCIceTransport transport, sequence<RTCCertificate> certificates), Exposed=Window]
+        [ Constructor (RTCIceTransport transport, optional sequence<RTCCertificate> certificates), Exposed=Window]
 interface RTCDtlsTransport : RTCStatsProvider  {
     readonly        attribute RTCIceTransport          transport;
     readonly        attribute RTCDtlsTransportState    state;
@@ -2303,21 +2303,33 @@ 

Interface Definition

};

Constructors

-

When the constructor is invoked, the following steps MUST be run:

+ When the RTCDtlsTransport constructor is invoked, + the user agent MUST run the following steps:
  1. Let transport be the first argument.

  2. -
  3. If transport.state is closed - throw an InvalidStateError and abort these steps.

  4. -
  5. Let certificates be the second argument.
  6. -
  7. If certificates is non-null, check that the - expires attribute of each RTCCertificate - object is in the future. If a certificate has expired, throw an - InvalidParameters and abort these steps.

  8. -
  9. Let dtlsTransport be a new RTCDtlsTransport - object with certificates.

  10. -
  11. Let dltsTransport have - [[\SendHeaderExtensions]] and [[\ReceiveHeaderExtensions]] - internal slots initialized to null.

  12. +
  13. If transport is in the closed + state, throw an InvalidStateError and abort + these steps.

  14. +
  15. Let certificates be the second argument if provided, null + otherwise.

  16. +
  17. If the certificates is not null and is non-empty, check that the + expires attribute of each RTCCertificate object + is in the future. If a certificate has expired, throw an InvalidAccessError + and abort these steps.

  18. +
  19. Let dtlstransport be a newly constructed + RTCDtlsTransport object.

  20. +
  21. Let dtlstransport have a [[\DtlsTransportState]] internal slot, + initialized to new.

  22. +
  23. Let dltsTransport have [[\SendHeaderExtensions]] + and [[\ReceiveHeaderExtensions]] internal slots initialized to + null.

  24. +
  25. Let dtlstransport have a [[\Certificates]] internal slot.

  26. +
  27. If certificates is non-null and is non-empty, + initialize the [[\Certificates]] internal slot to certificates.

  28. +
  29. If certificates is null or is empty, + generate a certificate using the default ciphersuite and store this in the + the [[\Certificates]] internal slot.

  30. +
  31. Return dtlstransport.
@@ -2347,8 +2359,8 @@

Constructors

sequence<RTCCertificate> - + From 743991f8d2796e13c7a4915f5faa3b1edb145f45 Mon Sep 17 00:00:00 2001 From: Bernard Aboba Date: Mon, 17 Sep 2018 09:18:11 -0700 Subject: [PATCH 2/2] "ciphersuite" -> "key generation algorithm" --- index.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 1adb18f..2cfafde 100644 --- a/index.html +++ b/index.html @@ -2318,17 +2318,18 @@

Constructors

and abort these steps.

  • Let dtlstransport be a newly constructed RTCDtlsTransport object.

  • -
  • Let dtlstransport have a [[\DtlsTransportState]] internal slot, - initialized to new.

  • +
  • Let dtlstransport have a [[\DtlsTransportState]] + internal slot, initialized to new.

  • Let dltsTransport have [[\SendHeaderExtensions]] and [[\ReceiveHeaderExtensions]] internal slots initialized to null.

  • -
  • Let dtlstransport have a [[\Certificates]] internal slot.

  • -
  • If certificates is non-null and is non-empty, - initialize the [[\Certificates]] internal slot to certificates.

  • +
  • Let dtlstransport have a [[\Certificates]] + internal slot.

  • +
  • If certificates is non-null and is non-empty, initialize + the [[\Certificates]] internal slot to certificates.

  • If certificates is null or is empty, - generate a certificate using the default ciphersuite and store this in the - the [[\Certificates]] internal slot.

  • + generate a certificate using the default key generation algorithm and + store it in the [[\Certificates]] internal slot.

  • Return dtlstransport.