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

Update structured cloning for recent changes to HTML #1108

Merged
merged 1 commit into from Apr 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 38 additions & 25 deletions webrtc.html
Expand Up @@ -79,6 +79,13 @@ <h2>Terminology</h2>
handlers</a></dfn> and <dfn><a href=
"http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type">event
handler event types</a></dfn> are defined in [[!HTML5]].</p>
<p>The terms <dfn><a href=
"https://html.spec.whatwg.org/multipage/infrastructure.html#serializable-objects">
serializable objects</a></dfn>, <dfn><a href=
"https://html.spec.whatwg.org/multipage/infrastructure.html#serialization-steps">
serialization steps</a></dfn>, and <dfn><a href=
"https://html.spec.whatwg.org/multipage/infrastructure.html#deserialization-steps">
deserialization steps</a></dfn> are defined in [[!HTML]].</p>
<p>The terms <dfn>MediaStream</dfn>, <dfn>MediaStreamTrack</dfn>, and
<dfn>MediaStreamConstraints</dfn> are defined in [[!GETUSERMEDIA]].</p>
<p>The term <dfn>Blob</dfn> is defined in [[!FILEAPI]].</p>
Expand Down Expand Up @@ -4536,7 +4543,8 @@ <h2>RTCCertificate Interface</h2>
"RTCCertificate-certificate">certificate</dfn>]]) that
<code>RTCPeerConnection</code> uses to authenticate with a peer.</p>
<div>
<pre class="idl">interface RTCCertificate {
<pre class="idl">[Serializable]
interface RTCCertificate {
readonly attribute DOMTimeStamp expires;
readonly attribute FrozenArray&lt;RTCDtlsFingerprint&gt; fingerprints;
// At risk due to lack of implementers' interest.
Expand Down Expand Up @@ -4593,31 +4601,36 @@ <h2>Methods</h2>
contains unstructured binary data.</p>
<p>Note that a <code>RTCCertificate</code> might not directly hold
private keying material, this might be stored in a secure module.</p>
<p>The <code>RTCCertificate</code> object can be stored and retrieved
from persistent storage by an application. When a <a>user agent</a> is
required to obtain a structured clone [[!HTML]] of a
<code>RTCCertificate</code> object, it performs the following
steps:</p>

<p><code>RTCCertificate</code> objects are <a>serializable objects</a>
[[!HTML]]. Their <a>serialization steps</a>, given <var>value</var> and
<var>serialized</var>, are:</p>

<ol>
<li>Let <var>input</var> and <var>memory</var> be the corresponding
inputs defined by the internal structured cloning algorithm, where
<var>input</var> represents a <code>RTCCertificate</code> object to
be cloned.</li>
<li>Let <var>output</var> be a newly constructed
<code>RTCCertificate</code> object.</li>
<li>Copy the value of the <code>expires</code> attribute from
<var>input</var> to <var>output</var>.</li>
<li>Let the [[<a>certificate</a>]] internal slot of <var>output</var>
be set to the result of invoking the internal structured clone
algorithm recursively on the corresponding internal slots of
<var>input</var>, with the slot contents as the new
"<var>input</var>" argument and <var>memory</var> as the new
"<var>memory</var>" argument.
</li>
<li>Let the [[<a>handle</a>]] internal slot of <var>output</var>
refer to the same private keying material represented by the
[[<a>handle</a>]] internal slot of <var>input</var>.
</li>
<li>Set <var>serialized</var>.[[\expires]] to the value of
<var>value</var>'s <code>expires</code> attribute.</li>

<li>Set <var>serialized</var>.[[\certificate]] to
a copy of the unstructured binary data in
<var>value</var>.[[<a>certificate</a>]].</li>

<li>Set <var>serialized</var>.[[\handle]] be a serialization of the
private keying material represented by
<var>value</var>.[[<a>handle</a>]].</li>
</ol>

<p>Their <a>deserialization steps</a>, given <var>serialized</var> and
<var>value</var>, are:</p>

<ol>
<li>Initialize <var>value</var>'s <code>expires</code> attribute to
contain <var>serialized</var>.[[\expires]].</li>

<li>Set <var>value</var>.[[<a>certificate</a>]] to
<var>serialized</var>.[[\certificate]].</li>

<li>Set <var>value</var>.[[<a>handle</a>]] to the private key material
resulting from deserializing <var>serialized</var>.[[\handle]].</li>
</ol>
</section>
</section>
Expand Down