Index: LayoutTests/crypto/subtle/hkdf-failures.html |
diff --git a/LayoutTests/crypto/subtle/hkdf-failures.html b/LayoutTests/crypto/subtle/hkdf-failures.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8d4548e286e3da3d653cef17afc54bb578321770 |
--- /dev/null |
+++ b/LayoutTests/crypto/subtle/hkdf-failures.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../resources/js-test.js"></script> |
+<script src="resources/common.js"></script> |
+</head> |
+<body> |
+<p id="description"></p> |
+<div id="console"></div> |
+ |
+<script> |
+description("Test that HKDF does not support methods it should not support."); |
+ |
+jsTestIsAsync = true; |
+ |
+kHkdfKey = "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"; |
+ |
+var extractable = true; |
+Promise.resolve(null).then(function(result) { |
+ // set up the test by creating an HKDF key and an RSA key |
eroman
2015/01/07 01:18:43
indent by 4.
nharper
2015/01/09 22:41:47
Done.
|
+ return crypto.subtle.importKey("raw", hexStringToUint8Array(kHkdfKey), {name: "HKDF"}, extractable, ['deriveKey', 'deriveBits']); |
+}).then(function(result) { |
+ hkdfKey = result; |
+ |
+ debug("\nHKDF does not support exportKey()..."); |
eroman
2015/01/07 01:18:43
Let's sync up with Ryan when he gets back and see
eroman
2015/01/09 03:16:01
I chatted with Ryan and this is fine as is.
My co
|
+ return crypto.subtle.exportKey("raw", hkdfKey); |
+}).then(failAndFinishJSTest, function(result) { |
+ logError(result); |
+ |
+}).then(finishJSTest); |
+ |
+</script> |
+ |
+</body> |
+</html> |