diff options
author | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-01-05 10:06:47 +0000 |
---|---|---|
committer | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-01-05 10:06:47 +0000 |
commit | 3da4655d011dfc2f04f9e4ac28b38aee42d01bc0 (patch) | |
tree | d9b524ca4ccfd6e48573dfecf5191ccba48278af /BKUGuiExt/src | |
parent | ecc11bdb13ae27385486ad1c944ee01ffd0440e7 (diff) | |
download | mocca-3da4655d011dfc2f04f9e4ac28b38aee42d01bc0.tar.gz mocca-3da4655d011dfc2f04f9e4ac28b38aee42d01bc0.tar.bz2 mocca-3da4655d011dfc2f04f9e4ac28b38aee42d01bc0.zip |
Features
[#437] Handle pinpad [64:03] response apdu correctly
[#445] pin entry feedback for VERIFY_PIN_START/FINISH
[#471] Provide SecureViewer Link before Pinpad PinEntry timeout starts
Bugs
[#479] PIN Managment Applet allows unmatching new pin and pin confirmation
[#480] PIN Management displays blocked PINs as ACTIVE
[#486] Not possible to select 3 times in series the same item from signedReferencesList for display in secureViewer
[#506] change pin dialog (gui) issues
[#508] e-card G3 PIN activation (with TransportPIN) not supported
[#509] closing secure viewer window (WINDOW_CLOSING) leaves "signature data is displayed in viewer" dialog in applet
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@565 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUGuiExt/src')
6 files changed, 421 insertions, 88 deletions
diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/ComparePinDocument.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/ComparePinDocument.java new file mode 100644 index 00000000..623f6fad --- /dev/null +++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/ComparePinDocument.java @@ -0,0 +1,102 @@ +/* + * Copyright 2008 Federal Chancellery Austria and + * Graz University of Technology + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package at.gv.egiz.bku.gui; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.swing.JButton; +import javax.swing.text.AttributeSet; +import javax.swing.text.BadLocationException; +import javax.swing.text.Document; +import javax.swing.text.PlainDocument; + +/** + * Checks if the pin confirmation (compareTo) corresponds to this pin. + * Additionally, checks if currentPIN (optional) meets the requirements before enabling the OK button. + * @author clemens + */ +class ComparePinDocument extends PlainDocument { + + private static final long serialVersionUID = 1L; + protected Pattern pinPattern; + protected int minLength; + protected int maxLength; + protected JButton enterButton; + protected Document compareTo; + protected Document currentPIN; + + /** + * Constructor without compareTo Document parameter (allow null and set later to avoid cyclic dependencies) + */ + public ComparePinDocument(int minLength, int maxLength, String pattern, JButton enterButton) { + if (enterButton == null) { + throw new NullPointerException("OK button null"); + } + if (pattern != null) { + pinPattern = Pattern.compile(pattern); + } else { + pinPattern = Pattern.compile("."); + } + this.minLength = minLength; + this.maxLength = maxLength; + this.enterButton = enterButton; + } + + /** + * @param compareTo should not be null (allow null and set later to avoid cyclic dependencies) + */ + public ComparePinDocument(int minLength, int maxLength, String pattern, + JButton enterButton, Document compareTo) { + this(minLength, maxLength, pattern, enterButton); + this.compareTo = compareTo; + } + + public ComparePinDocument(int minLength, int maxLength, String pattern, + JButton enterButton, Document compareTo, Document currentPIN) { + this(minLength, maxLength, pattern, enterButton, compareTo); + this.currentPIN = currentPIN; + } + + @Override + public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { + if (maxLength < 0 || maxLength >= (getLength() + str.length())) { + boolean matches = true; + for (int i = 0; i < str.length(); i++) { + Matcher m = pinPattern.matcher(str.substring(i, i + 1)); + if (!m.matches()) { + matches = false; + } + } + if (matches) { + super.insertString(offs, str, a); + enterButton.setEnabled( + getLength() >= minLength + && (currentPIN == null || currentPIN.getLength() >= minLength) + && compareTo.getText(0, compareTo.getLength()).equals(getText(0, getLength()))); + } + } + } + + @Override + public void remove(int offs, int len) throws BadLocationException { + super.remove(offs, len); + enterButton.setEnabled( + getLength() >= minLength + && (currentPIN == null || currentPIN.getLength() >= minLength) + && compareTo.getText(0, compareTo.getLength()).equals(getText(0, getLength()))); + } +} diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/ExtendedPinDocument.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/ExtendedPinDocument.java new file mode 100644 index 00000000..3a0d7a66 --- /dev/null +++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/ExtendedPinDocument.java @@ -0,0 +1,108 @@ +/* + * Copyright 2008 Federal Chancellery Austria and + * Graz University of Technology + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package at.gv.egiz.bku.gui; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.swing.JButton; +import javax.swing.text.AttributeSet; +import javax.swing.text.BadLocationException; +import javax.swing.text.Document; +import javax.swing.text.PlainDocument; + +/** + * This PINDocument also checks if the additional (optional) pinDocuments also meet the requirements + * to enable the OK button. + * Checks if (optional) newPIN and confirmPIN correspond + * + * @author clemens + */ +class ExtendedPinDocument extends PlainDocument { + + private static final long serialVersionUID = 1L; + protected Pattern pinPattern; + protected int minLength; + protected int maxLength; + protected JButton enterButton; + protected Document newPIN; + protected Document confirmPIN; + + public ExtendedPinDocument(int minLength, int maxLength, String pattern, JButton enterButton) { + if (enterButton == null) { + throw new NullPointerException("OK Button null"); + } + if (pattern != null) { + pinPattern = Pattern.compile(pattern); + } else { + pinPattern = Pattern.compile("."); + } + this.minLength = minLength; + this.maxLength = maxLength; + this.enterButton = enterButton; + } + + /** + * @param pinSpec + * @param enterButton + * @param newPIN, confirmPIN + */ + public ExtendedPinDocument(int minLength, int maxLength, String pattern, JButton enterButton, Document newPIN, Document confirmPIN) { + this(minLength, maxLength, pattern, enterButton); + this.newPIN = newPIN; + this.confirmPIN = confirmPIN; + } + + @Override + public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { + if (maxLength < 0 || maxLength >= (getLength() + str.length())) { + boolean matches = true; + for (int i = 0; i < str.length(); i++) { + Matcher m = pinPattern.matcher(str.substring(i, i + 1)); + if (!m.matches()) { + matches = false; + } + } + if (matches) { + super.insertString(offs, str, a); + enterButton.setEnabled( + getLength() >= minLength + && (newPIN == null || newPIN.getLength() >= minLength) + && (confirmPIN == null || compare())); + } + } + } + + @Override + public void remove(int offs, int len) throws BadLocationException { + super.remove(offs, len); + enterButton.setEnabled( + getLength() >= minLength + && (newPIN == null || newPIN.getLength() >= minLength) + && (confirmPIN == null || compare())); + } + + /** + * assume confirmPIN != null + * @return + */ + private boolean compare() throws BadLocationException { + if (newPIN != null) { + return confirmPIN.getText(0, confirmPIN.getLength()).equals(newPIN.getText(0, newPIN.getLength())); + } + return false; + } +} diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java index 5bbed096..4dcc388f 100644 --- a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java +++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java @@ -239,23 +239,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac } @Override - public void showPINDialog(DIALOG type, PINSpec pinSpec, - ActionListener okListener, String okCommand, - ActionListener cancelListener, String cancelCommand) { - showPINDialog(type, pinSpec, -1, false, - okListener, okCommand, cancelListener, cancelCommand); - } - - @Override - public void showPINDialog(DIALOG type, PINSpec pinSpec, int retries, - ActionListener okListener, String okCommand, - ActionListener cancelListener, String cancelCommand) { - showPINDialog(type, pinSpec, retries, false, - okListener, okCommand, cancelListener, cancelCommand); - } - - @Override - public void showPinpadPINDialog(DIALOG type, PINSpec pinSpec, int retries) { + public void showModifyPINDirect(DIALOG type, PINSpec pinSpec, int retries) { String title, msg; Object[] params; if (retries < 0) { @@ -269,19 +253,19 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac if (type == DIALOG.CHANGE) { log.debug("show change pin dialog"); title = TITLE_CHANGE_PIN; - msg = MESSAGE_CHANGEPIN_PINPAD; + msg = MESSAGE_CHANGE_PINPAD_DIREKT; } else if (type == DIALOG.ACTIVATE) { log.debug("show activate pin dialog"); title = TITLE_ACTIVATE_PIN; - msg = MESSAGE_ENTERPIN_PINPAD; + msg = MESSAGE_ACTIVATE_PINPAD_DIREKT; } else if (type == DIALOG.VERIFY) { log.debug("show verify pin dialog"); - title = TITLE_VERIFY_PIN; - msg = MESSAGE_ENTERPIN_PINPAD; + title = TITLE_VERIFY_PINPAD; + msg = MESSAGE_ENTERPIN_PINPAD_DIRECT; } else { log.debug("show unblock pin dialog"); title = TITLE_UNBLOCK_PIN; - msg = MESSAGE_ENTERPIN_PINPAD; + msg = MESSAGE_UNBLOCK_PINPAD_DIREKT; } } else { @@ -294,6 +278,15 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac showMessageDialog(title, msg, params); } + @Override + public void showPINDialog(DIALOG type, PINSpec pinSpec, int retries, + ActionListener okListener, String okCommand, + ActionListener cancelListener, String cancelCommand) { + showPINDialog(type, pinSpec, retries, false, + okListener, okCommand, cancelListener, cancelCommand); + } + + private void showPINDialog(final DIALOG type, final PINSpec pinSpec, final int retries, final boolean pinpad, final ActionListener okListener, final String okCommand, @@ -322,7 +315,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac } else if (type == DIALOG.VERIFY) { log.debug("show verify pin dialog"); TITLE = TITLE_VERIFY_PIN; - MESSAGE_MGMT = MESSAGE_VERIFY_PIN; + MESSAGE_MGMT = MESSAGE_ENTERPIN; } else { log.debug("show unblock pin dialog"); TITLE = TITLE_UNBLOCK_PIN; @@ -393,7 +386,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_VERIFYPIN_PINPAD); + String pinpadPattern = getMessage(MESSAGE_ENTERPIN_PINPAD); pinpadLabel.setText(MessageFormat.format(pinpadPattern, new Object[] { pinSpec.getLocalizedName(), pinSpec.getLocalizedLength() })); @@ -403,7 +396,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac .addComponent(pinpadLabel); } else { - JButton okButton = new JButton(); + final JButton okButton = new JButton(); okButton.setFont(okButton.getFont().deriveFont(okButton.getFont().getStyle() & ~Font.BOLD)); okButton.setText(getMessage(BUTTON_OK)); okButton.setEnabled(pinSpec.getMinLength() <= 0); @@ -414,7 +407,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac JLabel repeatPinLabel = null; JLabel pinLabel = new JLabel(); pinLabel.setFont(pinLabel.getFont().deriveFont(pinLabel.getFont().getStyle() & ~Font.BOLD)); - String pinLabelPattern = (type == DIALOG.CHANGE) ? getMessage(LABEL_NEW_PIN) : getMessage(LABEL_PIN); + String pinLabelPattern = (type == DIALOG.CHANGE || type == DIALOG.UNBLOCK) ? getMessage(LABEL_NEW_PIN) : getMessage(LABEL_PIN); pinLabel.setText(MessageFormat.format(pinLabelPattern, new Object[]{pinSpec.getLocalizedName()})); final JPasswordField repeatPinField = new JPasswordField(); @@ -436,8 +429,6 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac }); if (type != DIALOG.VERIFY) { - pinField.setDocument( - new PINDocument(pinSpec.getRecMinLength(), pinSpec.getRecMaxLength(), pinSpec.getRexepPattern(), null)); repeatPinLabel = new JLabel(); repeatPinLabel.setFont(pinLabel.getFont()); String repeatPinLabelPattern = getMessage(LABEL_REPEAT_PIN); @@ -449,22 +440,20 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac @Override public void actionPerformed(ActionEvent e) { - if (pinField.getPassword().length >= pinSpec.getMinLength()) { + if (okButton.isEnabled()) { okListener.actionPerformed(e); } } }); - if (type == DIALOG.CHANGE) { + if (type == DIALOG.CHANGE || type == DIALOG.UNBLOCK) { oldPinLabel = new JLabel(); oldPinLabel.setFont(oldPinLabel.getFont().deriveFont(oldPinLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); - String oldPinLabelPattern = getMessage(LABEL_OLD_PIN); + String oldPinLabelPattern = getMessage((type == DIALOG.CHANGE) ? LABEL_OLD_PIN : LABEL_PUK); oldPinLabel.setText(MessageFormat.format(oldPinLabelPattern, new Object[]{pinSpec.getLocalizedName()})); oldPinField = new JPasswordField(); oldPinField.setText(""); - oldPinField.setDocument( - new PINDocument(pinSpec.getMinLength(), pinSpec.getMaxLength(), pinSpec.getRexepPattern(), null)); oldPinField.setActionCommand(okCommand); oldPinField.addActionListener(new ActionListener() { @@ -476,16 +465,45 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac } }); - repeatPinField.setDocument( - new PINDocument(pinSpec.getRecMinLength(), pinSpec.getRecMaxLength(), pinSpec.getRexepPattern(), - okButton, pinField.getDocument(), oldPinField.getDocument())); + ExtendedPinDocument oldPinDocument = + new ExtendedPinDocument(pinSpec.getMinLength(), pinSpec.getMaxLength(), + pinSpec.getRexepPattern(), okButton); + ComparePinDocument newPinDocument = + new ComparePinDocument(pinSpec.getRecMinLength(), pinSpec.getRecMaxLength(), pinSpec.getRexepPattern(), + okButton); + ComparePinDocument confirmPinDocument = + new ComparePinDocument(pinSpec.getRecMinLength(), pinSpec.getRecMaxLength(), pinSpec.getRexepPattern(), + okButton); + + oldPinDocument.newPIN = newPinDocument; + oldPinDocument.confirmPIN = confirmPinDocument; + + newPinDocument.compareTo = confirmPinDocument; + newPinDocument.currentPIN = oldPinDocument; + confirmPinDocument.compareTo = newPinDocument; + confirmPinDocument.currentPIN = oldPinDocument; + + oldPinField.setDocument(oldPinDocument); + pinField.setDocument(newPinDocument); + repeatPinField.setDocument(confirmPinDocument); + } else { // else -> ACTIVATE (not verify, not change) - repeatPinField.setDocument( - new PINDocument(pinSpec.getRecMinLength(), pinSpec.getRecMaxLength(), pinSpec.getRexepPattern(), - okButton, pinField.getDocument())); + ComparePinDocument newPinDocument = + new ComparePinDocument(pinSpec.getRecMinLength(), pinSpec.getRecMaxLength(), pinSpec.getRexepPattern(), + okButton); + ComparePinDocument confirmPinDocument = + new ComparePinDocument(pinSpec.getRecMinLength(), pinSpec.getRecMaxLength(), pinSpec.getRexepPattern(), + okButton); + + newPinDocument.compareTo = confirmPinDocument; + confirmPinDocument.compareTo = newPinDocument; + + pinField.setDocument(newPinDocument); + repeatPinField.setDocument(confirmPinDocument); } } else { + // VERIFY pinField.setDocument( new PINDocument(pinSpec.getMinLength(), pinSpec.getMaxLength(), pinSpec.getRexepPattern(), okButton)); } @@ -534,7 +552,7 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac // } else { - if (type == DIALOG.CHANGE) { + if (type == DIALOG.CHANGE || type == DIALOG.UNBLOCK) { pinHorizontal .addGroup(mainPanelLayout.createSequentialGroup() .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) @@ -675,4 +693,69 @@ public class PINManagementGUI extends CardMgmtGUI implements PINManagementGUIFac return bs; } + @Override + public void showEnterCurrentPIN(DIALOG type, PINSpec pinSpec, int retries) { + String title, message; +// Object[] params = null; + + if (type == PINManagementGUIFacade.DIALOG.VERIFY) { + title = PINManagementGUIFacade.TITLE_VERIFY_PINPAD; + message = BKUGUIFacade.MESSAGE_ENTERPIN_PINPAD; +// params = new Object[]{pinSpec.getLocalizedName(), pinSpec.getLocalizedLength()}; + } else if (type == PINManagementGUIFacade.DIALOG.ACTIVATE) { + title = PINManagementGUIFacade.TITLE_ACTIVATE_PIN; + message = PINManagementGUIFacade.MESSAGE_ACTIVATE_PINPAD_CURRENT; +// params = new Object[]{pinSpec.getLocalizedName(), pinSpec.getLocalizedLength()}; + } else if (type == PINManagementGUIFacade.DIALOG.CHANGE) { + title = PINManagementGUIFacade.TITLE_CHANGE_PIN; + message = PINManagementGUIFacade.MESSAGE_CHANGE_PINPAD_CURRENT; +// params = new Object[]{pinSpec.getLocalizedName(), pinSpec.getLocalizedLength()}; + } else { //if (type == DIALOG.UNBLOCK) { + title = PINManagementGUIFacade.TITLE_UNBLOCK_PIN; + message = PINManagementGUIFacade.MESSAGE_UNBLOCK_PINPAD_CURRENT; +// params = new Object[]{pinSpec.getLocalizedName(), pinSpec.getLocalizedLength()}; + } + showEnterPIN(pinSpec, retries, title, message, null); + } + + @Override + public void showEnterNewPIN(DIALOG type, PINSpec pinSpec) { + String title, message; + if (type == PINManagementGUIFacade.DIALOG.ACTIVATE) { + title = PINManagementGUIFacade.TITLE_ACTIVATE_PIN; + message = PINManagementGUIFacade.MESSAGE_ACTIVATE_PINPAD_NEW; + } else if (type == PINManagementGUIFacade.DIALOG.CHANGE) { + title = PINManagementGUIFacade.TITLE_CHANGE_PIN; + message = PINManagementGUIFacade.MESSAGE_CHANGE_PINPAD_NEW; + } else if (type == DIALOG.UNBLOCK) { + title = PINManagementGUIFacade.TITLE_UNBLOCK_PIN; + message = PINManagementGUIFacade.MESSAGE_UNBLOCK_PINPAD_NEW; + } else { + log.error("enterNewPIN not supported for dialog type " + type); + showErrorDialog(ERR_UNKNOWN, null); + return; + } + showEnterPIN(pinSpec, -1, title, message, null); + } + + @Override + public void showConfirmNewPIN(DIALOG type, PINSpec pinSpec) { + String title, message; + if (type == PINManagementGUIFacade.DIALOG.ACTIVATE) { + title = PINManagementGUIFacade.TITLE_ACTIVATE_PIN; + message = PINManagementGUIFacade.MESSAGE_ACTIVATE_PINPAD_CONFIRM; + } else if (type == PINManagementGUIFacade.DIALOG.CHANGE) { + title = PINManagementGUIFacade.TITLE_CHANGE_PIN; + message = PINManagementGUIFacade.MESSAGE_CHANGE_PINPAD_CONFIRM; + } else if (type == DIALOG.UNBLOCK) { + title = PINManagementGUIFacade.TITLE_UNBLOCK_PIN; + message = PINManagementGUIFacade.MESSAGE_UNBLOCK_PINPAD_CONFIRM; + } else { + log.error("enterNewPIN not supported for dialog type " + type); + showErrorDialog(ERR_UNKNOWN, null); + return; + } + showEnterPIN(pinSpec, -1, title, message, null); + } + } diff --git a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java index f99bcfd1..46ae18b9 100644 --- a/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java +++ b/BKUGuiExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java @@ -32,26 +32,39 @@ public interface PINManagementGUIFacade extends BKUGUIFacade { public static final String TITLE_PINMGMT = "title.pin.mgmt"; public static final String TITLE_ACTIVATE_PIN = "title.activate.pin"; public static final String TITLE_CHANGE_PIN = "title.change.pin"; - public static final String TITLE_VERIFY_PIN = "title.verify.pin"; +// public static final String TITLE_VERIFY_PIN = "title.verify.pin"; public static final String TITLE_UNBLOCK_PIN = "title.unblock.pin"; public static final String TITLE_ACTIVATE_SUCCESS = "title.activate.success"; + public static final String TITLE_UNBLOCK_SUCCESS = "title.unblock.success"; public static final String TITLE_CHANGE_SUCCESS = "title.change.success"; // removed message.* prefix to reuse keys as help keys public static final String MESSAGE_ACTIVATE_SUCCESS = "activate.success"; public static final String MESSAGE_CHANGE_SUCCESS = "change.success"; + public static final String MESSAGE_UNBLOCK_SUCCESS = "unblock.success"; public static final String MESSAGE_PINMGMT = "pin.mgmt"; // 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 MESSAGE_ACTIVATE_PINPAD_CURRENT = "activate.pinpad.current"; + public static final String MESSAGE_CHANGE_PINPAD_CURRENT = "change.pinpad.current"; + public static final String MESSAGE_UNBLOCK_PINPAD_CURRENT = "unblock.pinpad.current"; + public static final String MESSAGE_ACTIVATE_PINPAD_NEW = "activate.pinpad.new"; + public static final String MESSAGE_CHANGE_PINPAD_NEW = "change.pinpad.new"; + public static final String MESSAGE_UNBLOCK_PINPAD_NEW = "unblock.pinpad.new"; + public static final String MESSAGE_ACTIVATE_PINPAD_CONFIRM = "activate.pinpad.confirm"; + public static final String MESSAGE_CHANGE_PINPAD_CONFIRM = "change.pinpad.confirm"; + public static final String MESSAGE_UNBLOCK_PINPAD_CONFIRM = "unblock.pinpad.confirm"; + + public static final String MESSAGE_ACTIVATE_PINPAD_DIREKT = "activate.pinpad.direct"; + public static final String MESSAGE_CHANGE_PINPAD_DIREKT = "change.pinpad.direct"; + public static final String MESSAGE_UNBLOCK_PINPAD_DIREKT = "unblock.pinpad.direct"; public static final String LABEL_OLD_PIN = "label.old.pin"; + public static final String LABEL_PUK = "label.puk"; public static final String LABEL_NEW_PIN = "label.new.pin"; public static final String LABEL_REPEAT_PIN = "label.repeat.pin"; @@ -81,35 +94,34 @@ public interface PINManagementGUIFacade extends BKUGUIFacade { public enum STATUS { ACTIV, NOT_ACTIV, BLOCKED, UNKNOWN }; public enum DIALOG { VERIFY, ACTIVATE, CHANGE, UNBLOCK }; + /** + * list pins + */ public void showPINManagementDialog(Map<PINSpec, STATUS> pins, ActionListener activateListener, String activateCmd, String changeCmd, String unblockCmd, String verifyCmd, ActionListener cancelListener, String cancelCmd); - public void showPINDialog(DIALOG type, PINSpec pin, + /** + * "software" pin-entry dialog (activate, change, unblock, verify) + */ + public void showPINDialog(DIALOG type, PINSpec pinSpec, int retries, ActionListener okListener, String okCmd, ActionListener cancelListener, String cancelCmd); - public void showPINDialog(DIALOG type, PINSpec pin, int retries, - ActionListener okListener, String okCmd, - ActionListener cancelListener, String cancelCmd); + /** + * <b>direct</b> pinpad pin-entry dialog + */ + public void showModifyPINDirect(DIALOG type, PINSpec pinSpec, int retries); + + /** + * <b>start/finish</b> pinpad pin-entry dialog + */ + public void showEnterCurrentPIN(DIALOG type, PINSpec pinSpec, int retries); + + public void showEnterNewPIN(DIALOG type, PINSpec pinSpec); + + public void showConfirmNewPIN(DIALOG type, PINSpec pinSpec); - public void showPinpadPINDialog(DIALOG type, PINSpec pin, int retries); - -// public void showActivatePINDialog(PINSpec pin, -// ActionListener okListener, String okCmd, -// ActionListener cancelListener, String cancelCmd); -// -// public void showChangePINDialog(PINSpec pin, -// ActionListener okListener, String okCmd, -// ActionListener cancelListener, String cancelCmd); -// -// public void showUnblockPINDialog(PINSpec pin, -// ActionListener okListener, String okCmd, -// ActionListener cancelListener, String cancelCmd); -// -// public void showVerifyPINDialog(PINSpec pin, -// ActionListener okListener, String okCmd, -// ActionListener cancelListener, String cancelCmd); public char[] getOldPin(); diff --git a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties index 977d6e3a..5ef3edee 100644 --- a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties +++ b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages.properties @@ -15,30 +15,44 @@ title.activation=<html>Aktivierung</html> title.pin.mgmt=<html>PIN Verwaltung</html> -title.activate.pin=<html>PIN Aktivieren</html> -title.change.pin=<html>PIN \u00C4ndern</html> -title.unblock.pin=<html>PIN Entsperren</html> -title.verify.pin=<html>PIN Eingeben</html> +title.activate.pin=<html>PIN aktivieren</html> +title.change.pin=<html>PIN \u00E4ndern</html> +title.unblock.pin=<html>PIN entsperren</html> +#title.verify.pin=<html>PIN Eingeben</html> title.activate.success=<html>Erfolg</html> title.change.success=<html>Erfolg</html> +title.unblock.success=<html>Erfolg</html> # removed message.* prefix to reuse keys as help keys pin.mgmt=<html>Die Karte verf\u00FCgt \u00FCber {0} PINs</html> +# software pin-entry messages 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</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> +# start/finish pin-entry messages +activate.pinpad.current=<html>Transport-PIN am Kartenleser eingeben +activate.pinpad.new=<html>Neue PIN am Kartenleser eingeben +activate.pinpad.confirm=<html>Neue PIN am Kartenleser best\u00E4tigen +change.pinpad.current=<html>Alte PIN am Kartenleser eingeben +change.pinpad.new=<html>Neue PIN am Kartenleser eingeben +change.pinpad.confirm=<html>Neue PIN am Kartenleser best\u00E4tigen +unblock.pinpad.current=<html>PUK am Kartenleser eingeben +unblock.pinpad.new=<html>Neue PIN am Kartenleser eingeben +unblock.pinpad.confirm=<html>Neue PIN am Kartenleser best\u00E4tigen +# direct pin-entry messages +activate.pinpad.direct=<html>{0} ({1} stellig) am Kartenleser eingeben und wiederholen (jeweils best\u00E4tigen).</html> +change.pinpad.direct=<html>Alte {0} ({1} stellig) am Kartenleser eingeben, danach neue {0} eingeben und wiederholen (jeweils best\u00E4tigen). </html> +unblock.pinpad.direct=<html>{0} ({1} stellig) am Kartenleser eingeben (und best\u00E4tigen).</html> +# response messages +activate.success=<html>{0} wurde erfolgreich aktiviert +change.success=<html>{0} wurde erfolgreich ge\u00E4ndert +unblock.success=<html>{0} wurde erfolgreich entsperrt label.activation=<html>e-card Aktivierungsprozess</html> label.activation.step=<html>Schritt {0}</html> label.activation.idle=<html>Warte auf Server...</html> label.old.pin=<html>Alte {0}:</html> +label.puk=<html>{0} PUK:</html> label.new.pin=<html>Neue {0}:</html> label.repeat.pin=<html>Best\u00E4tigung:</html> diff --git a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties index 7f01971b..87e3f181 100644 --- a/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties +++ b/BKUGuiExt/src/main/resources/at/gv/egiz/bku/gui/ActivationMessages_en.properties @@ -16,29 +16,43 @@ title.activation=<html>Activation</html> title.pin.mgmt=<html>PIN Management</html> title.activate.pin=<html>Activate PIN</html> -title.verify.pin=<html>Enter PIN</html> +#title.verify.pin=<html>Enter PIN</html> title.change.pin=<html>Change PIN</html> title.unblock.pin=<html>Unblock PIN</html> title.activate.success=<html>Success</html> title.change.success=<html>Success</html> +title.unblock.success=<html>Success</html> # removed message.* prefix to reuse keys as help keys -pin.mgmt=<html>The smartcard has {0} PINs</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.pin=<html>Enter {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> +pin.mgmt=<html>{0} PINs available +# software pin-entry messages +activate.pin=<html>Enter and confirm {0} +change.pin=<html>Enter and confirm {0} +unblock.pin=<html>Enter PUK for {0} +# start/finish pin-entry messages +activate.pinpad.current=<html>Enter transport-PIN on cardreader +activate.pinpad.new=<html>Enter new PIN on cardreader +activate.pinpad.confirm=<html>Confirm new PIN on cardreader +change.pinpad.current=<html>Enter old PIN on cardreader +change.pinpad.new=<html>Enter new PIN on cardreader +change.pinpad.confirm=<html>Confirm new PIN on cardreader +unblock.pinpad.current=<html>Enter PUK on cardreader +unblock.pinpad.new=<html>Enter new PIN on cardreader +unblock.pinpad.confirm=<html>Confirm new PIN on cardreader +# direct pin-entry messages +activate.pinpad.direct=<html>Enter {0} ({1} digits) on cardreader and repeat (confirm in each case) +change.pinpad.direct=<html>Enter old {0} ({1} digits) on cardreader, then enter new {0} and repeat (confirm in each case) +unblock.pinpad.direct=<html>Enter {0} ({1} digits) on cardreader, then enter new {0} and repeat (confirm in each case) +# response messages activate.success=<html>{0} successfully activated</html> change.success=<html>{0} successfully changed</html> +unblock.success=<html>{0} successfully unblocked label.activation=<html>e-card activation process</html> label.activation.step=<html>Step {0}</html> label.activation.idle=<html>Wait for server...</html> label.old.pin=<html>Old {0}:</html> +label.puk=<html>{0} PUK:</html> label.new.pin=<html>New {0}:</html> label.repeat.pin=<html>Confirmation:</html> |