summaryrefslogtreecommitdiff
path: root/smcc/src/main/java/at/gv
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-04-02 16:38:43 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-04-02 16:38:43 +0000
commit54b6807c2275544334446bc123932a41f7b13a2f (patch)
treede65f0d6f3ecb3fe559017fb860cbf8d4c32b90d /smcc/src/main/java/at/gv
parent355d8e3324688e9b68660512bf79710ce4df057b (diff)
downloadmocca-54b6807c2275544334446bc123932a41f7b13a2f.tar.gz
mocca-54b6807c2275544334446bc123932a41f7b13a2f.tar.bz2
mocca-54b6807c2275544334446bc123932a41f7b13a2f.zip
Enhance toString output for ACOS Card
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1035 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/main/java/at/gv')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java b/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java
index 6d9effb6..fed044ab 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java
@@ -123,13 +123,18 @@ PINMgmtSignatureCard {
/**
* The version of the card's digital signature application.
*/
- protected int appVersion = -1;
+ protected int appVersion = -1;
+
+ /**
+ * The detected type of ACOS card.
+ */
+ protected String cardType;
@Override
public void init(Card card, CardTerminal cardTerminal) {
super.init(card, cardTerminal);
- log.info("A-Sign premium ACOS card found");
+ log.info("ACOS card found");
// determine application version
try {
@@ -195,15 +200,19 @@ PINMgmtSignatureCard {
if (countryID == null) {
log.debug("No Country found! - default to ACOS Austria.");
+ cardType = "A-Sign premium";
_infoboxHandler = new ACOSATCard(this);
}
else if (countryID.equalsIgnoreCase("LI")) {
log.debug("Identified lisign card.");
+ cardType = "lisign";
_infoboxHandler = new ACOSLIESignCard(this);
} else {
log.debug("No lisign card - default to ACOS Austria.");
+ cardType = "A-Sign premium";
_infoboxHandler = new ACOSATCard(this);
}
+ log.info("Identified {} card", cardType);
} catch (SignatureCardException e) {
log.warn("Cannot determine card type by certificate. Using default.", e);
_infoboxHandler = new ACOSATCard(this);
@@ -444,7 +453,10 @@ PINMgmtSignatureCard {
@Override
public String toString() {
- return "a-sign premium (version " + getAppVersion() + ")";
+ String ret = "ACOS card: " + cardType;
+ if (getAppVersion() > 0)
+ ret += " (application version " + getAppVersion() + ")";
+ return ret;
}
////////////////////////////////////////////////////////////////////////