mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 1e42017386ce1eaeed4925fb8bc7f5417752019a
This commit is contained in:
parent
5574a4e4c8
commit
a972fdb353
2003 changed files with 16788 additions and 3140 deletions
|
@ -35,6 +35,9 @@ function run_test(algorithmNames) {
|
|||
];
|
||||
|
||||
var testVectors = [];
|
||||
if (algorithmNames && !Array.isArray(algorithmNames)) {
|
||||
algorithmNames = [algorithmNames];
|
||||
};
|
||||
allTestVectors.forEach(function(vector) {
|
||||
if (!algorithmNames || algorithmNames.includes(vector.name)) {
|
||||
testVectors.push(vector);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["AES-CBC"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["AES-CTR"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["AES-GCM"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["AES-KW"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["ECDH"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["ECDSA"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["HMAC"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["RSA-OAEP"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["RSA-PSS"]);
|
||||
done();
|
|
@ -0,0 +1,6 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test(["RSASSA-PKCS1-v1_5"]);
|
||||
done();
|
|
@ -16,7 +16,7 @@ function run_test(algorithmNames) {
|
|||
// helper functions that generate all possible test parameters for
|
||||
// different situations.
|
||||
|
||||
var testVectors = [ // Parameters that should work for generateKey
|
||||
var allTestVectors = [ // Parameters that should work for generateKey
|
||||
{name: "AES-CTR", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||
{name: "AES-CBC", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||
{name: "AES-GCM", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||
|
@ -29,6 +29,15 @@ function run_test(algorithmNames) {
|
|||
{name: "ECDH", resultType: "CryptoKeyPair", usages: ["deriveKey", "deriveBits"], mandatoryUsages: ["deriveKey", "deriveBits"]}
|
||||
];
|
||||
|
||||
var testVectors = [];
|
||||
if (algorithmNames && !Array.isArray(algorithmNames)) {
|
||||
algorithmNames = [algorithmNames];
|
||||
};
|
||||
allTestVectors.forEach(function(vector) {
|
||||
if (!algorithmNames || algorithmNames.includes(vector.name)) {
|
||||
testVectors.push(vector);
|
||||
}
|
||||
});
|
||||
|
||||
function parameterString(algorithm, extractable, usages) {
|
||||
var result = "(" +
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["AES-CBC"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["AES-CTR"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["AES-GCM"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["AES-KW"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["ECDH"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["ECDSA"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["HMAC"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["RSA-OAEP"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["RSA-PSS"]);
|
||||
done();
|
|
@ -0,0 +1,7 @@
|
|||
// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test(["RSASSA-PKCS1-v1_5"]);
|
||||
done();
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test("AES-CBC");
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test("AES-CTR");
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-CBC"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-CTR"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-GCM"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-KW"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["ECDH"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["ECDSA"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["HMAC"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["RSA-OAEP"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["RSA-PSS"]);
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["RSASSA-PKCS1-v1_5"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-CBC"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-CTR"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-GCM"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["AES-KW"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["ECDH"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["ECDSA"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["HMAC"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["RSA-OAEP"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["RSA-PSS"]);
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test(["RSASSA-PKCS1-v1_5"]);
|
||||
</script>
|
76
tests/wpt/web-platform-tests/WebCryptoAPI/tools/generate.py
Normal file
76
tests/wpt/web-platform-tests/WebCryptoAPI/tools/generate.py
Normal file
|
@ -0,0 +1,76 @@
|
|||
# script to generate the generateKey tests
|
||||
|
||||
import os
|
||||
|
||||
here = os.path.dirname(__file__)
|
||||
|
||||
successes_html = """<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="successes.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Good Parameters</h1>
|
||||
<p>
|
||||
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||
very slow, so the related tests can take up to
|
||||
several minutes to complete, depending on browser!
|
||||
</p>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test([%s]);
|
||||
</script>"""
|
||||
|
||||
failures_html = """<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||
<script src="failures.js"></script>
|
||||
|
||||
<h1>generateKey Tests for Bad Parameters</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test([%s]);
|
||||
</script>
|
||||
"""
|
||||
|
||||
successes_worker = """// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("successes.js");
|
||||
|
||||
run_test([%s]);
|
||||
done();"""
|
||||
|
||||
failures_worker = """// <meta> timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("../util/helpers.js");
|
||||
importScripts("failures.js");
|
||||
run_test([%s]);
|
||||
done();"""
|
||||
|
||||
names = ["AES-CTR", "AES-CBC", "AES-GCM", "AES-KW", "HMAC", "RSASSA-PKCS1-v1_5",
|
||||
"RSA-PSS", "RSA-OAEP", "ECDSA", "ECDH"]
|
||||
|
||||
for filename_pattern, template in [("test_successes_%s.html", successes_html),
|
||||
("test_failures_%s.html", failures_html),
|
||||
("successes_%s.worker.js", successes_worker),
|
||||
("failures_%s.worker.js", failures_worker)]:
|
||||
for name in names:
|
||||
path = os.path.join(here, os.pardir, "generateKey", filename_pattern % name)
|
||||
with open(path, "w") as f:
|
||||
f.write(template % '"%s"' % name)
|
Loading…
Add table
Add a link
Reference in a new issue