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

Side by Side Diff: LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk-small-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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 <script src="resources/common.js"></script> 5 <script src="resources/common.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p id="description"></p> 8 <p id="description"></p>
9 <div id="console"></div> 9 <div id="console"></div>
10 10
(...skipping 21 matching lines...) Expand all
32 e: Base64URL.stringify(hexStringToUint8Array("010001")), 32 e: Base64URL.stringify(hexStringToUint8Array("010001")),
33 d: Base64URL.stringify(hexStringToUint8Array("5BA6F4F26B0F36BDB5FA6EBEE6E309 6853259CFBB742B3A7A9A4DADDE0920063EC149929CB3557819A6D824E37E43B04BF323F492FC49A 8028031017B81BECA8EC2A85ABCF193501D80DC251DB8863B8673D8B6772DB2D2AE08CD1829C3F54 2141461CACE4E8A1F112AD13FF4A4DD865A89AEA94E984D487E5798EF07643B9CD")), 33 d: Base64URL.stringify(hexStringToUint8Array("5BA6F4F26B0F36BDB5FA6EBEE6E309 6853259CFBB742B3A7A9A4DADDE0920063EC149929CB3557819A6D824E37E43B04BF323F492FC49A 8028031017B81BECA8EC2A85ABCF193501D80DC251DB8863B8673D8B6772DB2D2AE08CD1829C3F54 2141461CACE4E8A1F112AD13FF4A4DD865A89AEA94E984D487E5798EF07643B9CD")),
34 p: Base64URL.stringify(hexStringToUint8Array("E06BFE5722A68E5D597DD8DB937483 CBA352AB817209275ADAD103772B7A8EF4EA946311A2B51805959818CEB362F257D6998B475FEA9E 34F2A30205B5F5A7FF")), 34 p: Base64URL.stringify(hexStringToUint8Array("E06BFE5722A68E5D597DD8DB937483 CBA352AB817209275ADAD103772B7A8EF4EA946311A2B51805959818CEB362F257D6998B475FEA9E 34F2A30205B5F5A7FF")),
35 q: Base64URL.stringify(hexStringToUint8Array("D1D2DBDB1F4DCBFE8D16CDD2CF83C7 B5FADFC7891F22FC527BF208F81B92F2543569C3AD22224B82D407DEB65F651D09D2558FEE8BC6E5 DA51F6F13206CC1647")), 35 q: Base64URL.stringify(hexStringToUint8Array("D1D2DBDB1F4DCBFE8D16CDD2CF83C7 B5FADFC7891F22FC527BF208F81B92F2543569C3AD22224B82D407DEB65F651D09D2558FEE8BC6E5 DA51F6F13206CC1647")),
36 dp: Base64URL.stringify(hexStringToUint8Array("73ECB4F3D3AD4F6ABEF877D56C84C A339D88ED98AF0C356D040CE58A60462DA42BAC3CC47654AF34EB4226C656F96C8F9D05B1614C158 8657754668E06A0FF87")), 36 dp: Base64URL.stringify(hexStringToUint8Array("73ECB4F3D3AD4F6ABEF877D56C84C A339D88ED98AF0C356D040CE58A60462DA42BAC3CC47654AF34EB4226C656F96C8F9D05B1614C158 8657754668E06A0FF87")),
37 dq: Base64URL.stringify(hexStringToUint8Array("5B9C5ACDB33F3E5FE7AE1B337DD32 5B138D5D7C2F0CB4FAB9BDE333850A1BA183631F5737441D102501D178A3CE062EB54E072B54E660 B19654C12472B5C9425")), 37 dq: Base64URL.stringify(hexStringToUint8Array("5B9C5ACDB33F3E5FE7AE1B337DD32 5B138D5D7C2F0CB4FAB9BDE333850A1BA183631F5737441D102501D178A3CE062EB54E072B54E660 B19654C12472B5C9425")),
38 qi: Base64URL.stringify(hexStringToUint8Array("D6A920B241178923C59BCBD1A8157 64619225A90F2C090A9FBD594A61561542D0DF179590413C26C8A72FC6E14EC63A377169970671B3 A1EB5E4F4DF1A4CA725")) 38 qi: Base64URL.stringify(hexStringToUint8Array("D6A920B241178923C59BCBD1A8157 64619225A90F2C090A9FBD594A61561542D0DF179590413C26C8A72FC6E14EC63A377169970671B3 A1EB5E4F4DF1A4CA725"))
39 }; 39 };
40 40
41 Promise.resolve(null).then(function(result) { 41 Promise.resolve(null).then(function(result) {
42 return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publi cKeyJSON)), {name: 'RSASSA-PKCS1-v1_5', hash: {name: 'sha-256'}}, extractable, [ "verify"]); 42 return crypto.subtle.importKey("jwk", publicKeyJSON, {name: 'RSASSA-PKCS1-v1 _5', hash: {name: 'sha-256'}}, extractable, ["verify"]);
43 }).then(function(result) { 43 }).then(function(result) {
44 key = result; 44 key = result;
45 shouldEvaluateAs("key.algorithm.modulusLength", 1024); 45 shouldEvaluateAs("key.algorithm.modulusLength", 1024);
46 return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(priva teKeyJSON)), {name: 'RSASSA-PKCS1-v1_5', hash: {name: 'sha-512'}}, extractable, ["sign"]); 46 return crypto.subtle.importKey("jwk", privateKeyJSON, {name: 'RSASSA-PKCS1-v 1_5', hash: {name: 'sha-512'}}, extractable, ["sign"]);
47 }).then(function(result) { 47 }).then(function(result) {
48 key = result; 48 key = result;
49 shouldEvaluateAs("key.algorithm.modulusLength", 1024); 49 shouldEvaluateAs("key.algorithm.modulusLength", 1024);
50 }).then(finishJSTest, failAndFinishJSTest); 50 }).then(finishJSTest, failAndFinishJSTest);
51 51
52 </script> 52 </script>
53 53
54 </body> 54 </body>
55 </html> 55 </html>
OLDNEW
« no previous file with comments | « LayoutTests/crypto/rsassa-pkcs1-v1_5-import-jwk.html ('k') | LayoutTests/crypto/rsassa-pkcs1-v1_5-sign-verify.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698