Diff
Modified: trunk/LayoutTests/ChangeLog (253831 => 253832)
--- trunk/LayoutTests/ChangeLog 2019-12-20 19:17:02 UTC (rev 253831)
+++ trunk/LayoutTests/ChangeLog 2019-12-20 19:18:46 UTC (rev 253832)
@@ -1,5 +1,17 @@
2019-12-20 Truitt Savell <[email protected]>
+ Unreviewed, rolling out r253831.
+
+ Inadvertent rollout of r253829
+
+ Reverted changeset:
+
+ "Unreviewed, rolling out r253829."
+ https://bugs.webkit.org/show_bug.cgi?id=205502
+ https://trac.webkit.org/changeset/253831
+
+2019-12-20 Truitt Savell <[email protected]>
+
Unreviewed, rolling out r253829.
This is blocking the rollout of r253705
Modified: trunk/LayoutTests/TestExpectations (253831 => 253832)
--- trunk/LayoutTests/TestExpectations 2019-12-20 19:17:02 UTC (rev 253831)
+++ trunk/LayoutTests/TestExpectations 2019-12-20 19:18:46 UTC (rev 253832)
@@ -463,6 +463,7 @@
imported/w3c/web-platform-tests/css/css-properties-values-api/url-resolution.html [ DumpJSConsoleLogInStdErr ]
imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.tentative.html [ DumpJSConsoleLogInStdErr ]
imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html [ DumpJSConsoleLogInStdErr ]
+imported/w3c/web-platform-tests/subresource-integrity [ DumpJSConsoleLogInStdErr ]
[ Debug ] imported/w3c/web-platform-tests/service-workers/service-worker/clients-matchall-order.https.html [ Slow ]
[ Debug ] imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html [ Slow ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (253831 => 253832)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-20 19:17:02 UTC (rev 253831)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-20 19:18:46 UTC (rev 253832)
@@ -1,5 +1,17 @@
2019-12-20 Truitt Savell <[email protected]>
+ Unreviewed, rolling out r253831.
+
+ Inadvertent rollout of r253829
+
+ Reverted changeset:
+
+ "Unreviewed, rolling out r253829."
+ https://bugs.webkit.org/show_bug.cgi?id=205502
+ https://trac.webkit.org/changeset/253831
+
+2019-12-20 Truitt Savell <[email protected]>
+
Unreviewed, rolling out r253829.
This is blocking the rollout of r253705
Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (253831 => 253832)
--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2019-12-20 19:17:02 UTC (rev 253831)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2019-12-20 19:18:46 UTC (rev 253832)
@@ -346,7 +346,7 @@
"web-platform-tests/staticrange": "skip",
"web-platform-tests/storage": "skip",
"web-platform-tests/streams/writable-streams": "skip",
- "web-platform-tests/subresource-integrity": "skip",
+ "web-platform-tests/subresource-integrity": "import",
"web-platform-tests/svg": "import",
"web-platform-tests/svg-aam": "skip",
"web-platform-tests/testharness_runner.html": "skip",
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/META.yml (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/META.yml (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/META.yml 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,5 @@
+spec: https://w3c.github.io/webappsec-subresource-integrity/
+suggested_reviewers:
+ - metromoxie
+ - mikewest
+ - hillbrad
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/alternate.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/alternate.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/alternate.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: red }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Access-Control-Allow-Origin: *
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css.sub.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css.sub.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css.sub.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: {{location[scheme]}}://{{domains[]}}{{GET[acao_port]}}
+Access-Control-Allow-Credentials: true
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-ineligible-style.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-ineligible-style.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-ineligible-style.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+ed25519_broken_signature="trollololo";
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: ed25519-dY4xEJDd1AMMbFNIhAMzJO6uhp6gZJOhchjJXDB8yY67rYrF4QUmUWS9gkvdY0Cxo8Rnb2kIdoUiigodoatKDQ==
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+ed25519_signature=true;
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,4 @@
+Integrity: sha256-Potato
+Integrity: ed25519-Potato
+Integrity: ed25519-dY4xEJDd1AMMbFNIhAMzJO6uhp6gZJOhchjJXDB8yY67rYrF4QUmUWS9gkvdY0Cxo8Rnb2kIdoUiigodoatKDQ==
+Integrity: ed25519-PotatoPotato
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+ed25519_signature=true;
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: sha256-Potato ed25519-Potato ed25519-dY4xEJDd1AMMbFNIhAMzJO6uhp6gZJOhchjJXDB8yY67rYrF4QUmUWS9gkvdY0Cxo8Rnb2kIdoUiigodoatKDQ== ed25519-PotatoPotato
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+ed25519_signature=true;
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: sha256-Potato, ed25519-Potato ed25519-dY4xEJDd1AMMbFNIhAMzJO6uhp6gZJOhchjJXDB8yY67rYrF4QUmUWS9gkvdY0Cxo8Rnb2kIdoUiigodoatKDQ== ,ed25519-PotatoPotato
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-no-signature.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-no-signature.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-no-signature.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+ed25519_no_signature=true;
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+ed25519_signature=true;
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: ed25519-dY4xEJDd1AMMbFNIhAMzJO6uhp6gZJOhchjJXDB8yY67rYrF4QUmUWS9gkvdY0Cxo8Rnb2kIdoUiigodoatKDQ==
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+ed25519_signature=true;
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: ed25519-jMATgofD8LM8FWYjBhryikPzo9bUJOgBlJLOS0su1vjMrVmemh5AqPWIGxroEOuyjHj/TH2jsyy4nh6Ti8iECw==
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,4 @@
+Integrity: sha256-Potato
+Integrity: ed25519-Potato
+Integrity: ed25519-k+0f30qLFYl2l2/jK7VgDo6YoWyzWoyGKGgmXxxGUUkaQbvj/n0ABXQqRbHQr+EMXOaJU206t1SjkbSSBPN5CQ==
+Integrity: ed25519-PotatoPotato
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: sha256-Potato ed25519-Potato ed25519-k+0f30qLFYl2l2/jK7VgDo6YoWyzWoyGKGgmXxxGUUkaQbvj/n0ABXQqRbHQr+EMXOaJU206t1SjkbSSBPN5CQ== ed25519-PotatoPotato
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: sha256-Potato, ed25519-Potato ed25519-k+0f30qLFYl2l2/jK7VgDo6YoWyzWoyGKGgmXxxGUUkaQbvj/n0ABXQqRbHQr+EMXOaJU206t1SjkbSSBPN5CQ== ,ed25519-PotatoPotato
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-no-signature.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-no-signature.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-no-signature.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+Integrity: ed25519-dY4xEJDd1AMMbFNIhAMzJO6uhp6gZJOhchjJXDB8yY67rYrF4QUmUWS9gkvdY0Cxo8Rnb2kIdoUiigodoatKDQ==
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css.headers (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css.headers (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css.headers 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,2 @@
+Integrity: ed25519-k+0f30qLFYl2l2/jK7VgDo6YoWyzWoyGKGgmXxxGUUkaQbvj/n0ABXQqRbHQr+EMXOaJU206t1SjkbSSBPN5CQ==
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/image.png (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/image.png (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/image.png 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,201 @@
+\x89PNG
+
+������+IHDR������d������d������p\xE2\x95T������ pHYs����������\x9A\x9C����
+OiCCPPhotoshop ICC profile����xڝSgTS\xE9=\xF7\xDE\xF4BK\x88\x80\x94KoR RB\x8B\x80\x91&*! J\x88!\xA1\xD9Q\xC1EEȠ\x88\x8E\x8E\x80\x8CQ,\x8A
+\xD8\xE4!\xA2\x8E\x83\xA3\x88\x8A\xCA\xFB\xE1{\xA3kּ\xF7\xE6\xCD\xFE\xB5\xD7>\xE7\xAC\xF3\x9D\xB3\xCF\xC0\x96H3Q5\x80\xA9B\xE0\x83\xC7\xC4\xC6\xE1\xE4.@\x81
+$p��\xB3d!s\xFD#��\xF8~<<+"\xC0\xBE��x\xD3��\xC0M\x9B\xC00\x87\xFF\xEAB\x99\\x80\x84\xC0t\x918K\x80��@z\x8EB\xA6��@F\x80\x9D\x98&S��\xA0��`\xCBcb\xE3��P-��`'\xE6\xD3��\x80\x9D\xF8\x99{��[\x94!\xA0\x91�� e\x88D��h;��\xAC\xCFV\x8AE��X0��fK\xC49��\xD8-��0IWfH��\xB0\xB7��\xC0\xCE\xB2����0Q\x88\x85)��{��`\xC8##x��\x84\x99��F\xF2W<\xF1+\xAE\xE7*����x\x99\xB2<\xB9$9E\x81[-qWW.(\xCEI+6aa\x9A@.\xC2y\x992\x814\xE0\xF3\xCC����\xA0\x91\xE0\x83\xF3\xFDx\xCE\xAE\xCE\xCE6\x8E\xB6_-\xEA\xBF\xFF"bb\xE3\xFE\xE5ϫp@����\xE1t~\xD1\xFE,/\xB3\x80;\x80m\xFE\xA2%\xEEh^\xA0u\xF7\x8Bf\xB2@\xB5��\xA0\xE9\xDAW\xF3p\xF8~<<E\xA1\x90\xB9\xD9\xD9\xE5\xE4\xE4\xD8J\xC4B[a\xCAW}\xFEg\xC2_\xC0W\xFDl\xF9~<\xFC\xF7\xF5\xE0\xBE\xE2$\x812]\x81G\xF8\xE0\xC2\xCC\xF4L\xA5ϒ \x84b\xDC\xE6\x8FG\xFC\xB7\xFF\xFC\xD3"\xC4Ib\xB9X*\xE3Qq\x8ED\x9A\x8C\xF32\xA5"\x89B\x92)\xC5%\xD2\xFFd\xE2\xDF,\xFB>\xDF5��\xB0j>{\x91-\xA8]c\xF6K'
Xt\xC0\xE2\xF7����\xF2\xBBo\xC1\xD4(
\x80h\x83\xE1\xCFw\xFF\xEF?\xFDG\xA0%��\x80fI\x92q����^D$.Tʳ?\xC7����D\xA0\x81*\xB0A\xF4\xC1,\xC0\xC1\xDC\xC1\xFC`6\x84B$\xC4\xC2BB
+d\x80r`)\xAC\x82B(\x86Ͱ*`/\xD4@4\xC0Qh\x86\x93p.\xC2U\xB8=p\xFAa\x9E\xC1(\xBC\x81 A\xC8a!ڈb\x8AX#\x8E\x99\x85\xF8!\xC1H\x8B$ ɈQ"K\x915H1R\x8AT UH\xF2=r9\x87\F\xBA\x91;\xC8��2\x82\xFC\x86\xBCG1\x94\x81\xB2Q=\xD4\xB5C\xB9\xA87\x84F\xA2\xD0dt1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<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
+<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.5-c021 79.155772, 2014/01/13-19:44:00 ">
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <rdf:Description rdf:about=""
+ xmlns:xmp="http://ns.adobe.com/xap/1.0/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
+ xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
+ xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
+ xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
+ xmlns:exif="http://ns.adobe.com/exif/1.0/">
+ <xmp:CreatorTool>Adobe Photoshop CC 2014 (Macintosh)</xmp:CreatorTool>
+ <xmp:CreateDate>2014-04-29T12:15:16-07:00</xmp:CreateDate>
+ <xmp:ModifyDate>2014-07-24T14:29:55-07:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2014-07-24T14:29:55-07:00</xmp:MetadataDate>
+ <dc:format>image/png</dc:format>
+ <photoshop:ColorMode>3</photoshop:ColorMode>
+ <photoshop:ICCProfile>sRGB IEC61966-2.1</photoshop:ICCProfile>
+ <xmpMM:InstanceID>xmp.iid:c24fd359-41d5-45bb-af2e-b1d86bbf67c5</xmpMM:InstanceID>
+ <xmpMM:DocumentID>adobe:docid:photoshop:e690b39b-5407-1177-a759-88675a41e29b</xmpMM:DocumentID>
+ <xmpMM:OriginalDocumentID>xmp.did:d84ea212-138d-4dbb-ac81-f0c60d2368ce</xmpMM:OriginalDocumentID>
+ <xmpMM:History>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <stEvt:action>created</stEvt:action>
+ <stEvt:instanceID>xmp.iid:d84ea212-138d-4dbb-ac81-f0c60d2368ce</stEvt:instanceID>
+ <stEvt:when>2014-04-29T12:15:16-07:00</stEvt:when>
+ <stEvt:softwareAgent>Adobe Photoshop CC (Macintosh)</stEvt:softwareAgent>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <stEvt:action>saved</stEvt:action>
+ <stEvt:instanceID>xmp.iid:c95f5a61-8908-46c8-94b6-eb92193f227c</stEvt:instanceID>
+ <stEvt:when>2014-07-24T13:47:52-07:00</stEvt:when>
+ <stEvt:softwareAgent>Adobe Photoshop CC 2014 (Macintosh)</stEvt:softwareAgent>
+ <stEvt:changed>/</stEvt:changed>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <stEvt:action>saved</stEvt:action>
+ <stEvt:instanceID>xmp.iid:c24fd359-41d5-45bb-af2e-b1d86bbf67c5</stEvt:instanceID>
+ <stEvt:when>2014-07-24T14:29:55-07:00</stEvt:when>
+ <stEvt:softwareAgent>Adobe Photoshop CC 2014 (Macintosh)</stEvt:softwareAgent>
+ <stEvt:changed>/</stEvt:changed>
+ </rdf:li>
+ </rdf:Seq>
+ </xmpMM:History>
+ <tiff:Orientation>1</tiff:Orientation>
+ <tiff:XResolution>720000/10000</tiff:XResolution>
+ <tiff:YResolution>720000/10000</tiff:YResolution>
+ <tiff:ResolutionUnit>2</tiff:ResolutionUnit>
+ <exif:ColorSpace>1</exif:ColorSpace>
+ <exif:PixelXDimension>100</exif:PixelXDimension>
+ <exif:PixelYDimension>100</exif:PixelYDimension>
+ </rdf:Description>
+ </rdf:RDF>
+</x:xmpmeta>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<?xpacket end="w"?>]u\xD2������ cHRM����z%����\x80\x83����\xF9\xFF����\x80\xE9����u0����\xEA`����:\x98����o\x92_\xC5F������\xABIDATx\xDA\xEC\xD1+��0\xB1gZ\xF1ol,\xA4'\xE1Z\xE9L\xF4M\xCF D@\x80" D@\x80" D@\x80" D@\x80" D@\x80" D@\x80" D@\x80" D@\x80" D@\x80" D@\x80" @D@\x80\xB9\xDE����\xFF\xFF��\xB5+\xE7\xE1\xDD\xD8��������IEND\xAEB`\x82
\ No newline at end of file
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/script.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/script.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/script.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+// nothing important.
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/sri-test-helpers.sub.js (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/sri-test-helpers.sub.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/sri-test-helpers.sub.js 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,43 @@
+// This horrible hack is needed for the 'use-credentials' tests because, on
+// response, if port 80 or 443 is the current port, it will not appear to
+// the browser as part of the origin string. Since the origin *string* is
+// used for CORS access control, instead of the origin itself, if there
+// isn't an exact string match, the check will fail. For example,
+// "http://example.com" would not match "http://example.com:80", because
+// they are not exact string matches, even though the origins are the same.
+//
+// Thus, we only want the Access-Control-Allow-Origin header to have
+// the port if it's not port 80 or 443, since the user agent will elide the
+// ports in those cases.
+const main_domain = '{{domains[]}}';
+const www_domain = '{{hosts[alt][]}}';
+const default_port = (location.protocol === 'https:') ? '{{ports[https][0]}}' :
+ '{{ports[http][0]}}';
+
+const port_string = (default_port !== '80' && default_port !== '443') ?
+ `:${default_port}` : '';
+const www_host_and_port = www_domain + port_string;
+
+// General resource prefixes.
+const same_origin_prefix = '/subresource-integrity/';
+const xorigin_prefix = `${location.protocol}//${www_host_and_port}/subresource-integrity/`;
+
+// General resource suffixes, for piping CORS headers.
+const anonymous = '&pipe=header(Access-Control-Allow-Origin,*)';
+const use_credentials = "&pipe=header(Access-Control-Allow-Credentials,true)|" +
+ "header(Access-Control-Allow-Origin," + location.origin + ")";
+
+// Note that all of these style URLs have query parameters started, so any
+// additional parameters should be appended starting with '&'.
+const xorigin_anon_style = location.protocol
+ + '//' + www_host_and_port
+ + '/subresource-integrity/crossorigin-anon-style.css?';
+
+const xorigin_creds_style = location.protocol
+ + '//' + www_host_and_port
+ + '/subresource-integrity/crossorigin-creds-style.css?acao_port='
+ + port_string;
+
+const xorigin_ineligible_style = location.protocol
+ + '//' + www_host_and_port
+ + '/subresource-integrity/crossorigin-ineligible-style.css?';
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/style.css (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/style.css (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/style.css 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1 @@
+.testdiv{ background-color: yellow }
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-css-ed25519.tentative-expected.txt (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-css-ed25519.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-css-ed25519.tentative-expected.txt 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,13 @@
+
+PASS Style: Passes, with correct key + signature.
+FAIL Style: Fails, because the key is malformed. assert_unreached: Bad load succeeded. Reached unreachable code
+FAIL Style: Fails because of wrong key. assert_unreached: Bad load succeeded. Reached unreachable code
+FAIL Style: Fails, because of missing key. assert_unreached: Bad load succeeded. Reached unreachable code
+FAIL Style: Fails, because of wrong key. assert_unreached: Bad load succeeded. Reached unreachable code
+PASS Style: Passes, because the first of two keys passes.
+PASS Style: Passes, because the second of two keys passes.
+PASS Style: Passes, because at least one signature matches.
+PASS Style: Passes (as above), with commas between values.
+PASS Style: Passes (as above), with multiple headers.
+PASS Style: Passes, with multiple signatures + multiple keys.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-css-ed25519.tentative.html (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-css-ed25519.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-css-ed25519.tentative.html 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Subresource Integrity</title>
+<script src=""
+<script src=""
+<script src=""
+
+<div id="log"></div>
+
+<div id="container"></div>
+<script>
+ var public_key = "otDax00eEy6QTMK61lfzrHgZDsXw++rdJkYi02N6X0c="
+ var style_tests = [];
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Passes, with correct key + signature.",
+ {
+ href: "ed25519-style.css?1",
+ integrity: "ed25519-" + public_key
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Fails, because the key is malformed.",
+ {
+ href: "ed25519-style.css?2",
+ integrity: "ed25519-PotatoPotatoPotato"
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Fails because of wrong key.",
+ {
+ href: "ed25519-style.css?3",
+ integrity: "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato="
+
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Fails, because of missing key.",
+ {
+ href: "ed25519-style-no-signature.css",
+ integrity: "ed25519-" + public_key
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Fails, because of wrong key.",
+ {
+ href: "ed25519-style-wrong-signature.css",
+ integrity: "ed25519-" + public_key
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Passes, because the first of two keys passes.",
+ {
+ href: "ed25519-style.css?1",
+ integrity: "ed25519-" + public_key +
+ " ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato="
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Passes, because the second of two keys passes.",
+ {
+ href: "ed25519-style.css?1",
+ integrity: "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato= " +
+ "ed25519-" + public_key
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Passes, because at least one signature matches.",
+ {
+ href: "ed25519-style-multi-signature.css",
+ integrity: "ed25519-" + public_key
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Passes (as above), with commas between values.",
+ {
+ href: "ed25519-style-multi-signature2.css",
+ integrity: "ed25519-" + public_key
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Passes (as above), with multiple headers.",
+ {
+ href: "ed25519-style-multi-signature-headers.css",
+ integrity: "ed25519-" + public_key
+ }
+ );
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Passes, with multiple signatures + multiple keys.",
+ {
+ href: "ed25519-style-multi-signature.css?2",
+ integrity: "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato= " +
+ "ed25519-" + public_key
+ }
+ );
+
+ // Run all style_tests in sequence.
+ function execute_next_style_test() {
+ if (style_tests.length > 0)
+ style_tests.shift().execute();
+ }
+ add_result_callback(execute_next_style_test);
+ execute_next_style_test();
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519-with-csp.tentative-expected.txt (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519-with-csp.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519-with-csp.tentative-expected.txt 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,6 @@
+
+FAIL Script: Ed25519-with-CSP, passes, valid key, valid signature. assert_unreached: Good load fired error handler. Reached unreachable code
+PASS Script: Ed25519-with-CSP, fails, valid key, invalid signature.
+PASS Script: Ed25519-with-CSP, passes, alternative key.
+PASS Script: Ed25519-with-CSP, fails, valid key, valid signature, key not in CSP.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519-with-csp.tentative.html (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519-with-csp.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519-with-csp.tentative.html 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<meta http-equiv="Content-Security-Policy"
+ content="script-src 'unsafe-inline' 'nonce-abcd' 'ed25519-qGFmwTxlocg707D1cX4w60iTwtfwbMLf8ITDyfko7s0='">
+
+<title>Subresource Integrity with Ed25519 plus Content Security Policy</title>
+<script src="" nonce="abcd"></script>
+<script src="" nonce="abcd"></script>
+<script src="" nonce="abcd"></script>
+
+<div id="log"></div>
+<div id="container"></div>
+<script nonce="abcd">
+ // This needs to be the same key as in this doc's content security policy.
+ var public_key = "qGFmwTxlocg707D1cX4w60iTwtfwbMLf8ITDyfko7s0=";
+ new SRIScriptTest(
+ true,
+ "Ed25519-with-CSP, passes, valid key, valid signature.",
+ "ed25519-signature.js",
+ "ed25519-" + public_key
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "Ed25519-with-CSP, fails, valid key, invalid signature.",
+ "ed25519-broken-signature.js",
+ "ed25519-" + public_key
+ ).execute();
+
+ // The first of these uses the nonce rather than the signature to pass CSP.
+ // That doesn't test anything useful about the Ed25519 feature, but is here
+ // to test the precondition for the next test. So if this test passes and
+ // the second one fails, then we can be sure that the 2nd test failed only
+ // because of the CSP key mismatch, as that's the only difference between
+ // the tests.
+ var key_not_in_csp = "5MVHFfs/9Ri+YSwH4FwneSFp88t1ljryPoLxdiyTKks=";
+ new SRIScriptTest(
+ true,
+ "Ed25519-with-CSP, passes, alternative key.",
+ "ed25519-signature2.js",
+ "ed25519-" + key_not_in_csp,
+ /* cross origin */ undefined,
+ /* nonce */ "abcd").execute();
+ new SRIScriptTest(
+ false,
+ "Ed25519-with-CSP, fails, valid key, valid signature, key not in CSP.",
+ "ed25519-signature2.js",
+ "ed25519-" + key_not_in_csp,
+ ).execute();
+</script>
+
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519.tentative-expected.txt (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519.tentative-expected.txt 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,13 @@
+
+PASS Script: Ed255519 signature, passes.
+FAIL Script: Ed255519 signature, fails because key is malformed. assert_unreached: Bad load succeeded. Reached unreachable code
+FAIL Script: Ed255519 signature, fails because wrong key. assert_unreached: Bad load succeeded. Reached unreachable code
+FAIL Script: Ed255519 signature, fails because no signature in response header. assert_unreached: Bad load succeeded. Reached unreachable code
+FAIL Script: Ed255519 signature, fails because incorrect signature in response. assert_unreached: Bad load succeeded. Reached unreachable code
+PASS Script: Ed255519 signature, passes if any (first) of two keys passes.
+PASS Script: Ed255519 signature, passes if any (second) of two keys passes.
+PASS Script: Ed255519 signature, passes because at least one signature matches.
+PASS Script: Ed255519 signature, passes (as above), with commas between values.
+PASS Script: Ed255519 signature, passes (as above), with multiple headers.
+PASS Script: Ed255519 signature, passes, with multiple signature + multiple keys.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519.tentative.html (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519.tentative.html 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Subresource Integrity</title>
+<script src=""
+<script src=""
+<script src=""
+
+<div id="log"></div>
+
+<div id="container"></div>
+<script>
+ var public_key = "qGFmwTxlocg707D1cX4w60iTwtfwbMLf8ITDyfko7s0="
+ new SRIScriptTest(
+ true,
+ "Ed255519 signature, passes.",
+ "ed25519-signature.js?1",
+ "ed25519-" + public_key
+ ).execute();
+ new SRIScriptTest(
+ false,
+ "Ed255519 signature, fails because key is malformed.",
+ "ed25519-signature.js?2",
+ "ed25519-PotatoPotatoPotato"
+ ).execute();
+ new SRIScriptTest(
+ false,
+ "Ed255519 signature, fails because wrong key.",
+ "ed25519-signature.js?3",
+ "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato="
+ ).execute();
+ new SRIScriptTest(
+ false,
+ "Ed255519 signature, fails because no signature in response header.",
+ "ed25519-no-signature.js",
+ "ed25519-" + public_key
+ ).execute();
+ new SRIScriptTest(
+ false,
+ "Ed255519 signature, fails because incorrect signature in response.",
+ "ed25519-broken-signature.js",
+ "ed25519-" + public_key
+ ).execute();
+ new SRIScriptTest(
+ true,
+ "Ed255519 signature, passes if any (first) of two keys passes.",
+ "ed25519-signature.js?4",
+ "ed25519-" + public_key +
+ " ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato="
+ ).execute();
+ new SRIScriptTest(
+ true,
+ "Ed255519 signature, passes if any (second) of two keys passes.",
+ "ed25519-signature.js?5",
+ "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato= ed25519-" +
+ public_key
+ ).execute();
+ new SRIScriptTest(
+ true,
+ "Ed255519 signature, passes because at least one signature matches.",
+ "ed25519-multi-signature.js",
+ "ed25519-" + public_key
+ ).execute();
+ new SRIScriptTest(
+ true,
+ "Ed255519 signature, passes (as above), with commas between values.",
+ "ed25519-multi-signature2.js",
+ "ed25519-" + public_key
+ ).execute();
+ new SRIScriptTest(
+ true,
+ "Ed255519 signature, passes (as above), with multiple headers.",
+ "ed25519-multi-signature-headers.js",
+ "ed25519-" + public_key
+ ).execute();
+ new SRIScriptTest(
+ true,
+ "Ed255519 signature, passes, with multiple signature + multiple keys.",
+ "ed25519-multi-signature.js?2",
+ "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato= ed25519-" +
+ public_key
+ ).execute();
+</script>
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-integrity-expected.txt (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-integrity-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-integrity-expected.txt 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,44 @@
+
+PASS Script: Same-origin with correct sha256 hash.
+PASS Script: Same-origin with correct sha384 hash.
+PASS Script: Same-origin with correct sha512 hash.
+PASS Script: Same-origin with empty integrity.
+PASS Script: Same-origin with incorrect hash.
+PASS Script: Same-origin with multiple sha256 hashes, including correct.
+PASS Script: Same-origin with multiple sha256 hashes, including unknown algorithm.
+PASS Script: Same-origin with sha256 mismatch, sha512 match
+PASS Script: Same-origin with sha256 match, sha512 mismatch
+PASS Script: <crossorigin='anonymous'> with correct hash, ACAO: *
+PASS Script: <crossorigin='anonymous'> with incorrect hash, ACAO: *
+PASS Script: <crossorigin='use-credentials'> with correct hash, CORS-eligible
+PASS Script: <crossorigin='use-credentials'> with incorrect hash CORS-eligible
+PASS Script: <crossorigin='anonymous'> with CORS-ineligible resource
+PASS Script: Cross-origin, not CORS request, with correct hash
+PASS Script: Cross-origin, not CORS request, with hash mismatch
+PASS Script: Cross-origin, empty integrity
+PASS Script: Same-origin with correct hash, options.
+PASS Script: Same-origin with unknown algorithm only.
+PASS Style: Same-origin with correct sha256 hash
+PASS Style: Same-origin with correct sha384 hash
+PASS Style: Same-origin with correct sha512 hash
+PASS Style: Same-origin with empty integrity
+PASS Style: Same-origin with incorrect hash.
+PASS Style: Same-origin with multiple sha256 hashes, including correct.
+PASS Style: Same-origin with multiple sha256 hashes, including unknown algorithm.
+PASS Style: Same-origin with sha256 mismatch, sha512 match
+PASS Style: Same-origin with sha256 match, sha512 mismatch
+PASS Style: <crossorigin='anonymous'> with correct hash, ACAO: *
+PASS Style: <crossorigin='anonymous'> with incorrect hash, ACAO: *
+PASS Style: <crossorigin='use-credentials'> with correct hash, CORS-eligible
+PASS Style: <crossorigin='use-credentials'> with incorrect hash CORS-eligible
+PASS Style: <crossorigin='anonymous'> with CORS-ineligible resource
+PASS Style: Cross-origin, not CORS request, with correct hash
+PASS Style: Cross-origin, not CORS request, with hash mismatch
+PASS Style: Cross-origin, empty integrity
+PASS Style: Same-origin with correct hash, options.
+PASS Style: Same-origin with unknown algorithm only.
+PASS Style: Same-origin with correct sha256 hash, rel='stylesheet license'
+PASS Style: Same-origin with correct sha256 hash, rel='license stylesheet'
+PASS Style: Same-origin with correct sha256 and sha512 hash, rel='alternate stylesheet' enabled
+PASS Style: Same-origin with incorrect sha256 and sha512 hash, rel='alternate stylesheet' enabled
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-integrity.html (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-integrity.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-integrity.html 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,427 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Subresource Integrity</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+
+<div id="log"></div>
+
+<div id="container"></div>
+<script>
+ var style_tests = [];
+ style_tests.execute = function() {
+ if (this.length > 0) {
+ this.shift().execute();
+ }
+ }
+ add_result_callback(function(res) {
+ if (res.name.startsWith("Style: ")) {
+ style_tests.execute();
+ }
+ });
+
+ // Script tests
+ new SRIScriptTest(
+ true,
+ "Same-origin with correct sha256 hash.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA="
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with correct sha384 hash.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha384-cINXh+nCzEHPWzXS7eoT+vYMBpyqczOybRLNU3XAButFWCRhHT5hLByIbPRqIm2f"
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with correct sha512 hash.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha512-KZdenhzBd7X7Q/vmaOSyvFz1CGdoVt26xzCZjlkU9lfBEK+V/ougGys7iYDi0+tOHIQSQa87bIqx95R7GU7I9Q=="
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with empty integrity.",
+ `${same_origin_prefix}script.js?${token()}`,
+ ""
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "Same-origin with incorrect hash.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with multiple sha256 hashes, including correct.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA= sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with multiple sha256 hashes, including unknown algorithm.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA= foo666-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with sha256 mismatch, sha512 match",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha512-KZdenhzBd7X7Q/vmaOSyvFz1CGdoVt26xzCZjlkU9lfBEK+V/ougGys7iYDi0+tOHIQSQa87bIqx95R7GU7I9Q== sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "Same-origin with sha256 match, sha512 mismatch",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha512-deadbeefspbnUnwooKGNNCb39nvg+EW0O9hDScTXeo/9pVZztLSUYU3LNV6H0lZapo8bCJUpyPPLAzE9fDzpxg== sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA="
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "<crossorigin='anonymous'> with correct hash, ACAO: *",
+ `${xorigin_prefix}script.js?${token()}&pipe=header(Access-Control-Allow-Origin,*)`,
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA=",
+ "anonymous"
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "<crossorigin='anonymous'> with incorrect hash, ACAO: *",
+ `${xorigin_prefix}script.js?${token()}&pipe=header(Access-Control-Allow-Origin,*)`,
+ "sha256-deadbeefcSLlbFZCj1OACLxTxVck2TOrBTEdUbwz1yU=",
+ "anonymous"
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "<crossorigin='use-credentials'> with correct hash, CORS-eligible",
+ `${xorigin_prefix}script.js?${token()}&pipe=header(Access-Control-Allow-Credentials,true)|header(Access-Control-Allow-Origin,${location.origin})`,
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA=",
+ "use-credentials"
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "<crossorigin='use-credentials'> with incorrect hash CORS-eligible",
+ `${xorigin_prefix}script.js?${token()}&pipe=header(Access-Control-Allow-Credentials,true)|header(Access-Control-Allow-Origin,${location.origin})`,
+ "sha256-deadbeef2S+pTRZgiw3DWrhC6JLDlt2zRyGpwH7unU8=",
+ "use-credentials"
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "<crossorigin='anonymous'> with CORS-ineligible resource",
+ `${xorigin_prefix}script.js?${token()}`, /* no ACAO header makes this CORS-ineligible */
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA=",
+ "anonymous"
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "Cross-origin, not CORS request, with correct hash",
+ `${xorigin_prefix}script.js?${token()}&pipe=header(Access-Control-Allow-Origin,*)`,
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA="
+ ).execute();
+
+ new SRIScriptTest(
+ false,
+ "Cross-origin, not CORS request, with hash mismatch",
+ `${xorigin_prefix}script.js?${token()}&pipe=header(Access-Control-Allow-Origin,*)`,
+ "sha256-deadbeef01Y0yKSx3/UoIKtIY2UQ9+H8WGyyMuOWOC0="
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Cross-origin, empty integrity",
+ `${xorigin_prefix}script.js?${token()}&pipe=header(Access-Control-Allow-Origin,*)`,
+ ""
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with correct hash, options.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "sha256-Bu681KMnQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA=?foo=bar?spam=eggs"
+ ).execute();
+
+ new SRIScriptTest(
+ true,
+ "Same-origin with unknown algorithm only.",
+ `${same_origin_prefix}script.js?${token()}`,
+ "foo666-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9E="
+ ).execute();
+
+ // Style tests
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with correct sha256 hash",
+ {
+ href: "style.css?1",
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with correct sha384 hash",
+ {
+ href: "style.css?2",
+ integrity: "sha384-wDAWxH4tOWBwAwHfBn9B7XuNmFxHTMeigAMwn0iVQ0zq3FtmYMLxihcGnU64CwcX"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with correct sha512 hash",
+ {
+ href: "style.css?3",
+ integrity: "sha512-9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2HSZX4l6w=="
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with empty integrity",
+ {
+ href: "style.css?4",
+ integrity: ""
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Same-origin with incorrect hash.",
+ {
+ href: "style.css?5",
+ integrity: "sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with multiple sha256 hashes, including correct.",
+ {
+ href: "style.css?6",
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4= sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with multiple sha256 hashes, including unknown algorithm.",
+ {
+ href: "style.css?7",
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4= foo666-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with sha256 mismatch, sha512 match",
+ {
+ href: "style.css?8",
+ integrity: "sha512-9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2HSZX4l6w== sha256-deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Same-origin with sha256 match, sha512 mismatch",
+ {
+ href: "style.css?9",
+ integrity: "sha512-deadbeef9wXDjd6Wq3H6nPAhI9zOvG7mJkUr03MTxaO+8ztTKnfJif42laL93Be/IF6YYZHHF4esitVYxiwpY2== sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "<crossorigin='anonymous'> with correct hash, ACAO: *",
+ {
+ href: xorigin_anon_style + '&1',
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+ crossorigin: "anonymous"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "<crossorigin='anonymous'> with incorrect hash, ACAO: *",
+ {
+ href: xorigin_anon_style + '&2',
+ integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk=",
+ crossorigin: "anonymous"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "<crossorigin='use-credentials'> with correct hash, CORS-eligible",
+ {
+ href: xorigin_creds_style + '&1',
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+ crossorigin: "use-credentials"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "<crossorigin='use-credentials'> with incorrect hash CORS-eligible",
+ {
+ href: xorigin_creds_style + '&2',
+ integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk=",
+ crossorigin: "use-credentials"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "<crossorigin='anonymous'> with CORS-ineligible resource",
+ {
+ href: xorigin_ineligible_style + '&1',
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+ crossorigin: "anonymous"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Cross-origin, not CORS request, with correct hash",
+ {
+ href: xorigin_anon_style + '&3',
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4="
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Cross-origin, not CORS request, with hash mismatch",
+ {
+ href: xorigin_anon_style + '&4',
+ integrity: "sha256-deadbeefCzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk="
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Cross-origin, empty integrity",
+ {
+ href: xorigin_anon_style + '&5',
+ integrity: ""
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with correct hash, options.",
+ {
+ href: "style.css?10",
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=?foo=bar?spam=eggs"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with unknown algorithm only.",
+ {
+ href: "style.css?11",
+ integrity: "foo666-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=?foo=bar?spam=eggs"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with correct sha256 hash, rel='stylesheet license'",
+ {
+ href: "style.css?12",
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+ rel: "stylesheet license"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with correct sha256 hash, rel='license stylesheet'",
+ {
+ href: "style.css?13",
+ integrity: "sha256-CzHgdJ7wOccM8L89n4bhcJMz3F+SPLT7YZk7gyCWUV4=",
+ rel: "license stylesheet"
+ }
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ true,
+ "Same-origin with correct sha256 and sha512 hash, rel='alternate stylesheet' enabled",
+ {
+ href: "alternate.css?1",
+ title: "alt",
+ type: "text/css",
+ class: "alternate",
+ disabled: "disabled",
+ rel: "alternate stylesheet",
+ integrity: "sha256-phbz83bWhnLig+d2VPKrRrTRyhqoDRo1ruGqZLZ0= sha512-8OYEB7ktnzcb6h+kB9CUIuc8qvKIyLpygRJdQSEEycRy74dUsB+Yu9rSjpOPjRUblle8WWX9Gn7v39LK2Oceig==",
+ },
+ function (link, container) {
+ var alternate = document.querySelector('link.alternate');
+ alternate.disabled = false;
+ },
+ "rgb(255, 0, 0)"
+ );
+
+ new SRIStyleTest(
+ style_tests,
+ false,
+ "Same-origin with incorrect sha256 and sha512 hash, rel='alternate stylesheet' enabled",
+ {
+ href: "alternate.css?2",
+ title: "alt",
+ type: "text/css",
+ class: "alternate",
+ disabled: "disabled",
+ rel: "alternate stylesheet",
+ integrity: "sha256-fail83bWhnLig+d2VPKrRrTRyhqoDRo1ruGqZLZ0= sha512-failB7ktnzcb6h+kB9CUIuc8qvKIyLpygRJdQSEEycRy74dUsB+Yu9rSjpOPjRUblle8WWX9Gn7v39LK2Oceig==",
+ },
+ function (link, container) {
+ var alternate = document.querySelector('link.alternate');
+ alternate.disabled = false;
+ }
+ );
+
+ style_tests.execute();
+
+</script>
+<!-- TODO check cache-poisoned resources, transfer-encoding, 3xx redirect
+ to resource with matching hash, and cross-origin leakage test as in sec5.3.
+ -->
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/ed25519.py (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/ed25519.py (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/ed25519.py 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,109 @@
+# The original version of this file was downloaded from
+# http://ed25519.cr.yp.to/software.html, and came with the following copyright
+# statement:
+# The Ed25519 software is in the public domain.
+
+import hashlib
+
+b = 256
+q = 2**255 - 19
+l = 2**252 + 27742317777372353535851937790883648493
+
+def H(m):
+ return hashlib.sha512(m).digest()
+
+def expmod(b,e,m):
+ if e == 0: return 1
+ t = expmod(b,e/2,m)**2 % m
+ if e & 1: t = (t*b) % m
+ return t
+
+def inv(x):
+ return expmod(x,q-2,q)
+
+d = -121665 * inv(121666)
+I = expmod(2,(q-1)/4,q)
+
+def xrecover(y):
+ xx = (y*y-1) * inv(d*y*y+1)
+ x = expmod(xx,(q+3)/8,q)
+ if (x*x - xx) % q != 0: x = (x*I) % q
+ if x % 2 != 0: x = q-x
+ return x
+
+By = 4 * inv(5)
+Bx = xrecover(By)
+B = [Bx % q,By % q]
+
+def edwards(P,Q):
+ x1 = P[0]
+ y1 = P[1]
+ x2 = Q[0]
+ y2 = Q[1]
+ x3 = (x1*y2+x2*y1) * inv(1+d*x1*x2*y1*y2)
+ y3 = (y1*y2+x1*x2) * inv(1-d*x1*x2*y1*y2)
+ return [x3 % q,y3 % q]
+
+def scalarmult(P,e):
+ if e == 0: return [0,1]
+ Q = scalarmult(P,e/2)
+ Q = edwards(Q,Q)
+ if e & 1: Q = edwards(Q,P)
+ return Q
+
+def encodeint(y):
+ bits = [(y >> i) & 1 for i in range(b)]
+ return ''.join([chr(sum([bits[i * 8 + j] << j for j in range(8)])) for i in range(b/8)])
+
+def encodepoint(P):
+ x = P[0]
+ y = P[1]
+ bits = [(y >> i) & 1 for i in range(b - 1)] + [x & 1]
+ return ''.join([chr(sum([bits[i * 8 + j] << j for j in range(8)])) for i in range(b/8)])
+
+def bit(h,i):
+ return (ord(h[i/8]) >> (i%8)) & 1
+
+def publickey(sk):
+ h = H(sk)
+ a = 2**(b-2) + sum(2**i * bit(h,i) for i in range(3,b-2))
+ A = scalarmult(B,a)
+ return encodepoint(A)
+
+def Hint(m):
+ h = H(m)
+ return sum(2**i * bit(h,i) for i in range(2*b))
+
+def signature(m,sk,pk):
+ h = H(sk)
+ a = 2**(b-2) + sum(2**i * bit(h,i) for i in range(3,b-2))
+ r = Hint(''.join([h[i] for i in range(b/8,b/4)]) + m)
+ R = scalarmult(B,r)
+ S = (r + Hint(encodepoint(R) + pk + m) * a) % l
+ return encodepoint(R) + encodeint(S)
+
+def isoncurve(P):
+ x = P[0]
+ y = P[1]
+ return (-x*x + y*y - 1 - d*x*x*y*y) % q == 0
+
+def decodeint(s):
+ return sum(2**i * bit(s,i) for i in range(0,b))
+
+def decodepoint(s):
+ y = sum(2**i * bit(s,i) for i in range(0,b-1))
+ x = xrecover(y)
+ if x & 1 != bit(s,b-1): x = q-x
+ P = [x,y]
+ if not isoncurve(P): raise Exception("decoding point that is not on curve")
+ return P
+
+def checkvalid(s,m,pk):
+ if len(s) != b/4: raise Exception("signature length is wrong")
+ if len(pk) != b/8: raise Exception("public-key length is wrong")
+ R = decodepoint(s[0:b/8])
+ A = decodepoint(pk)
+ S = decodeint(s[b/8:b/4])
+ h = Hint(encodepoint(R) + pk + m)
+ if scalarmult(B,S) != edwards(R,scalarmult(A,h)):
+ raise Exception("signature does not pass verification")
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/generate_javascript.py (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/generate_javascript.py (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/generate_javascript.py 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,54 @@
+from __future__ import print_function
+
+from os import path, listdir
+from hashlib import sha512, sha256, md5
+from base64 import b64encode
+import re
+
+JS_DIR = path.normpath(path.join(__file__, "..", ".."))
+
+'''
+Yield each file in the _javascript_ directory
+'''
+def js_files():
+ for f in listdir(JS_DIR):
+ if path.isfile(f) and f.endswith(".js"):
+ yield f
+
+'''
+URL-safe base64 encode a binary digest and strip any padding.
+'''
+def format_digest(digest):
+ return b64encode(digest)
+
+'''
+Generate an encoded sha512 URI.
+'''
+def sha512_uri(content):
+ return "sha512-%s" % format_digest(sha512(content).digest())
+
+'''
+Generate an encoded sha256 URI.
+'''
+def sha256_uri(content):
+ return "sha256-%s" % format_digest(sha256(content).digest())
+
+'''
+Generate an encoded md5 digest URI.
+'''
+def md5_uri(content):
+ return "md5-%s" % format_digest(md5(content).digest())
+
+def main():
+ for file in js_files():
+ print("Generating content for %s" % file)
+ base = path.splitext(path.basename(file))[0]
+ var_name = re.sub(r"[^a-z0-9]", "_", base)
+ content = "%s=true;" % var_name
+ with open(file, "w") as f: f.write(content)
+ print("\tSHA512 integrity: %s" % sha512_uri(content))
+ print("\tSHA256 integrity: %s" % sha256_uri(content))
+ print("\tMD5 integrity: %s" % md5_uri(content))
+
+if __name__ == "__main__":
+ main()
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/list_hashes.py (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/list_hashes.py (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/list_hashes.py 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,79 @@
+from __future__ import print_function
+
+from os import path, listdir
+from hashlib import sha512, sha384, sha256, md5
+from base64 import b64encode
+from random import randint
+import ed25519
+import re
+
+DIR = path.normpath(path.join(__file__, "..", ".."))
+
+'''
+Yield each _javascript_ and css file in the directory
+'''
+def js_and_css_files():
+ for f in listdir(DIR):
+ if path.isfile(f) and (f.endswith(".js") or f.endswith(".css")):
+ yield f
+
+'''
+URL-safe base64 encode a binary digest and strip any padding.
+'''
+def format_digest(digest):
+ return b64encode(digest)
+
+'''
+Generate an encoded sha512 URI.
+'''
+def sha512_uri(content):
+ return "sha512-%s" % format_digest(sha512(content).digest())
+
+'''
+Generate an encoded sha384 URI.
+'''
+def sha384_uri(content):
+ return "sha384-%s" % format_digest(sha384(content).digest())
+
+'''
+Generate an encoded sha256 URI.
+'''
+def sha256_uri(content):
+ return "sha256-%s" % format_digest(sha256(content).digest())
+
+'''
+Generate an encoded ed25519 signature.
+'''
+def ed25519_signature(private_public_key, content):
+ signature = ed25519.signature(content, *private_public_key)
+ return "ed25519-%s" % format_digest(signature)
+
+'''
+Generate private + public key pair for ed25519 signatures.
+'''
+def ed25519_key_pair():
+ secret_key = ''.join(chr(randint(0, 255)) for _ in range(0,32))
+ public_key = ed25519.publickey(secret_key)
+ return (secret_key, public_key)
+
+'''
+Generate an encoded md5 digest URI.
+'''
+def md5_uri(content):
+ return "md5-%s" % format_digest(md5(content).digest())
+
+def main():
+ ed25519_key = ed25519_key_pair()
+ for file in js_and_css_files():
+ print("Listing hash values for %s" % file)
+ with open(file, "r") as content_file:
+ content = content_file.read()
+ print("\tSHA512 integrity: %s" % sha512_uri(content))
+ print("\tSHA384 integrity: %s" % sha384_uri(content))
+ print("\tSHA256 integrity: %s" % sha256_uri(content))
+ print("\tMD5 integrity: %s" % md5_uri(content))
+ print("\tEd25519 integrity: %s" % ed25519_signature(ed25519_key, content))
+ print("\nEd25519 public key (used above): %s" % format_digest(ed25519_key[1]))
+
+if __name__ == "__main__":
+ main()
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/w3c-import.log (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/w3c-import.log (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/w3c-import.log 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,19 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+ https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/ed25519.py
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/generate_javascript.py
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/tools/list_hashes.py
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/w3c-import.log (0 => 253832)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/w3c-import.log (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/w3c-import.log 2019-12-20 19:18:46 UTC (rev 253832)
@@ -0,0 +1,55 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+ https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/META.yml
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/alternate.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-anon-style.css.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-creds-style.css.sub.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/crossorigin-ineligible-style.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-broken-signature.js.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature-headers.js.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature.js.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-multi-signature2.js.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-no-signature.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature.js.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-signature2.js.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature-headers.css.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature.css.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-multi-signature2.css.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-no-signature.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style-wrong-signature.css.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/ed25519-style.css.headers
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/image.png
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/script.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/sri-test-helpers.sub.js
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/style.css
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-css-ed25519.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519-with-csp.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-ed25519.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/subresource-integrity/subresource-integrity.html