summaryrefslogtreecommitdiff
path: root/smcc/src
diff options
context:
space:
mode:
Diffstat (limited to 'smcc/src')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/LIEZertifikatCard.java18
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/reader/ReaderFactory.java7
2 files changed, 17 insertions, 8 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/LIEZertifikatCard.java b/smcc/src/main/java/at/gv/egiz/smcc/LIEZertifikatCard.java
index 70a35685..c4324773 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/LIEZertifikatCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/LIEZertifikatCard.java
@@ -115,14 +115,26 @@ public class LIEZertifikatCard extends AbstractSignatureCard implements Signatur
byte[] ef_qcert = null;
for (CIOCertificate cioCertificate : ef_cd.getCIOs()) {
String label = cioCertificate.getLabel();
- //"TEST LLV APO 2s Liechtenstein Post Qualified CA ID"
+ //"Name (qualified signature"
if (label != null && label.toLowerCase()
- .contains("liechtenstein post qualified ca id")) {
+ .contains("qualified signature")) {
ef_qcert = cioCertificate.getEfidOrPath();
+ log.debug("found certificate: {} (fid={})", label, ef_qcert);
}
}
-
+ if (ef_qcert == null) {
+ for (CIOCertificate cioCertificate : ef_cd.getCIOs()) {
+ String label = cioCertificate.getLabel();
+ //"TEST LLV APO 2s Liechtenstein Post Qualified CA ID"
+ if (label != null && label.toLowerCase()
+ .contains("liechtenstein post qualified ca id")) {
+ ef_qcert = cioCertificate.getEfidOrPath();
+ log.debug("found certificate: {} (fid={})", label, ef_qcert);
+ }
+ }
+ }
+
if (ef_qcert == null) {
throw new NotActivatedException();
}
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/reader/ReaderFactory.java b/smcc/src/main/java/at/gv/egiz/smcc/reader/ReaderFactory.java
index 8ce98fcc..e8f657f7 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/reader/ReaderFactory.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/reader/ReaderFactory.java
@@ -29,7 +29,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ * TODO
* @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
*/
public class ReaderFactory {
@@ -40,11 +40,8 @@ public class ReaderFactory {
public void setConfiguration(SMCCConfiguration configuration) {
if (configuration != null) {
- log.debug("reader configuration: disablePinpad=" + configuration.isDisablePinpad());
+ log.info("reader configuration: disablePinpad=" + configuration.isDisablePinpad());
}
- //spring injects configuration into singleton ReaderFactory instance,
- //but we access the ReaderFactory statically (getReader)
- //(we rather should query the application context to obtain a reader factory)
ReaderFactory.configuration = configuration;
}