Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys.html

Issue 2289033002: Require extractable=false for KDF import (Closed)
Patch Set: update another test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys.html
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys.html b/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys.html
index 8c846275900d18eea779cb8635010f8c3e456b0e..9531606bb1eeff9ec86e75826479eaa022c6fa13 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys.html
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys.html
@@ -13,7 +13,6 @@ description("Test deriving HKDF keys with deriveKey()");
jsTestIsAsync = true;
-var extractable = true;
var derivingKeyAlgorithm = {
name: "HKDF",
hash: "SHA-256",
@@ -55,12 +54,12 @@ Promise.resolve(null).then(function(result) {
publicKey = result;
debug("Derive an HKDF key from ECDH keys");
- return crypto.subtle.deriveKey({name: "ECDH", namedCurve: "P-256", public: publicKey}, privateKey, "HKDF", true, ['deriveKey', 'deriveBits']);
+ return crypto.subtle.deriveKey({name: "ECDH", namedCurve: "P-256", public: publicKey}, privateKey, "HKDF", false, ['deriveKey', 'deriveBits']);
}).then(function(result) {
hkdfKey = result;
shouldEvaluateAs("hkdfKey.algorithm.name", "HKDF");
- shouldEvaluateAs("hkdfKey.extractable", true);
+ shouldEvaluateAs("hkdfKey.extractable", false);
shouldEvaluateAs("hkdfKey.usages.join(',')", "deriveKey,deriveBits");
debug("\nDerive 128 bits from the HKDF key");
@@ -68,7 +67,7 @@ Promise.resolve(null).then(function(result) {
}).then(function(result) {
derivedBits = result;
- return crypto.subtle.importKey("raw", secret, hkdfAlgorithm, true, ['deriveBits']);
+ return crypto.subtle.importKey("raw", secret, hkdfAlgorithm, false, ['deriveBits']);
}).then(function(hkdfKey) {
return crypto.subtle.deriveBits(hkdfAlgorithm, hkdfKey, 128);
}).then(function(result) {
« no previous file with comments | « components/webcrypto/status.cc ('k') | third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698