summaryrefslogtreecommitdiff
path: root/BKUAppletExt/src
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-27 17:33:11 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-03-27 17:33:11 +0000
commit616e06910051528674165319a1d6d161dff5859c (patch)
treec5295e32d65bf5895b2b6c1e9662d5fe358091ce /BKUAppletExt/src
parent2a1df5e58e44f8d77f34eb80df74e8c0d27caceb (diff)
downloadmocca-616e06910051528674165319a1d6d161dff5859c.tar.gz
mocca-616e06910051528674165319a1d6d161dff5859c.tar.bz2
mocca-616e06910051528674165319a1d6d161dff5859c.zip
1.1-RC6 (pinpad, pinmgmt, secureviewer)
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@323 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUAppletExt/src')
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java26
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java9
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java2
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java13
-rw-r--r--BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java45
-rw-r--r--BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties6
-rw-r--r--BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties6
7 files changed, 60 insertions, 47 deletions
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java
index 159dd29d..d1ca6c00 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java
@@ -118,18 +118,18 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
pinStatusTable.setDefaultRenderer(PINSpec.class, new PINSpecRenderer());
pinStatusTable.setDefaultRenderer(STATUS.class, new PINStatusRenderer(cardmgmtMessages));
pinStatusTable.setTableHeader(null);
-
- pinStatusTable.addMouseMotionListener(new MouseMotionAdapter() {
-
- @Override
- public void mouseMoved(MouseEvent e) {
- if (pinStatusTable.columnAtPoint(e.getPoint()) == 0) {
- pinStatusTable.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
- } else {
- pinStatusTable.setCursor(Cursor.getDefaultCursor());
- }
- }
- });
+ pinStatusTable.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+// pinStatusTable.addMouseMotionListener(new MouseMotionAdapter() {
+//
+// @Override
+// public void mouseMoved(MouseEvent e) {
+// if (pinStatusTable.columnAtPoint(e.getPoint()) == 0) {
+// pinStatusTable.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+// } else {
+// pinStatusTable.setCursor(Cursor.getDefaultCursor());
+// }
+// }
+// });
final JButton activateButton = new JButton();
activateButton.setFont(activateButton.getFont().deriveFont(activateButton.getFont().getStyle() & ~java.awt.Font.BOLD));
@@ -392,7 +392,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac
if (pinpad) {
JLabel pinpadLabel = new JLabel();
pinpadLabel.setFont(mgmtLabel.getFont().deriveFont(mgmtLabel.getFont().getStyle() & ~Font.BOLD));
- String pinpadPattern = getMessage(MESSAGE_PINPAD);
+ String pinpadPattern = getMessage(MESSAGE_VERIFYPIN_PINPAD);
pinpadLabel.setText(MessageFormat.format(pinpadPattern,
new Object[] { pinSpec.getLocalizedName(), pinSize }));
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java
index 45313f42..f0cc0a27 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java
@@ -40,13 +40,16 @@ public interface PINManagementGUIFacade extends BKUGUIFacade {
public static final String MESSAGE_ACTIVATE_SUCCESS = "activate.success";
public static final String MESSAGE_CHANGE_SUCCESS = "change.success";
public static final String MESSAGE_PINMGMT = "pin.mgmt";
- public static final String MESSAGE_PINPAD = "pinpad";
- public static final String MESSAGE_CHANGEPIN_PINPAD = "pinpad.change";
+// public static final String MESSAGE_PINPAD = "pinpad";
public static final String MESSAGE_ACTIVATE_PIN = "activate.pin";
public static final String MESSAGE_CHANGE_PIN = "change.pin";
public static final String MESSAGE_VERIFY_PIN = "verify.pin";
public static final String MESSAGE_UNBLOCK_PIN = "unblock.pin";
-
+ public static final String MESSAGE_ACTIVATEPIN_PINPAD = "activate.pinpad";
+ public static final String MESSAGE_CHANGEPIN_PINPAD = "change.pinpad";
+ public static final String MESSAGE_VERIFYPIN_PINPAD = "verify.pinpad";
+ public static final String MESSAGE_UNBLOCKPIN_PINPAD = "unblock.pinpad";
+
public static final String LABEL_OLD_PIN = "label.old.pin";
public static final String LABEL_NEW_PIN = "label.new.pin";
public static final String LABEL_REPEAT_PIN = "label.repeat.pin";
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java
index 4cb84b77..83ff74f2 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusRenderer.java
@@ -22,8 +22,6 @@ import java.awt.Color;
import java.awt.Font;
import java.util.ResourceBundle;
import javax.swing.table.DefaultTableCellRenderer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
*
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java
index b0dd8766..d635b8df 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/ManagementPINProviderFactory.java
@@ -19,6 +19,7 @@ package at.gv.egiz.bku.smccstal.ext;
import at.gv.egiz.smcc.ChangePINProvider;
import at.gv.egiz.bku.gui.PINManagementGUIFacade;
+import at.gv.egiz.smcc.ccid.CCID;
import at.gv.egiz.smcc.PINProvider;
import at.gv.egiz.smcc.SignatureCard;
@@ -33,13 +34,13 @@ public abstract class ManagementPINProviderFactory {
public static ManagementPINProviderFactory getInstance(SignatureCard forCard,
PINManagementGUIFacade gui) {
-// if (forCard.ifdSupportsFeature(SignatureCard.FEATURE_VERIFY_PIN_DIRECT)) {
-//// forCard.ifdSupportsFeature(SignatureCard.FEATURE_MODIFY_PIN_DIRECT)
-// return new PinpadPINProviderFactory(gui);
-//
-// } else {
+ if (forCard.getReader().hasFeature(CCID.FEATURE_VERIFY_PIN_DIRECT)) {
+// forCard.ifdSupportsFeature(SignatureCard.FEATURE_MODIFY_PIN_DIRECT)
+ return new PinpadPINProviderFactory(gui);
+
+ } else {
return new SoftwarePINProviderFactory(gui);
-// }
+ }
}
public abstract PINProvider getVerifyPINProvider();
diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java
index 4176e0a9..a9ad5ef8 100644
--- a/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java
+++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/smccstal/ext/PinpadPINProviderFactory.java
@@ -73,23 +73,6 @@ public class PinpadPINProviderFactory extends ManagementPINProviderFactory {
showPinpadPINDialog(retries, spec);
retry = true;
return null;
-
-// gui.showPINDialog(type, spec, (retry) ? retries : -1,
-// this, "exec",
-// this, "back");
-//
-// waitForAction();
-//
-// if ("exec".equals(action)) {
-// gui.showWaitDialog(null);
-// retry = true;
-// return gui.getPin();
-// } else if ("back".equals(action)) {
-// throw new CancelledException();
-// } else {
-// log.error("unsupported command " + action);
-// throw new CancelledException();
-// }
}
/**
@@ -111,14 +94,38 @@ public class PinpadPINProviderFactory extends ManagementPINProviderFactory {
title = BKUGUIFacade.TITLE_RETRY;
message = BKUGUIFacade.MESSAGE_RETRIES;
params = new Object[]{String.valueOf(retries)};
- } else {
- title = BKUGUIFacade.TITLE_SIGN;
+ } else if (type == DIALOG.VERIFY) {
+ title = PINManagementGUIFacade.TITLE_VERIFY_PIN;
message = BKUGUIFacade.MESSAGE_ENTERPIN_PINPAD;
String pinSize = String.valueOf(pinSpec.getMinLength());
if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
pinSize += "-" + pinSpec.getMaxLength();
}
params = new Object[]{pinSpec.getLocalizedName(), pinSize};
+ } else if (type == DIALOG.ACTIVATE) {
+ title = PINManagementGUIFacade.TITLE_ACTIVATE_PIN;
+ message = PINManagementGUIFacade.MESSAGE_ACTIVATEPIN_PINPAD;
+ String pinSize = String.valueOf(pinSpec.getMinLength());
+ if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
+ pinSize += "-" + pinSpec.getMaxLength();
+ }
+ params = new Object[]{pinSpec.getLocalizedName(), pinSize};
+ } else if (type == DIALOG.CHANGE) {
+ title = PINManagementGUIFacade.TITLE_CHANGE_PIN;
+ message = PINManagementGUIFacade.MESSAGE_CHANGEPIN_PINPAD;
+ String pinSize = String.valueOf(pinSpec.getMinLength());
+ if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
+ pinSize += "-" + pinSpec.getMaxLength();
+ }
+ params = new Object[]{pinSpec.getLocalizedName(), pinSize};
+ } else { //if (type == DIALOG.UNBLOCK) {
+ title = PINManagementGUIFacade.TITLE_UNBLOCK_PIN;
+ message = PINManagementGUIFacade.MESSAGE_UNBLOCKPIN_PINPAD;
+ String pinSize = String.valueOf(pinSpec.getMinLength());
+ if (pinSpec.getMinLength() != pinSpec.getMaxLength()) {
+ pinSize += "-" + pinSpec.getMaxLength();
+ }
+ params = new Object[]{pinSpec.getLocalizedName(), pinSize};
}
gui.showMessageDialog(title, message, params);
}
diff --git a/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties b/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties
index 4ceacb21..c6d219d4 100644
--- a/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties
+++ b/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties
@@ -24,12 +24,14 @@ title.change.success=<html>Erfolg</html>
# removed message.* prefix to reuse keys as help keys
pin.mgmt=<html>Die Karte verf\u00FCgt \u00FCber {0} PINs</html>
-pinpad=<html>{0} ({1} stellig) am Kartenleser eingeben und best\u00E4tigen.</html>
-pinpad.change=<html>{0} ({1} stellig) am Kartenleser eingeben und best\u00E4tigen.</html>
activate.pin=<html>{0} eingeben und best\u00E4tigen</html>
change.pin=<html>{0} eingeben und best\u00E4tigen</html>
unblock.pin=<html>PUK zu {0} eingeben</html>
verify.pin=<html>{0} eingeben (TODO: Warning not activated)</html>
+verify.pinpad=<html>{0} ({1} stellig) am Kartenleser eingeben (und best\u00E4tigen).</html>
+activate.pinpad=<html>{0} ({1} stellig) am Kartenleser eingeben und wiederholen (jeweils best\u00E4tigen).</html>
+change.pinpad=<html>Alte {0} ({1} stellig) am Kartenleser eingeben, danach neue {0} eingeben und wiederholen (jeweils best\u00E4tigen). </html>
+unblock.pinpad=<html>{0} ({1} stellig) am Kartenleser eingeben (und best\u00E4tigen).</html>
activate.success=<html>{0} wurde erfolgreich aktiviert.</html>
change.success=<html>{0} wurde erfolgreich ge\u00E4ndert.</html>
diff --git a/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties b/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties
index 9178d65c..b4bededf 100644
--- a/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties
+++ b/BKUAppletExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties
@@ -23,11 +23,13 @@ title.change.success=<html>Success</html>
# removed message.* prefix to reuse keys as help keys
pin.mgmt=<html>The smartcard has {0} PINs</html>
-pinpad=<html>Enter {0} ({1} digits) on pinpad and confirm.</html>
-pinpad.change=<html>Enter {0} ({1} digits) on pinpad and confirm.</html>
activate.pin=<html>Enter and confirm {0}</html>
change.pin=<html>Enter and confirm {0}</html>
unblock.pin=<html>Enter PUK for {0}</html>
+verify.pinpad=<html>Enter {0} ({1} digits) on cardreader (and confirm).</html>
+activate.pinpad=<html>Enter {0} ({1} digits) on cardreader and repeat (confirm in each case).</html>
+change.pinpad=<html>Enter old {0} ({1} digits) on cardreader, then enter new {0} and repeat (confirm in each case).</html>
+unblock.pinpad=<html>Enter {0} ({1} digits) on cardreader (and confirm).</html>
activate.success=<html>{0} successfully activated</html>
change.success=<html>{0} successfully changed</html>