summaryrefslogtreecommitdiff
path: root/smcc
diff options
context:
space:
mode:
Diffstat (limited to 'smcc')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java6
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/SWCard.java4
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java2
3 files changed, 12 insertions, 0 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 0104cdb3..deed447d 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
@@ -43,6 +43,7 @@ public abstract class AbstractSignatureCard implements SignatureCard {
protected Locale locale = Locale.getDefault();
private Card card_;
+ private String cardterminalname;
protected CardReader reader;
@@ -67,6 +68,7 @@ public abstract class AbstractSignatureCard implements SignatureCard {
public void init(Card card, CardTerminal cardTerminal) {
this.card_ = card;
this.reader = ReaderFactory.getReader(card, cardTerminal);
+ this.cardterminalname = cardTerminal.getName();
}
@Override
@@ -74,6 +76,10 @@ public abstract class AbstractSignatureCard implements SignatureCard {
return card_;
}
+ public String getTerminalName() {
+ return(cardterminalname);
+ }
+
protected CardChannel getCardChannel() {
if(card_.getProtocol().equalsIgnoreCase("T=0")) {
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java
index 33f4019b..7150c8b4 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java
@@ -121,6 +121,10 @@ public class SWCard implements SignatureCard {
return null;
}
+ public String getTerminalName() {
+ return null;
+ }
+
private String getFileName(String fileName) {
String fs = System.getProperty("file.separator");
return swCardDir + fs + fileName;
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java
index 56ae7b74..b3cbaec8 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/SignatureCard.java
@@ -85,6 +85,8 @@ public interface SignatureCard {
public Card getCard();
+ public String getTerminalName();
+
public byte[] getCertificate(KeyboxName keyboxName, PINGUI pinGUI)
throws SignatureCardException, InterruptedException;