| Index: LayoutTests/crypto/importKey.html
|
| diff --git a/LayoutTests/crypto/importKey.html b/LayoutTests/crypto/importKey.html
|
| index fcdc3e24447427abc30821367f59df75c953b880..4db882e6c058be5aea30e5b15f3a519933b43f37 100644
|
| --- a/LayoutTests/crypto/importKey.html
|
| +++ b/LayoutTests/crypto/importKey.html
|
| @@ -3,6 +3,7 @@
|
| <head>
|
| <script src="../resources/js-test.js"></script>
|
| <script src="resources/common.js"></script>
|
| +<script src="resources/keys.js"></script>
|
| </head>
|
| <body>
|
| <p id="description"></p>
|
| @@ -77,7 +78,7 @@ Promise.resolve(null).then(function() {
|
|
|
| // Import an spki formatted public key
|
| keyFormat = "spki";
|
| - data = hexStringToUint8Array(kPublicKeySpkiDerHex);
|
| + data = hexStringToUint8Array(kKeyData.rsa1.spki);
|
| algorithm = {name: 'RsasSA-pKCS1-v1_5', hash: {name: 'sha-1'}};
|
| extractable = false;
|
| keyUsages = [];
|
| @@ -90,13 +91,13 @@ Promise.resolve(null).then(function() {
|
| //shouldBe("key.extractable", "true");
|
| shouldBe("key.algorithm.name", "'RSASSA-PKCS1-v1_5'");
|
| shouldBe("key.algorithm.hash.name", '"SHA-1"');
|
| - shouldBe("key.algorithm.modulusLength", '1024');
|
| - bytesShouldMatchHexString("key.algorithm.publicExponent", "010001", key.algorithm.publicExponent);
|
| + shouldEvaluateAs("key.algorithm.modulusLength", kKeyData.rsa1.modulusLengthBits);
|
| + bytesShouldMatchHexString("key.algorithm.publicExponent", kKeyData.rsa1.publicExponent, key.algorithm.publicExponent);
|
| shouldBe("key.usages.join(',')", "''");
|
|
|
| // Import a pkcs8 formatted private key
|
| keyFormat = "pkcs8";
|
| - data = hexStringToUint8Array(kPrivateKeyPkcs8DerHex);
|
| + data = hexStringToUint8Array(kKeyData.rsa1.pkcs8);
|
| algorithm = {name: 'RsasSA-pKCS1-v1_5', hash: {name: 'sha-1'}};
|
| extractable = false;
|
| keyUsages = [];
|
| @@ -108,8 +109,8 @@ Promise.resolve(null).then(function() {
|
| shouldBe("key.extractable", "false");
|
| shouldBe("key.algorithm.name", "'RSASSA-PKCS1-v1_5'");
|
| shouldBe("key.algorithm.hash.name", '"SHA-1"');
|
| - shouldBe("key.algorithm.modulusLength", '1024');
|
| - bytesShouldMatchHexString("key.algorithm.publicExponent", "010001", key.algorithm.publicExponent);
|
| + shouldEvaluateAs("key.algorithm.modulusLength", kKeyData.rsa1.modulusLengthBits);
|
| + bytesShouldMatchHexString("key.algorithm.publicExponent", kKeyData.rsa1.publicExponent, key.algorithm.publicExponent);
|
| shouldBe("key.usages.join(',')", "''")
|
|
|
| keyFormat = "raw";
|
|
|