summaryrefslogtreecommitdiff
path: root/smcc/src
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-01-19 14:47:32 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-01-19 14:47:32 +0000
commit9a0a932b4b5fe26a6e289a3ae1a60766e29d3be7 (patch)
treef7465b2ec68f2db752b3f628da561d0184126020 /smcc/src
parentd592f2a95096d4f234a24564b794c712359756fb (diff)
downloadmocca-9a0a932b4b5fe26a6e289a3ae1a60766e29d3be7.tar.gz
mocca-9a0a932b4b5fe26a6e289a3ae1a60766e29d3be7.tar.bz2
mocca-9a0a932b4b5fe26a6e289a3ae1a60766e29d3be7.zip
UNDO: clear pin after use (TODO: provide char[] reference to providePIN())
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@582 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java b/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java
index 6bf4a7de..03a794fe 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java
@@ -35,7 +35,6 @@ import at.gv.egiz.smcc.VerifyAPDUSpec;
import at.gv.egiz.smcc.pin.gui.ModifyPINGUI;
import at.gv.egiz.smcc.pin.gui.PINGUI;
import at.gv.egiz.smcc.util.ISO7816Utils;
-import java.util.Arrays;
/**
*
@@ -62,10 +61,7 @@ public class DefaultCardReader implements CardReader {
throws SignatureCardException, CardException, InterruptedException {
log.debug("VERIFY");
- char[] pin = pinGUI.providePIN(pinSpec, retries);
- ResponseAPDU response = channel.transmit(ISO7816Utils.createVerifyAPDU(apduSpec, pin));
- Arrays.fill(pin, '0');
- return response;
+ return channel.transmit(ISO7816Utils.createVerifyAPDU(apduSpec, pinGUI.providePIN(pinSpec, retries)));
}
@Override
@@ -75,10 +71,7 @@ public class DefaultCardReader implements CardReader {
log.debug("MODIFY (CHANGE_REFERENCE_DATA)");
char[] oldPIN = pinGUI.provideCurrentPIN(pinSpec, retries);
char[] newPIN = pinGUI.provideNewPIN(pinSpec);
- ResponseAPDU response = channel.transmit(ISO7816Utils.createChangeReferenceDataAPDU(apduSpec, oldPIN, newPIN));
- Arrays.fill(oldPIN, '0');
- Arrays.fill(newPIN, '0');
- return response;
+ return channel.transmit(ISO7816Utils.createChangeReferenceDataAPDU(apduSpec, oldPIN, newPIN));
}
@Override
@@ -87,9 +80,7 @@ public class DefaultCardReader implements CardReader {
throws SignatureCardException, CardException, InterruptedException {
log.debug("MODIFY (NEW_REFERENCE_DATA)");
char[] newPIN = pinGUI.provideNewPIN(pinSpec);
- ResponseAPDU response = channel.transmit(ISO7816Utils.createNewReferenceDataAPDU(apduSpec, newPIN));
- Arrays.fill(newPIN, '0');
- return response;
+ return channel.transmit(ISO7816Utils.createNewReferenceDataAPDU(apduSpec, newPIN));
}
@Override