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

Unified Diff: LayoutTests/crypto/rsa-export-private-key.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
« no previous file with comments | « LayoutTests/crypto/rsa-export-key.html ('k') | LayoutTests/crypto/rsa-indexeddb.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/rsa-export-private-key.html
diff --git a/LayoutTests/crypto/rsa-export-private-key.html b/LayoutTests/crypto/rsa-export-private-key.html
index 574b69dfc9a8c8788c83162c34a93cd0dc49e423..ee8af2a5f02b3442969fb1a3f2632891ec9bb993 100644
--- a/LayoutTests/crypto/rsa-export-private-key.html
+++ b/LayoutTests/crypto/rsa-export-private-key.html
@@ -30,10 +30,9 @@ var privateKeyJSON = {
"alg":"RS256",
"kid":"2011-04-29"
}
-var jwkKeyAsArrayBuffer = asciiToUint8Array(JSON.stringify(privateKeyJSON));
debug("\nImporting a JWK key...");
-crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, {name: "RSASSA-PKCS1-v1_5", hash: {name: "sha-256"}}, extractable, ['sign']).then(function(result) {
+crypto.subtle.importKey("jwk", privateKeyJSON, {name: "RSASSA-PKCS1-v1_5", hash: {name: "sha-256"}}, extractable, ['sign']).then(function(result) {
key = result;
debug("\nExporting the key as JWK...");
« no previous file with comments | « LayoutTests/crypto/rsa-export-key.html ('k') | LayoutTests/crypto/rsa-indexeddb.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698