Skip to content

Commit 4538093

Browse files
committed
Convert generateCertificate argument to DOMHighResTimeStamp
Also add some explainer notes. Fixes #2674
1 parent de23f39 commit 4538093

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

webrtc.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7030,6 +7030,12 @@ <h2>
70307030
certificate; a browser SHOULD select SHA-256 [[!FIPS-180-4]]
70317031
if a hash algorithm is needed.
70327032
</p>
7033+
<p>
7034+
The time used when generating a certificate is of type
7035+
{{DOMHighResTimeStamp}}, which means that it is a number
7036+
relative to the time origin as specified in [[HR-TIME]],
7037+
or "now" if the time origin is undefined.
7038+
</p>
70337039
<p>
70347040
The resulting certificate MUST NOT include information that
70357041
can be linked to a user or <a>user agent</a>. Randomized
@@ -7049,7 +7055,7 @@ <h2>
70497055
</li>
70507056
<li>
70517057
<p>
7052-
Let <var>expires</var> be a {{EpochTimeStamp}} value of
7058+
Let <var>expires</var> be a {{DOMHighResTimeStamp}} value of
70537059
2592000000.
70547060
</p>
70557061
<div class="note">
@@ -7235,21 +7241,28 @@ <h2>
72357241
{{RTCPeerConnection/generateCertificate}}.
72367242
</p>
72377243
<pre class="idl">dictionary RTCCertificateExpiration {
7238-
[EnforceRange] EpochTimeStamp expires;
7244+
[EnforceRange] DOMHighResTimeStamp expires;
72397245
};</pre>
72407246
<dl data-link-for="RTCCertificateExpiration" data-dfn-for=
72417247
"RTCCertificateExpiration" class="methods">
72427248
<dt data-tests=
72437249
"RTCPeerConnection-generateCertificate.html,RTCCertificate.html">
7244-
<dfn>expires</dfn>, of type {{EpochTimeStamp}}
7250+
<dfn>expires</dfn>, of type {{DOMHighResTimeStamp}}
72457251
</dt>
72467252
<dd>
72477253
<p>
72487254
An optional {{expires}} attribute MAY be added to the
72497255
definition of the algorithm that is passed to
72507256
{{RTCPeerConnection/generateCertificate}}. If this parameter is
72517257
present it indicates the maximum time that the
7252-
{{RTCCertificate}} is valid for relative to the current time.
7258+
{{RTCCertificate}} is valid for.
7259+
</p>
7260+
<p class="note">
7261+
The expires attribute is relative to the time origin.
7262+
Previous versions of this specification claimed that it was
7263+
relative to the current time, but the definition of
7264+
{{DOMHighResTimeStamp}} precludes this interpretation.
7265+
The difference should not matter much in practice.
72537266
</p>
72547267
</dd>
72557268
</dl>

0 commit comments

Comments
 (0)