summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-18 22:27:28 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-18 22:27:28 +0000
commit2a1df5e58e44f8d77f34eb80df74e8c0d27caceb (patch)
tree5603a81674a1fe60373ba0a3ca37b03473eeb92a /BKUApplet/src/main/java
parent2f49ed7ea3649a51a9457b99004c8cb0ca443432 (diff)
downloadmocca-2a1df5e58e44f8d77f34eb80df74e8c0d27caceb.tar.gz
mocca-2a1df5e58e44f8d77f34eb80df74e8c0d27caceb.tar.bz2
mocca-2a1df5e58e44f8d77f34eb80df74e8c0d27caceb.zip
1.1-rc5 (pinProviderFactories, gui refactoring, signatureCard, secureViewer)
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@322 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
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>();