| Test importing keys with various uses from JWK. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS testWithAESCBC(["encrypt"], {key_ops: ["encrypt", "encrypt"]}) threw exception TypeError: JWK key_ops contains a duplicate operation. |
| |
| {"key_ops":["encrypt"]}: |
| PASS key.usages is ["encrypt"] |
| |
| {"key_ops":["decrypt"]}: |
| PASS key.usages is ["decrypt"] |
| |
| {"key_ops":["encrypt","decrypt"]}: |
| PASS key.usages is ["decrypt","encrypt"] |
| |
| {"key_ops":["wrapKey"]}: |
| PASS key.usages is ["wrapKey"] |
| |
| {"key_ops":["unwrapKey"]}: |
| PASS key.usages is ["unwrapKey"] |
| |
| {"key_ops":["wrapKey","unwrapKey"]}: |
| PASS key.usages is ["unwrapKey","wrapKey"] |
| |
| {"key_ops":["encrypt","decrypt","wrapKey"]}: |
| PASS key.usages is ["decrypt","encrypt","wrapKey"] |
| |
| {"use":"enc"}: |
| PASS key.usages is ["decrypt","encrypt","unwrapKey","wrapKey"] |
| |
| {"key_ops":["sign"]}: |
| PASS key.usages is ["sign"] |
| |
| {"key_ops":["verify"]}: |
| PASS key.usages is ["verify"] |
| |
| {"use":"sig"}: |
| PASS key.usages is ["sign","verify"] |
| |
| {"key_ops":["'encrypt'"]}: |
| PASS key.usages is [] |
| |
| {"key_ops":["encrypt "]}: |
| PASS key.usages is [] |
| |
| {"key_ops":["Encrypt"]}: |
| PASS key.usages is [] |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |