Index: LayoutTests/crypto/ecdh-deriveBits-failures.html |
diff --git a/LayoutTests/crypto/ecdh-deriveBits-failures.html b/LayoutTests/crypto/ecdh-deriveBits-failures.html |
index 07ee8f2c6d2ddb141f7a452fd5d8fac68416ce14..09f7d3759426937ebf44f236cfa7d918a380c959 100644 |
--- a/LayoutTests/crypto/ecdh-deriveBits-failures.html |
+++ b/LayoutTests/crypto/ecdh-deriveBits-failures.html |
@@ -39,51 +39,61 @@ function createTestKeys() { |
createTestKeys().then(function(result) { |
// Bad algorithm parameter (no algorithm name or public key) |
+ debug("\nderiveBits() without algorithm name or public key..."); |
return crypto.subtle.deriveBits({}, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (no public key) |
+ debug("\nderiveBits() without public key..."); |
return crypto.subtle.deriveBits({name: 'ecdh'}, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (null) |
+ debug("\nderiveBits() with algorithm name that is null..."); |
eroman
2014/12/12 19:37:02
"with algorithm that is null"
(the name would be
Paritosh Kumar
2014/12/15 08:21:27
Done.
|
return crypto.subtle.deriveBits(null, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (not an object) |
+ debug("\nderiveBits() with algorithm name that is -1..."); |
eroman
2014/12/12 19:37:02
replace "algorithm name" --> "algorithm"
Paritosh Kumar
2014/12/15 08:21:27
Done.
|
return crypto.subtle.deriveBits(-1, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (public key is null) |
+ debug("\nderiveBits() with public key that is null..."); |
return crypto.subtle.deriveBits({name: 'ecdh', public: null}, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (public key is wrong type) |
+ debug("\nderiveBits() with public key that is -1..."); |
return crypto.subtle.deriveBits({name: 'ecdh', public: -1}, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (public key is wrong type) |
+ debug("\nderiveBits() with public key that is a string..."); |
return crypto.subtle.deriveBits({name: 'ecdh', public: "foo"}, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (public key is for wrong curve) |
+ debug("\nderiveBits() with wrong curve public key..."); |
return crypto.subtle.deriveBits({name: 'ecdh', public: keyPairs.ecdh.p384_1.publicKey}, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (public key is not a public key) |
+ debug("\nderiveBits() with private key as public key..."); |
eroman
2014/12/12 19:37:02
This is a bit hard to read. How about:
deriveBits
|
return crypto.subtle.deriveBits({name: 'ecdh', public: keyPairs.ecdh.p256_2.privateKey}, keyPairs.ecdh.p256_1.privateKey, 256); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |
// Bad algorithm parameter (public key is for ECDSA). |
+ debug("\nderiveBits() with public key that is for ECDSA..."); |
return crypto.subtle.deriveBits({name: 'ecdh', public: keyPairs.ecdsa.p256_1.publicKey}, keyPairs.ecdh.p256_1.privateKey, {test: 3}); |
}).then(failAndFinishJSTest, function(result) { |
logError(result); |