From 7ceeaf48ebfc905c8824fdf589cf04854e36aae1 Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 11 Dec 2009 15:56:26 +0000 Subject: [#502] VERIFY on STARCOS does not recognize locked pins (SW [63c0]) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@561 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'smcc/src/main') diff --git a/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java b/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java index 9047fa54..79a4cc69 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java @@ -616,6 +616,10 @@ public class STARCOSCard extends AbstractSignatureCard implements PINMgmtSignatu if (resp.getSW() == 0x9000) { return -1; } + if (resp.getSW() == 0x63c0) { + // returned by the 'short' VERIFY + throw new LockedException(); + } if (resp.getSW() >> 4 == 0x63c) { return 0x0f & resp.getSW(); } @@ -623,6 +627,7 @@ public class STARCOSCard extends AbstractSignatureCard implements PINMgmtSignatu switch (resp.getSW()) { case 0x6983: // authentication method blocked + // returned by the 'long' VERIFY throw new LockedException(); case 0x6984: // reference data not usable -- cgit v1.2.3