summaryrefslogtreecommitdiff
path: root/smcc/src/main/java/at
diff options
context:
space:
mode:
authortzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-10-29 11:55:40 +0000
committertzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-10-29 11:55:40 +0000
commit94d0dfc746361a8d2218d4da49e4c224bb89d096 (patch)
treeb6897534f29a4f3ac2b5dfa0c8241907855fd057 /smcc/src/main/java/at
parenta7af8f11402d76ae99d053195da2c151a391894c (diff)
downloadmocca-94d0dfc746361a8d2218d4da49e4c224bb89d096.tar.gz
mocca-94d0dfc746361a8d2218d4da49e4c224bb89d096.tar.bz2
mocca-94d0dfc746361a8d2218d4da49e4c224bb89d096.zip
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@811 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/main/java/at')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java8
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/AbstractT0SignatureCard.java16
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/BELPICCard.java2
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/DNIeCard.java2
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/PtEidCard.java2
5 files changed, 10 insertions, 20 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java b/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
index db8bebf1..a31e746f 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
@@ -69,7 +69,13 @@ public abstract class AbstractSignatureCard implements SignatureCard {
protected CardChannel getCardChannel() {
- return new LogCardChannel(card_.getBasicChannel());
+ if(card_.getProtocol().equalsIgnoreCase("T=0")) {
+
+ return new T0CardChannel(card_.getBasicChannel());
+ } else {
+
+ return new LogCardChannel(card_.getBasicChannel());
+ }
}
@Override
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/AbstractT0SignatureCard.java b/smcc/src/main/java/at/gv/egiz/smcc/AbstractT0SignatureCard.java
deleted file mode 100644
index a837b3cd..00000000
--- a/smcc/src/main/java/at/gv/egiz/smcc/AbstractT0SignatureCard.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package at.gv.egiz.smcc;
-
-import javax.smartcardio.CardChannel;
-
-public abstract class AbstractT0SignatureCard extends AbstractSignatureCard
- implements SignatureCard {
-
-
- protected CardChannel getCardChannel() {
-
- return new T0CardChannel(getCard().getBasicChannel());
- }
-
-
-
-}
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/BELPICCard.java b/smcc/src/main/java/at/gv/egiz/smcc/BELPICCard.java
index e5e9b57a..76569305 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/BELPICCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/BELPICCard.java
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
import at.gv.egiz.smcc.util.ISO7816Utils;
import at.gv.egiz.smcc.util.SMCCHelper;
-public class BELPICCard extends AbstractT0SignatureCard implements SignatureCard {
+public class BELPICCard extends AbstractSignatureCard implements SignatureCard {
/**
* Logging facility.
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/DNIeCard.java b/smcc/src/main/java/at/gv/egiz/smcc/DNIeCard.java
index e0cb2655..768ac959 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/DNIeCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/DNIeCard.java
@@ -15,7 +15,7 @@ import org.slf4j.LoggerFactory;
import at.gv.egiz.smcc.pin.gui.PINGUI;
-public class DNIeCard extends AbstractT0SignatureCard implements SignatureCard {
+public class DNIeCard extends AbstractSignatureCard implements SignatureCard {
private final Logger log = LoggerFactory.getLogger(DNIeCard.class);
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/PtEidCard.java b/smcc/src/main/java/at/gv/egiz/smcc/PtEidCard.java
index 27cea3be..61a27a6c 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/PtEidCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/PtEidCard.java
@@ -47,7 +47,7 @@ import at.gv.egiz.smcc.pin.gui.PINGUI;
import at.gv.egiz.smcc.util.ISO7816Utils;
import at.gv.egiz.smcc.util.SMCCHelper;
-public class PtEidCard extends AbstractT0SignatureCard {
+public class PtEidCard extends AbstractSignatureCard {
private final Logger log = LoggerFactory.getLogger(PtEidCard.class);