blob: c5dfd6eddccef0754fb8b9556eccd2ebd77a6b34 [file] [log] [blame]
Test importing a HKDF raw key with malformed parameters
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.importKey("spki", rawKey, { name: "HKDF" }, nonExtractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError: The algorithm is not supported.
PASS crypto.subtle.importKey("pkcs8", rawKey, { name: "HKDF" }, nonExtractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError: The algorithm is not supported.
PASS crypto.subtle.importKey("jwk", jwkKey, { name: "HKDF" }, nonExtractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError: The algorithm is not supported.
PASS crypto.subtle.importKey("raw", rawKey, { name: "HKDF" }, nonExtractable, ["encrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.importKey("raw", rawKey, { name: "HKDF" }, nonExtractable, ["decrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.importKey("raw", rawKey, { name: "HKDF" }, nonExtractable, ["sign"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.importKey("raw", rawKey, { name: "HKDF" }, nonExtractable, ["verify"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.importKey("raw", rawKey, { name: "HKDF" }, nonExtractable, ["wrapKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.importKey("raw", rawKey, { name: "HKDF" }, nonExtractable, ["unwrapKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.importKey("raw", rawKey, { name: "HKDF" }, true, ["deriveKey", "deriveBits"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS successfullyParsed is true
TEST COMPLETE