summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'BKUApplet/src/main/java')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java5
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java (renamed from BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHashDataDisplay.java)20
2 files changed, 15 insertions, 10 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
index eb6cf30b..9b9735f6 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
@@ -60,14 +60,15 @@ public class AppletBKUWorker extends AbstractBKUWorker implements Runnable {
@Override
public void run() {
- gui.showWelcomeDialog();
+ gui.showMessageDialog(BKUGUIFacade.TITLE_WELCOME,
+ BKUGUIFacade.MESSAGE_WELCOME);
try {
STALPortType stalPort = applet.getSTALPort();
STALTranslator stalTranslator = applet.getSTALTranslator();
addRequestHandler(SignRequest.class,
- new AppletHashDataDisplay(stalPort, sessionId));
+ new AppletSecureViewer(stalPort, sessionId));
GetNextRequestResponseType nextRequestResp = stalPort.connect(sessionId);
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHashDataDisplay.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java
index 2ed9aa5b..e2551e2d 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHashDataDisplay.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java
@@ -16,6 +16,7 @@
*/
package at.gv.egiz.bku.online.applet;
+import at.gv.egiz.bku.smccstal.SecureViewer;
import java.security.DigestException;
import java.security.MessageDigest;
import java.util.ArrayList;
@@ -45,13 +46,13 @@ import java.security.NoSuchAlgorithmException;
*
* @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
*/
-public class AppletHashDataDisplay extends SignRequestHandler {
+public class AppletSecureViewer extends SignRequestHandler {
- private static final Log log = LogFactory.getLog(AppletHashDataDisplay.class);
+ private static final Log log = LogFactory.getLog(AppletSecureViewer.class);
protected STALPortType stalPort;
protected String sessId;
- public AppletHashDataDisplay(STALPortType stalPort, String sessId) {
+ public AppletSecureViewer(STALPortType stalPort, String sessId) {
if (stalPort == null || sessId == null) {
throw new NullPointerException("STAL port must not be null");
}
@@ -66,13 +67,14 @@ public class AppletHashDataDisplay extends SignRequestHandler {
* @throws java.lang.Exception
*/
@Override
- public void displayHashDataInputs(List<ReferenceType> signedReferences) throws DigestException, Exception {
+ public void displayDataToBeSigned(List<ReferenceType> signedReferences)
+ throws DigestException, Exception {
- List<GetHashDataInputResponseType.Reference> hdi = getHashDataInput(signedReferences);
+ List<GetHashDataInputResponseType.Reference> hdi = getHashDataInput(signedReferences);
List<HashDataInput> verifiedHashDataInputs = verifyHashDataInput(signedReferences, hdi);
if (verifiedHashDataInputs.size() > 0) {
- gui.showHashDataInputDialog(verifiedHashDataInputs, this, "hashDataDone");
+ gui.showSecureViewer(verifiedHashDataInputs, this, "hashDataDone");
} else {
throw new Exception("No signature data (apart from any QualifyingProperties or a Manifest)");
}
@@ -84,7 +86,8 @@ public class AppletHashDataDisplay extends SignRequestHandler {
* @return
* @throws at.gv.egiz.stal.service.GetHashDataInputFault
*/
- private List<GetHashDataInputResponseType.Reference> getHashDataInput(List<ReferenceType> signedReferences) throws GetHashDataInputFault, Exception {
+ private List<GetHashDataInputResponseType.Reference> getHashDataInput(List<ReferenceType> signedReferences)
+ throws GetHashDataInputFault, Exception {
GetHashDataInputType request = new GetHashDataInputType();
request.setSessionId(sessId);
@@ -129,7 +132,8 @@ public class AppletHashDataDisplay extends SignRequestHandler {
* @throws java.security.NoSuchAlgorithmException
* @throws Exception if no hashdata input is provided for a signed reference
*/
- private List<HashDataInput> verifyHashDataInput(List<ReferenceType> signedReferences, List<GetHashDataInputResponseType.Reference> hashDataInputs) throws DigestException, NoSuchAlgorithmException, Exception {
+ private List<HashDataInput> verifyHashDataInput(List<ReferenceType> signedReferences, List<GetHashDataInputResponseType.Reference> hashDataInputs)
+ throws DigestException, NoSuchAlgorithmException, Exception {
ArrayList<HashDataInput> verifiedHashDataInputs = new ArrayList<HashDataInput>();