| OLD | NEW |
| 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 <script src="resources/keys.js"></script> | 6 <script src="resources/keys.js"></script> |
| 7 </head> | 7 </head> |
| 8 <body> | 8 <body> |
| 9 <p id="description"></p> | 9 <p id="description"></p> |
| 10 <div id="console"></div> | 10 <div id="console"></div> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 var usages = ['encrypt']; | 42 var usages = ['encrypt']; |
| 43 var extractable = false; | 43 var extractable = false; |
| 44 var algorithm = {name: 'RSAES-PKCS1-v1_5'}; | 44 var algorithm = {name: 'RSAES-PKCS1-v1_5'}; |
| 45 | 45 |
| 46 return crypto.subtle.importKey('pkcs8', keyData, algorithm, extractable, usa
ges); | 46 return crypto.subtle.importKey('pkcs8', keyData, algorithm, extractable, usa
ges); |
| 47 } | 47 } |
| 48 | 48 |
| 49 importUnextractableAesKey().then(function(key) { | 49 importUnextractableAesKey().then(function(key) { |
| 50 return crypto.subtle.exportKey('raw', key); | 50 return crypto.subtle.exportKey('raw', key); |
| 51 }).then(failAndFinishJSTest, function(result) { | 51 }).then(failAndFinishJSTest, function(result) { |
| 52 error = result; | 52 logError(result); |
| 53 shouldBeNull("error"); | |
| 54 | 53 |
| 55 return importUnextractableHmacKey(); | 54 return importUnextractableHmacKey(); |
| 56 }).then(function(key) { | 55 }).then(function(key) { |
| 57 return crypto.subtle.exportKey('raw', key); | 56 return crypto.subtle.exportKey('raw', key); |
| 58 }).then(failAndFinishJSTest, function(result) { | 57 }).then(failAndFinishJSTest, function(result) { |
| 59 error = result; | 58 logError(result); |
| 60 shouldBeNull("error"); | |
| 61 | 59 |
| 62 return importUnextractableRsaPrivateKey(); | 60 return importUnextractableRsaPrivateKey(); |
| 63 }).then(function(key) { | 61 }).then(function(key) { |
| 64 return crypto.subtle.exportKey('pkcs8', key); | 62 return crypto.subtle.exportKey('pkcs8', key); |
| 65 }).then(failAndFinishJSTest, function(result) { | 63 }).then(failAndFinishJSTest, function(result) { |
| 66 error = result; | 64 logError(result); |
| 67 | |
| 68 shouldBeNull("error"); | |
| 69 }).then(finishJSTest, failAndFinishJSTest); | 65 }).then(finishJSTest, failAndFinishJSTest); |
| 70 | 66 |
| 71 </script> | 67 </script> |
| 72 | 68 |
| 73 </body> | 69 </body> |
| 74 </html> | 70 </html> |
| OLD | NEW |