| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../resources/js-test.js"></script> | |
| 5 <script src="resources/common.js"></script> | |
| 6 </head> | |
| 7 <body> | |
| 8 <script> | |
| 9 description("Check that an already imported key with empty usages can be deseria
lized."); | |
| 10 | |
| 11 // It used to be possible to import keys with empty usages, it is possible that | |
| 12 // such keys were persisted to storage. This test verifies that such keys can | |
| 13 // still be successfully de-serialized. | |
| 14 | |
| 15 // The version number of the serialized format used is 7. | |
| 16 | |
| 17 var serializedKey = "ff073f004b010110011030112233445566778899aabbccddeeff"; | |
| 18 | |
| 19 var key = internals.deserializeBuffer(hexStringToUint8Array(serializedKey).buffe
r); | |
| 20 | |
| 21 shouldBeEqualToString("key.type", "secret"); | |
| 22 shouldBeTrue("key.extractable"); | |
| 23 shouldBeEqualToString("key.algorithm.name", "AES-CBC"); | |
| 24 shouldBe("key.usages", "[]"); | |
| 25 | |
| 26 </script> | |
| 27 </body> | |
| 28 </html> | |
| 29 | |
| OLD | NEW |