OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 |
| 3 <head> |
| 4 <title>Test page for key generation</title> |
| 5 |
| 6 <script> |
| 7 var keygen = false; |
| 8 |
| 9 function runKeygen() { |
| 10 if (window.location.search.indexOf('?') == -1) { |
| 11 document.getElementById('test_form').submit(); |
| 12 } else { |
| 13 // Verify that the form submission includes a generated key. A successful |
| 14 // key generation will send a binary blob starting with 0x30, 0x82, 0x02 |
| 15 // ('MIIC' in base64) to the target. We check whether the GET request |
| 16 // includes this data to determine whether the key generation successfully |
| 17 // occurred. |
| 18 keygen = (window.location.search.indexOf('?key=MIIC') == 0) |
| 19 } |
| 20 } |
| 21 |
| 22 function didKeygen() { |
| 23 return keygen; |
| 24 } |
| 25 </script> |
| 26 </head> |
| 27 |
| 28 <body onload="runKeygen()"> |
| 29 This page tries to use a keygen element when it is loaded. |
| 30 <form id='test_form'> |
| 31 <keygen name='key'> |
| 32 </form> |
| 33 </body> |
| 34 |
| 35 </html> |
OLD | NEW |