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

add integrity property #425

Merged
merged 5 commits into from
Apr 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 41 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4166,6 +4166,26 @@ <h5><code>LinkedResource</code> Definition</h5>
</td>
<td>(None)</td>
</tr>
<tr>
<td>
<code><dfn>integrity</dfn></code>
</td>
<td>A cryptographic hashing of the resource that allows its integrity to be verified.
OPTIONAL.</td>
<td><p>One or more whitespace-separated sets of <a
href="https://www.w3.org/TR/SRI/#dfn-integrity-metadata">integrity metadata</a>
[[!sri]]. The value MUST conform to the <a
href="https://www.w3.org/TR/SRI/#the-integrity-attribute">metadata definition</a>
[[!sri]].</p>
<p>Refer to [[!sri]] for the <a
href="https://www.w3.org/TR/SRI/#cryptographic-hash-functions">list of cryptographic
hashing functions</a> that user agents are expected to support.</p>
</td>
<td>
<a href="#value-literal">Literal</a>
</td>
<td>(None)</td>
</tr>
<tr>
<td>
<code>
Expand All @@ -4180,17 +4200,32 @@ <h5><code>LinkedResource</code> Definition</h5>
<a href="#value-number">Number</a>
</td>
<td>(None)</td>
</tr>
</tbody>
</table>

<p>Although user agent support for the <code>integrity</code> property is OPTIONAL, user agents that support
cryptographic hashing comparisons using this property MUST do so in accordance with [[!sri]].</p>

<aside class="example" title="A resource with a SHA-256 hashing of its content">
<pre>{
"type": "LinkedResource",
"url": "chapter1.html",
"encodingFormat": "text/html",
"name": "Chapter 1 - Loomings",
"integrity": "sha256-13AE04E21177BABEDFDE721577615A638341F963731EA936BBB8C3862F57CDFC"
}</pre>
</aside>

<pre class="idl">
dictionary LinkedResource {
required DOMString url;
DOMString encodingFormat;
sequence&lt;LocalizableString> name;
LocalizableString description;
sequence&lt;DOMString> rel;
double length;
required DOMString url;
DOMString encodingFormat;
sequence&lt;LocalizableString> name;
LocalizableString description;
sequence&lt;DOMString> rel;
DOMString integrity;
double length;
};</pre>
</section>
<section id="app-toc-structure" class="appendix">
Expand Down