summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BKUOnline/pom.xml1
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/mocca-conf.xml2
-rw-r--r--BKUOnline/src/main/webapp/applet.jsp2
-rw-r--r--BKUWebStart/pom.xml4
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Configurator.java2
-rw-r--r--BKUWebStart/src/main/jnlp/template-unstable.xml6
-rw-r--r--BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/conf/conf.zipbin3005 -> 3045 bytes
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java22
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/reader/ReaderFactory.java37
9 files changed, 41 insertions, 35 deletions
diff --git a/BKUOnline/pom.xml b/BKUOnline/pom.xml
index c7dc5c58..3904fabd 100644
--- a/BKUOnline/pom.xml
+++ b/BKUOnline/pom.xml
@@ -312,7 +312,6 @@
<dependency>
<groupId>at.gv.egiz</groupId>
<artifactId>BKUWebStart</artifactId>
- <version>${project.version}</version>
<scope>provided</scope>
<type>zip</type>
</dependency>
diff --git a/BKUOnline/src/main/webapp/WEB-INF/mocca-conf.xml b/BKUOnline/src/main/webapp/WEB-INF/mocca-conf.xml
index b7778ed2..5c96dc58 100644
--- a/BKUOnline/src/main/webapp/WEB-INF/mocca-conf.xml
+++ b/BKUOnline/src/main/webapp/WEB-INF/mocca-conf.xml
@@ -43,7 +43,7 @@
<property name="disablePinpad" value="true"/>
</bean>
- <bean id="readerFactory" class="at.gv.egiz.smcc.ccid.ReaderFactory" factory-method="getInstance">
+ <bean id="readerFactory" class="at.gv.egiz.smcc.reader.ReaderFactory">
<property name="configuration" ref="smccConfiguration"/>
</bean>
|-->
diff --git a/BKUOnline/src/main/webapp/applet.jsp b/BKUOnline/src/main/webapp/applet.jsp
index 423b349e..cd0a4d1b 100644
--- a/BKUOnline/src/main/webapp/applet.jsp
+++ b/BKUOnline/src/main/webapp/applet.jsp
@@ -107,6 +107,6 @@
deployJava.runApplet(attributes, parameters, '1.6.0_04');
}
</script>
-
+
</body>
</html>
diff --git a/BKUWebStart/pom.xml b/BKUWebStart/pom.xml
index bcc40ac5..af7edda8 100644
--- a/BKUWebStart/pom.xml
+++ b/BKUWebStart/pom.xml
@@ -89,7 +89,7 @@
<excludeTransitive>false</excludeTransitive>
<jnlp>
<inputTemplateResourcePath>${project.basedir}/src/main/jnlp</inputTemplateResourcePath>
- <inputTemplate>template.xml</inputTemplate>
+ <inputTemplate>template-unstable.xml</inputTemplate>
<outputFile>mocca.jnlp</outputFile>
<mainClass>at.gv.egiz.bku.webstart.Launcher</mainClass>
</jnlp>
@@ -156,7 +156,7 @@
<excludeTransitive>false</excludeTransitive>
<jnlp>
<inputTemplateResourcePath>${project.basedir}/src/main/jnlp</inputTemplateResourcePath>
- <inputTemplate>template-unstable.xml</inputTemplate>
+ <inputTemplate>template.xml</inputTemplate>
<outputFile>mocca.jnlp</outputFile>
<mainClass>at.gv.egiz.bku.webstart.Launcher</mainClass>
</jnlp>
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Configurator.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Configurator.java
index d8fe3e70..37638510 100644
--- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Configurator.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Configurator.java
@@ -59,7 +59,7 @@ public class Configurator {
* configurations with less than this (major) version will be backuped and updated
* allowed: MAJOR[.MINOR[.X[-SNAPSHOT]]]
*/
- public static final String MIN_CONFIG_VERSION = "1.2.4-SNAPSHOT";
+ public static final String MIN_CONFIG_VERSION = "1.2.11-SNAPSHOT";
public static final String CONFIG_DIR = ".mocca/conf/";
public static final String CERTS_DIR = ".mocca/certs/";
public static final String VERSION_FILE = ".version";
diff --git a/BKUWebStart/src/main/jnlp/template-unstable.xml b/BKUWebStart/src/main/jnlp/template-unstable.xml
index b473f492..b6574715 100644
--- a/BKUWebStart/src/main/jnlp/template-unstable.xml
+++ b/BKUWebStart/src/main/jnlp/template-unstable.xml
@@ -3,14 +3,14 @@
| To strip versions from jar filenames do
| for JAR in *jar; do mv JAR {JAR/-[0-9]*/.jar}; done
|-->
-<jnlp spec="$jnlpspec" codebase="http://localhost/webstart/" context="http://localhost/" href="$outputFile">
+<jnlp spec="$jnlpspec" codebase="http://localhost:8080/webstart/" context="http://localhost:8080/" href="$outputFile">
<information>
<title>MOCCA Unstable</title>
<vendor>E-Government Innovationszentrum (EGIZ)</vendor>
<homepage href="${project.Url}"/>
- <description>${project.Description} (BKU) MOCCA Web Start - Unstable Build</description>
- <description kind="short">${project.Description}</description>
+ <description>MOCCA Web Start - Unstable Build</description>
+ <description kind="short">MOCCA Web Start - Unstable Build</description>
<icon kind="shortcut" href="img/chip16.png" width="16" height="16"/>
<icon kind="shortcut" href="img/chip24.png" width="24" height="24"/>
<icon kind="shortcut" href="img/chip32.png" width="32" height="32"/>
diff --git a/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/conf/conf.zip b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/conf/conf.zip
index 7ed90b7b..3a3eb26d 100644
--- a/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/conf/conf.zip
+++ b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/conf/conf.zip
Binary files differ
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java b/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java
index 696709bd..136ca283 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java
@@ -17,19 +17,29 @@
package at.gv.egiz.smcc.conf;
-import java.util.Properties;
-
/**
*
* @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
*/
-public class SMCCConfiguration extends Properties {
+public class SMCCConfiguration {
private static final long serialVersionUID = 1L;
- public static final String DISABLE_PINPAD_P = "disable.pinpad";
+ boolean disablePinpad;
+
+ /**
+ * @return the disablePinpad
+ */
+ public boolean isDisablePinpad() {
+ return disablePinpad;
+ }
- public void setDisablePinpad(String value) {
- this.setProperty(DISABLE_PINPAD_P, value);
+ /**
+ * @param disablePinpad the disablePinpad to set
+ */
+ public void setDisablePinpad(boolean disablePinpad) {
+ this.disablePinpad = disablePinpad;
}
+
+
}
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 eb197d9f..bf1730e9 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
@@ -19,6 +19,7 @@ package at.gv.egiz.smcc.reader;
import at.gv.egiz.smcc.conf.SMCCConfiguration;
import at.gv.egiz.smcc.util.SMCCHelper;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.smartcardio.Card;
@@ -35,16 +36,16 @@ public class ReaderFactory {
protected final static Log log = LogFactory.getLog(ReaderFactory.class);
- protected SMCCConfiguration configuration;
+ protected static SMCCConfiguration configuration;
- private ReaderFactory() {
- }
-
- /**
- * @param configuration the configuration to set
- */
public void setConfiguration(SMCCConfiguration configuration) {
- this.configuration = configuration;
+ if (configuration != null) {
+ log.debug("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;
}
public static CardReader getReader(Card icc, CardTerminal ct) {
@@ -52,19 +53,15 @@ public class ReaderFactory {
String name = ct.getName();
log.info("creating reader " + name);
- Map<Byte, Integer> features = queryFeatures(icc);
- boolean disablePinpad = false;
+ Map<Byte, Integer> features;
+ if (configuration != null && configuration.isDisablePinpad()) {
+ features = Collections.emptyMap();
+ } else {
+ features = queryFeatures(icc);
+ }
+
CardReader reader;
-
- //TODO query application context for reader config
-// if (configuration != null) {
-// String disablePinpad = configuration.getProperty(SMCCConfiguration.DISABLE_PINPAD_P);
-// log.debug("setting disablePinpad to " + Boolean.parseBoolean(disablePinpad));
-// reader.setDisablePinpad(Boolean.parseBoolean(disablePinpad));
-// }
- log.warn("card reader configuration is not considered");
-
- if (features.isEmpty() || disablePinpad) {
+ if (features.isEmpty()) {
reader = new DefaultCardReader(ct);
} else {
reader = new PinpadCardReader(ct, features);