-
Notifications
You must be signed in to change notification settings - Fork 0
/
verifierJNLP.php
49 lines (43 loc) · 1.63 KB
/
verifierJNLP.php
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
39
40
41
42
43
44
45
46
47
48
49
<?php
session_start();
if(isset($_REQUEST['clientData'])){
$verifierAppData = $_REQUEST['clientData'];
$clientName = $verifierAppData[0] . " " . $verifierAppData[1];
$threshold = $verifierAppData[2];
$balance = $verifierAppData[3];
$userId = $verifierAppData[4];
$verificationId = $verifierAppData[5];
$jnlpFile = fopen("verifierApp.jnlp", "w");
$jnlpContents = '<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost/everify/" href="verifierApp.jnlp">
<information>
<title>Paillier Encrypter</title>
<vendor>eVERIFY</vendor>
<homepage href="http://localhost/everify/" />
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.7+" />
<jar href="paillierDecrypter.jar" />
</resources>
<application-desc main-class="verifierPackage.SwingApp">
<argument>' . $clientName . '</argument>
<argument>' . $threshold . '</argument>
<argument>' . $balance . '</argument>
<argument>' . $userId . '</argument>
<argument>' . $verificationId . '</argument>
</application-desc>
<update check="always" policy="prompt-update" />
</jnlp>';
fwrite($jnlpFile, $jnlpContents);
fclose($jnlpFile);
/*
Redirect on AJAX return
header('Location: verifierApp.jnlp');
*/
} else {
header('Location: newVerifications.php');
}
?>