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

Unified Diff: LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.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-sign-verify.html
diff --git a/LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.html b/LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.html
index 83e17382734f9054e262867b185c25f6b1d29990..78aa725bc748748a0b1c1183e90173bf7329da2c 100644
--- a/LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.html
+++ b/LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.html
@@ -38,10 +38,10 @@ var privateKeyJSON = {
var data = asciiToUint8Array("Hello, world!");
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;
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;
debug("\nSigning some text...");
« no previous file with comments | « LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk-small-key.html ('k') | Source/modules/crypto/SubtleCrypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698