haikuwebkit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jw...

53 lines
2.8 KiB
HTML
Raw Permalink Normal View History

Update SubtleCrypto::importKey to match the latest spec https://bugs.webkit.org/show_bug.cgi?id=164446 <rdar://problem/29123621> Reviewed by Brent Fulgham. LayoutTests/imported/w3c: * WebCryptoAPI/idlharness-expected.txt: Source/WebCore: This patch does following few things: 1. It updates the SubtleCrypto::importKey method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-importKey. It also refers to the latest Editor's Draft at a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-importKey. 2. It implements importKey operations of following algorithms: AES-CBC, AES-KW, HMAC, RSAES-PKCS1-V1_5, RSASSA-PKCS1-V1_5, and RSA-OAEP. 3. It fixes some minor problems of SubtleCrypto::generateKey. 4. It addes move constructors for CryptoKeyAES, CryptoKeyHMAC, CryptoKeyRSA and CryptoKeyDataRSAComponents. 5. It renames HmacKeyGenParams to HmacKeyParams to serve the purpose of both HmacKeyGenParams and HmacImportParams which are essentially the same. 6. It enforces the key length in bits of CryptoKeyHMAC to be multiples of 8. 7. It also fixes the following bugs: https://bugs.webkit.org/show_bug.cgi?id=126033, https://bugs.webkit.org/show_bug.cgi?id=126034, https://bugs.webkit.org/show_bug.cgi?id=151308. P.S. We currently only support Raw and Jwk key format. Tests: crypto/subtle/aes-cbc-import-jwk-key-length-128.html crypto/subtle/aes-cbc-import-jwk-key-length-192.html crypto/subtle/aes-cbc-import-jwk-key-length-256.html crypto/subtle/aes-cbc-import-jwk-key-minimum.html crypto/subtle/aes-cbc-import-jwk-key-non-extractable.html crypto/subtle/aes-cbc-import-raw-key-length-128.html crypto/subtle/aes-cbc-import-raw-key-length-192.html crypto/subtle/aes-cbc-import-raw-key-length-256.html crypto/subtle/aes-import-key-malformed-parameters.html crypto/subtle/aes-kw-import-jwk-key-length-128.html crypto/subtle/aes-kw-import-jwk-key-length-192.html crypto/subtle/aes-kw-import-jwk-key-length-256.html crypto/subtle/aes-kw-import-raw-key.html crypto/subtle/generate-key-malformed-parameters.html crypto/subtle/hmac-import-jwk-key-minimum.html crypto/subtle/hmac-import-jwk-key-non-extractable.html crypto/subtle/hmac-import-jwk-key-sha1.html crypto/subtle/hmac-import-jwk-key-sha224.html crypto/subtle/hmac-import-jwk-key-sha256.html crypto/subtle/hmac-import-jwk-key-sha384.html crypto/subtle/hmac-import-jwk-key-sha512.html crypto/subtle/hmac-import-malformed-parameters.html crypto/subtle/hmac-import-raw-key-customized-length.html crypto/subtle/hmac-import-raw-key.html crypto/subtle/import-key-malformed-parameters.html crypto/subtle/rsa-import-key-malformed-parameters.html crypto/subtle/rsa-oaep-import-jwk-private-key.html crypto/subtle/rsa-oaep-import-jwk-public-key-sha1.html crypto/subtle/rsa-oaep-import-jwk-public-key-sha224.html crypto/subtle/rsa-oaep-import-jwk-public-key-sha256.html crypto/subtle/rsa-oaep-import-jwk-public-key-sha384.html crypto/subtle/rsa-oaep-import-jwk-public-key-sha512.html crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key.html crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum.html crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable.html crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key.html crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-private-key.html crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha1.html crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha224.html crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha256.html crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha384.html crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha512.html crypto/workers/subtle/aes-import-jwk-key.html crypto/workers/subtle/aes-import-raw-key.html crypto/workers/subtle/hmac-import-jwk-key.html crypto/workers/subtle/hmac-import-raw-key.html crypto/workers/subtle/rsa-import-jwk-private-key.html crypto/workers/subtle/rsa-import-jwk-public-key.html * CMakeLists.txt: * DerivedSources.make: * PlatformEfl.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::normalizeCryptoAlgorithmParameters): (WebCore::cryptoKeyUsageFromString): (WebCore::cryptoKeyUsagesFromJSValue): (WebCore::toKeyData): (WebCore::jsSubtleCryptoFunctionGenerateKeyPromise): (WebCore::jsSubtleCryptoFunctionImportKeyPromise): (WebCore::JSSubtleCrypto::importKey): * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey): * crypto/CryptoAlgorithm.h: * crypto/CryptoAlgorithmParameters.h: * crypto/JsonWebKey.h: Added. * crypto/JsonWebKey.idl: Added. * crypto/RsaOtherPrimesInfo.h: Added. * crypto/RsaOtherPrimesInfo.idl: Added. * crypto/SubtleCrypto.h: * crypto/SubtleCrypto.idl: * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::generateKey): (WebCore::CryptoAlgorithmAES_CBC::importKey): * crypto/algorithms/CryptoAlgorithmAES_CBC.h: * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: (WebCore::CryptoAlgorithmAES_KW::generateKey): (WebCore::CryptoAlgorithmAES_KW::importKey): * crypto/algorithms/CryptoAlgorithmAES_KW.h: * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::generateKey): (WebCore::CryptoAlgorithmHMAC::importKey): * crypto/algorithms/CryptoAlgorithmHMAC.h: * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: (WebCore::CryptoAlgorithmRSA_OAEP::importKey): * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h: * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::CryptoKeyAES): (WebCore::CryptoKeyAES::generate): (WebCore::CryptoKeyAES::importRaw): (WebCore::CryptoKeyAES::importJwk): * crypto/keys/CryptoKeyAES.h: * crypto/keys/CryptoKeyDataRSAComponents.cpp: (WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents): * crypto/keys/CryptoKeyDataRSAComponents.h: * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::CryptoKeyHMAC): (WebCore::CryptoKeyHMAC::generate): (WebCore::CryptoKeyHMAC::importRaw): (WebCore::CryptoKeyHMAC::importJwk): (WebCore::CryptoKeyHMAC::buildAlgorithm): * crypto/keys/CryptoKeyHMAC.h: * crypto/keys/CryptoKeyRSA.cpp: Added. (WebCore::CryptoKeyRSA::importJwk): * crypto/keys/CryptoKeyRSA.h: * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmHmacKeyGenParams.h. * crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h: Added. * crypto/parameters/HmacKeyParams.idl: Renamed from Source/WebCore/crypto/parameters/HmacKeyGenParams.idl. * crypto/parameters/RsaHashedImportParams.idl: Added. LayoutTests: Besides adding test cases for SubtleCrypto::importKey. This patch also corrects a typo: generate-key-malformed-paramters*. * crypto/subtle/aes-cbc-import-jwk-key-length-128-expected.txt: Added. * crypto/subtle/aes-cbc-import-jwk-key-length-128.html: Added. * crypto/subtle/aes-cbc-import-jwk-key-length-192-expected.txt: Added. * crypto/subtle/aes-cbc-import-jwk-key-length-192.html: Added. * crypto/subtle/aes-cbc-import-jwk-key-length-256-expected.txt: Added. * crypto/subtle/aes-cbc-import-jwk-key-length-256.html: Added. * crypto/subtle/aes-cbc-import-jwk-key-minimum-expected.txt: Added. * crypto/subtle/aes-cbc-import-jwk-key-minimum.html: Added. * crypto/subtle/aes-cbc-import-jwk-key-non-extractable-expected.txt: Added. * crypto/subtle/aes-cbc-import-jwk-key-non-extractable.html: Added. * crypto/subtle/aes-cbc-import-raw-key-length-128-expected.txt: Added. * crypto/subtle/aes-cbc-import-raw-key-length-128.html: Added. * crypto/subtle/aes-cbc-import-raw-key-length-192-expected.txt: Added. * crypto/subtle/aes-cbc-import-raw-key-length-192.html: Added. * crypto/subtle/aes-cbc-import-raw-key-length-256-expected.txt: Added. * crypto/subtle/aes-cbc-import-raw-key-length-256.html: Added. * crypto/subtle/aes-import-key-malformed-parameters-expected.txt: Added. * crypto/subtle/aes-import-key-malformed-parameters.html: Added. * crypto/subtle/aes-kw-import-jwk-key-length-128-expected.txt: Added. * crypto/subtle/aes-kw-import-jwk-key-length-128.html: Added. * crypto/subtle/aes-kw-import-jwk-key-length-192-expected.txt: Added. * crypto/subtle/aes-kw-import-jwk-key-length-192.html: Added. * crypto/subtle/aes-kw-import-jwk-key-length-256-expected.txt: Added. * crypto/subtle/aes-kw-import-jwk-key-length-256.html: Added. * crypto/subtle/aes-kw-import-raw-key-expected.txt: Added. * crypto/subtle/aes-kw-import-raw-key.html: Added. * crypto/subtle/generate-key-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/generate-key-malformed-paramters-expected.txt. * crypto/subtle/generate-key-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/generate-key-malformed-paramters.html. * crypto/subtle/hmac-generate-key-customized-length-expected.txt: * crypto/subtle/hmac-generate-key-customized-length.html: * crypto/subtle/hmac-generate-key-malformed-parameters-expected.txt: * crypto/subtle/hmac-generate-key-malformed-parameters.html: * crypto/subtle/hmac-import-raw-key-customized-length-expected.txt: * crypto/subtle/hmac-import-raw-key-customized-length.html: * crypto/subtle/hmac-import-jwk-key-minimum-expected.txt: Added. * crypto/subtle/hmac-import-jwk-key-minimum.html: Added. * crypto/subtle/hmac-import-jwk-key-non-extractable-expected.txt: Added. * crypto/subtle/hmac-import-jwk-key-non-extractable.html: Added. * crypto/subtle/hmac-import-jwk-key-sha1-expected.txt: Added. * crypto/subtle/hmac-import-jwk-key-sha1.html: Added. * crypto/subtle/hmac-import-jwk-key-sha224-expected.txt: Added. * crypto/subtle/hmac-import-jwk-key-sha224.html: Added. * crypto/subtle/hmac-import-jwk-key-sha256-expected.txt: Added. * crypto/subtle/hmac-import-jwk-key-sha256.html: Added. * crypto/subtle/hmac-import-jwk-key-sha384-expected.txt: Added. * crypto/subtle/hmac-import-jwk-key-sha384.html: Added. * crypto/subtle/hmac-import-jwk-key-sha512-expected.txt: Added. * crypto/subtle/hmac-import-jwk-key-sha512.html: Added. * crypto/subtle/hmac-import-malformed-parameters-expected.txt: Added. * crypto/subtle/hmac-import-malformed-parameters.html: Added. * crypto/subtle/hmac-import-raw-key-customized-length-expected.txt: Added. * crypto/subtle/hmac-import-raw-key-customized-length.html: Added. * crypto/subtle/hmac-import-raw-key-expected.txt: Added. * crypto/subtle/hmac-import-raw-key.html: Added. * crypto/subtle/import-key-malformed-parameters-expected.txt: Added. * crypto/subtle/import-key-malformed-parameters.html: Added. * crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Added. * crypto/subtle/rsa-import-key-malformed-parameters.html: Added. * crypto/subtle/rsa-oaep-import-jwk-private-key-expected.txt: Added. * crypto/subtle/rsa-oaep-import-jwk-private-key.html: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha1-expected.txt: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha1.html: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha224-expected.txt: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha224.html: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha256-expected.txt: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha256.html: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha384-expected.txt: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha384.html: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha512-expected.txt: Added. * crypto/subtle/rsa-oaep-import-jwk-public-key-sha512.html: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key-expected.txt: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key.html: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-expected.txt: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero-expected.txt: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum-expected.txt: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum.html: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable-expected.txt: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable.html: Added. * crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key.html: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-private-key-expected.txt: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-private-key.html: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha1-expected.txt: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha1.html: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha224-expected.txt: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha224.html: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha256-expected.txt: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha256.html: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha384-expected.txt: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha384.html: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha512-expected.txt: Added. * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha512.html: Added. * crypto/webkitSubtle/hmac-generate-key-expected.txt: * crypto/webkitSubtle/hmac-generate-key.html: * crypto/webkitSubtle/hmac-import-jwk-expected.txt: * crypto/webkitSubtle/hmac-import-jwk.html: * crypto/webkitSubtle/hmac-postMessage-expected.txt: * crypto/webkitSubtle/hmac-postMessage.html: * crypto/webkitSubtle/hmac-sign-verify-expected.txt: * crypto/webkitSubtle/hmac-sign-verify.html: * crypto/workers/subtle/aes-import-jwk-key-expected.txt: Added. * crypto/workers/subtle/aes-import-jwk-key.html: Added. * crypto/workers/subtle/aes-import-raw-key-expected.txt: Added. * crypto/workers/subtle/aes-import-raw-key.html: Added. * crypto/workers/subtle/hmac-import-jwk-key-expected.txt: Added. * crypto/workers/subtle/hmac-import-jwk-key.html: Added. * crypto/workers/subtle/hmac-import-raw-key-expected.txt: Added. * crypto/workers/subtle/hmac-import-raw-key.html: Added. * crypto/workers/subtle/hmac-postMessage-worker-expected.txt: * crypto/workers/subtle/hmac-postMessage-worker.html: * crypto/workers/subtle/resources/aes-import-jwk-key.js: Added. * crypto/workers/subtle/resources/aes-import-raw-key.js: Added. * crypto/workers/subtle/resources/hmac-import-jwk-key.js: Added. * crypto/workers/subtle/resources/hmac-import-raw-key.js: Added. * crypto/workers/subtle/resources/hmac-postMessage-worker.js: * crypto/workers/subtle/resources/rsa-import-jwk-private-key.js: Added. * crypto/workers/subtle/resources/rsa-import-jwk-public-key.js: Added. * crypto/workers/subtle/rsa-import-jwk-private-key-expected.txt: Added. * crypto/workers/subtle/rsa-import-jwk-private-key.html: Added. * crypto/workers/subtle/rsa-import-jwk-public-key-expected.txt: Added. * crypto/workers/subtle/rsa-import-jwk-public-key.html: Added. Canonical link: https://commits.webkit.org/182271@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-10 18:36:44 +00:00
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="../resources/common.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test importing a JWK RSASSA-PKCS1-v1_5 private key with SHA-1");
jsTestIsAsync = true;
var jwkKey = {
kty: "RSA",
alg: "RS1",
use: "sig",
key_ops: ["sign"],
ext: true,
n: "rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw",
e: "AQAB",
d: "eNLS37aCz7RXSNPD_DtLBJ6j5T8cSxdzRBCjPaI6WcGqJp16lq3UTwuoDLAqlA9oGYm238dsIWpuucP_lQtbWe-7SpxoI6_vmYGf7YVUHv1-DF9qiOmSrMmdxMnVOzYXY8RaT6thPjn_J5cfLV2xI_LwsrMtmpdSyNlgX0zTUhwtuahgAKMEChYjH2EnjHdHw6sY2-wApdcQI7ULE0oo5RzbQZpmuhcN9hiBc0L3hhF0qo50mbl02_65_GQ7DpVkXBxNgRBLzlPabmzzG2oAhfefLgYmSC1opaCkXE6vRWQNWNL45RZNZFYM3uoJghOMqGeocM0BpjdChHrPOlFvSQ",
p: "4miTuAjKMeH5uJ5KB397QUwhbkYEgSbcA2mifmSkvE2018gb55qkBHK1eVryf1_m43LNlc6O_ak6gfzdZIZvS5NCGjPl0q09plUpu8qFOSspBwA67qGH76lFlZLn_d4yglS7wfLru4_5Ys8qLLs-DqVLviwposOnyyWqwM5AXp0",
q: "xHYrzkivtmnz_sGchnWGc0q-pDOkKicptRpv2pMFIIXxnFX5aMeEXIZjVujXtwUy1UlFIN2GZJSvy5KJ79mu_XyNnFHMzedH-A3ee3u8h1UUrZF-vUu1_e4U_x67NN1dedzUSKynN7pFl3OkuShMBWGV-cwzOPdcVAfVuZlxUMc",
dp: "fBzDzYDUBmBQGop7Hn0dvf_T27V6RqpctWo074CQZcFbP2atFVtKSj3viWT3xid2VHzcgiDHdfpM3nEVlEO1wwIonGCSvdjGEOZiiFVOjrZAOVxA8guOjyyFvqbXke06VwPIIVvfKeSU2zuhbP__1tt6F_fxow4Kb2xonGT0GGk",
dq: "jmE2DiIPdhwDgLXAQpIaBqQ81bO3XfVT_LRULAwwwwlPuQV148H04zlh9TJ6Y2GZHYokV1U0eOBpJxfkb7dLYtpJpuiBjRf4yIUEoGlkkI_QlJnFSFr-YjGRdfNHqWBkxlSMZL770R9mIATndGkH7z5x-r9KwBZFC4FCG2hg_zE",
qi: "YCX_pLwbMBA1ThVH0WcwmnytqNcrMCEwTm7ByA2eU6nWbQrULvf7m9_kzfLUcjsnpAVlBQG5JMXMy0Sq4ptwbywsa5-G8KAOOOR2L3v4hC-Eys9ftgFM_3i0o40eeQH4b3haPbntrIeMg8IzlOuVYKf9-2QuKDoWeRdd7NsdxTk",
};
var extractable = true;
debug("Importing a key...");
crypto.subtle.importKey("jwk", jwkKey, {name: "RSASSA-PKCS1-v1_5", hash: "SHA-1"}, extractable, ["sign"]).then(function(result) {
privateKey = result;
shouldBe("privateKey.toString()", "'[object CryptoKey]'");
shouldBe("privateKey.type", "'private'");
shouldBe("privateKey.extractable", "true");
shouldBe("privateKey.algorithm.name", "'RSASSA-PKCS1-v1_5'");
shouldBe("privateKey.algorithm.modulusLength", "2048");
shouldBe("bytesToHexString(privateKey.algorithm.publicExponent)", "'010001'");
shouldBe("privateKey.algorithm.hash.name", "'SHA-1'");
shouldBe("privateKey.usages", "['sign']");
finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>