-
Notifications
You must be signed in to change notification settings - Fork 23
/
websocket_smartcard_signer_test_page.html
38 lines (37 loc) · 1.77 KB
/
websocket_smartcard_signer_test_page.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Websocket Smartcard Signer Test Page</title>
<script type="text/javascript" src="./websocket_smartcard_signer_lib.js"></script>
<script type="text/javascript">
function signTest(){
document.getElementById('resultsTxt').value = '';
websocket_smartcard_signer.setLogHandler(function(logData){
document.getElementById('logTxt').value += logData+'\n';
}).cleanData()
.addDataTest()
.addData('secondItem', 'dGVzdA==')
//.cleanDll().addDll('bit4ipki.dll')
.sign(function(signedDataList){
document.getElementById('resultsTxt').value += 'Websocket returned data : ' + JSON.stringify(signedDataList)+'\n';
}, function(errorMessage){
document.getElementById('resultsTxt').value += 'Websocket returned error : ' + errorMessage+'\n';
});
}
</script>
</head>
<body>
<p>Websocket Smartcard Signer Test Page</p>
<ol>
<li>Start the Websocket Smartcard Signer server <a href="websocket_smartcard_signer.jnlp">launching the JNLP here</a> or <a href="websocket_smartcard_signer-jar-with-dependencies.jar">downloading and executing the JAR here</a></li>
<li>Check the presence of a green square in the traybar indicating the websocket server is running</li>
<li>Send an 'Hello World' data to the server to be signed clicking the <input type="button" value="Start" onclick="signTest();"/> button</li>
<li>Visualize the results and the logs in the following text areas</li>
</ol>
<br><b>RESULTS</b><br>
<textarea id="resultsTxt" style="margin: 0px; width: 100%; height: 200px;"></textarea>
<br><b>LOG</b><br>
<textarea id="logTxt" style="margin: 0px; width: 100%; height: 200px;"></textarea>
</body>
</html>