From f5de24a8c3a20311fc0b0849a427e780d2fc2325 Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 17 Apr 2009 07:25:16 +0000 Subject: local secureviewer git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@333 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../gv/egiz/bku/smccstal/SignRequestHandler.java | 66 +--------------------- 1 file changed, 3 insertions(+), 63 deletions(-) (limited to 'smccSTAL') diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java index 56fc8804..560f1373 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java @@ -50,9 +50,7 @@ public class SignRequestHandler extends AbstractRequestHandler { private static Log log = LogFactory.getLog(SignRequestHandler.class); private static JAXBContext jaxbContext; -// private PINProviderFactory pinProviderFactory; - private SecureViewer secureViewer; - + static { try { jaxbContext = JAXBContext.newInstance(ObjectFactory.class.getPackage().getName()); @@ -61,6 +59,8 @@ public class SignRequestHandler extends AbstractRequestHandler { } } + protected SecureViewer secureViewer; + public SignRequestHandler(SecureViewer secureViewer) { this.secureViewer = secureViewer; } @@ -142,64 +142,4 @@ public class SignRequestHandler extends AbstractRequestHandler { return true; } -// class SoftwarePinProvider implements PINProvider { -// -// protected SignedInfoType signedInfo; -// protected List hashDataInputs; -// private boolean retry = false; -// -// public SoftwarePinProvider(SignedInfoType signedInfo) { -// this.signedInfo = signedInfo; -// } -// -// private void showSignaturePINDialog(PINSpec spec, int retries) { -// if (retry) { -// gui.showSignaturePINRetryDialog(spec, retries, SignRequestHandler.this, "sign", SignRequestHandler.this, -// "cancel", SignRequestHandler.this, "hashData"); -// } else { -// gui.showSignaturePINDialog(spec, SignRequestHandler.this, "sign", SignRequestHandler.this, "cancel", SignRequestHandler.this, -// "hashData"); -// } -// } -// -// @Override -// public char[] providePIN(PINSpec spec, int retries) -// throws CancelledException, InterruptedException { -// showSignaturePINDialog(spec, retries); -// -// do { -// waitForAction(); -// gui.showWaitDialog(null); -// if (actionCommand.equals("hashData")) { -// -// showSignaturePINDialog(spec, retries); -// -// try { -// displayHashDataInputs(signedInfo.getReference()); -// -// } catch (DigestException ex) { -// log.error("Bad digest value: " + ex.getMessage()); -// gui.showErrorDialog(BKUGUIFacade.ERR_INVALID_HASH, -// new Object[] {ex.getMessage()}, -// SignRequestHandler.this, "error"); -// } catch (Exception ex) { -// log.error("Could not display hashdata inputs: " + -// ex.getMessage()); -// gui.showErrorDialog(BKUGUIFacade.ERR_DISPLAY_HASHDATA, -// new Object[] {ex.getMessage()}, -// SignRequestHandler.this, "error"); -// } -// } else if (actionCommand.equals("sign")) { -// retry = true; -// return gui.getPin(); -// } else if (actionCommand.equals("hashDataDone")) { -// showSignaturePINDialog(spec, retries); -// } else if (actionCommand.equals("cancel") || -// actionCommand.equals("error")) { -// throw new CancelledException(spec.getLocalizedName() + -// " entry cancelled"); -// } -// } while (true); -// } -// } } -- cgit v1.2.3