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

Unified Diff: LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html

Issue 336173002: [webcrypto] Require importKey() for JWK to provide data as a Javascript object rather than a JSON a… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update additional tests Created 6 years, 6 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: LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html
diff --git a/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html b/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html
index 2a0cb5e04fc059cd55a4024cbd4b9133971933a7..c0fbd38f13cc81b43e5b0d8001f7c380f8cd102e 100644
--- a/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html
+++ b/LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html
@@ -36,7 +36,7 @@ var privateKeyJSON = {
};
debug("Importing a public key...");
-crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), {name: "RSASSA-PKCS1-v1_5", hash: {name: "sha-256"}}, extractable, ["verify"]).then(function(result) {
+crypto.subtle.importKey("jwk", publicKeyJSON, {name: "RSASSA-PKCS1-v1_5", hash: {name: "sha-256"}}, extractable, ["verify"]).then(function(result) {
publicKey = result;
shouldBe("publicKey.toString()", "'[object Key]'");
shouldBe("publicKey.type", "'public'");
@@ -46,7 +46,7 @@ crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)),
shouldBe("bytesToHexString(publicKey.algorithm.publicExponent)", "'010001'");
shouldBe("publicKey.algorithm.hash.name", "'SHA-256'");
debug("\nImporting a private key...");
- return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), {name: "RSASSA-PKCS1-v1_5", hash: {name: "sha-256"}}, extractable, ["sign"]);
+ return crypto.subtle.importKey("jwk", privateKeyJSON, {name: "RSASSA-PKCS1-v1_5", hash: {name: "sha-256"}}, extractable, ["sign"]);
}).then(function(result) {
privateKey = result;
shouldBe("privateKey.toString()", "'[object Key]'");
« no previous file with comments | « LayoutTests/crypto/rsa-oaep-wrap-unwrap-aes.html ('k') | LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk-small-key.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698