diff options
Diffstat (limited to 'smcc/src/main/java/at/gv')
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); |