blob: 4c745a852a0c9fba1165e78ff3374d32ba2a78de [file] [log] [blame]
[Worker] Test importing a JWK RSA-OAEP private key with SHA-1 in workers.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Starting worker: resources/rsa-import-jwk-private-key.js
FAIL [Worker] crypto.subtle.importKey("jwk", {kty: "RSA", n: n, e: e, d: d}, {name: "RSA-OAEP", hash: "sha-1"}, extractable, ["encrypt", "wrapKey"]) should not throw exception. Threw exception ReferenceError: Can't find variable: n.
[Worker] Importing a key...
PASS [Worker] privateKey.toString() is '[object CryptoKey]'
PASS [Worker] privateKey.type is 'private'
PASS [Worker] privateKey.extractable is true
PASS [Worker] privateKey.algorithm.name is 'RSA-OAEP'
PASS [Worker] privateKey.algorithm.modulusLength is 2048
PASS [Worker] bytesToHexString(privateKey.algorithm.publicExponent) is '010001'
PASS [Worker] privateKey.algorithm.hash.name is 'SHA-1'
PASS [Worker] privateKey.usages is ['decrypt', 'unwrapKey']
PASS successfullyParsed is true
TEST COMPLETE