blob: 0c3878d48a42fbebf995e32b2214e513487ff189 [file] [log] [blame]
Test generating an AES key with malformed-paramters.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.generateKey("aes-cbc", extractable, ["encrypt", "decrypt"]) rejected promise with TypeError: Member AesKeyParams.length is required and must be an instance of unsigned short.
PASS crypto.subtle.generateKey({name: "aes-cbc"}, extractable, ["encrypt", "decrypt"]) rejected promise with TypeError: Member AesKeyParams.length is required and must be an instance of unsigned short.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: true}, extractable, ["encrypt", "decrypt"]) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: null}, extractable, ["encrypt", "decrypt"]) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: undefined}, extractable, ["encrypt", "decrypt"]) rejected promise with TypeError: Member AesKeyParams.length is required and must be an instance of unsigned short.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: Symbol()}, extractable, ["encrypt", "decrypt"]) rejected promise with TypeError: Cannot convert a symbol to a number.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: { }}, extractable, ["encrypt", "decrypt"]) rejected promise with TypeError: Value NaN is outside the range [0, 65535].
PASS crypto.subtle.generateKey({name: "aes-cbc", length: "foo"}, extractable, ["encrypt", "decrypt"]) rejected promise with TypeError: Value NaN is outside the range [0, 65535].
PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["sign"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["verify"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["deriveKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["deriveBits"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["encrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["decrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["sign"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["verify"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["deriveKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-kw", length: 128}, extractable, ["deriveBits"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["sign"]) rejected promise with NotSupportedError: The operation is not supported..
PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["verify"]) rejected promise with NotSupportedError: The operation is not supported..
PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["deriveKey"]) rejected promise with NotSupportedError: The operation is not supported..
PASS crypto.subtle.generateKey({name: "aes-cfb-8", length: 128}, extractable, ["deriveBits"]) rejected promise with NotSupportedError: The operation is not supported..
PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["sign"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["verify"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["deriveKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-gcm", length: 128}, extractable, ["deriveBits"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["sign"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["verify"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["deriveKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-ctr", length: 128}, extractable, ["deriveBits"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "aes-cbc", length: 111}, extractable, ["encrypt"]) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS crypto.subtle.generateKey({name: "aes-kw", length: 111}, extractable, ["wrapKey"]) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS successfullyParsed is true
TEST COMPLETE