summaryrefslogtreecommitdiff
path: root/BKULocal/src
diff options
context:
space:
mode:
Diffstat (limited to 'BKULocal/src')
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java7
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java30
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java (renamed from BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java)8
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java40
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/CACerts/A-CERT GLOBALTRUST.cerbin0 -> 1561 bytes
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT ADVANCED.cerbin0 -> 1751 bytes
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT GLOBALTRUST.cerbin0 -> 1561 bytes
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-01a.cerbin0 -> 1111 bytes
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-02a.cerbin0 -> 975 bytes
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-03a.cerbin0 -> 975 bytes
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-01a.cerbin0 -> 865 bytes
-rw-r--r--BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-03.cerbin0 -> 979 bytes
-rw-r--r--BKULocal/src/main/webapp/WEB-INF/applicationContext.xml42
-rw-r--r--BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java78
14 files changed, 113 insertions, 92 deletions
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
index eaa4d6ad..a28ee1eb 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/BKUGuiProxy.java
@@ -1,13 +1,6 @@
package at.gv.egiz.bku.local.stal;
-import java.awt.Container;
-import java.awt.EventQueue;
-import java.awt.Toolkit;
import java.awt.event.ActionListener;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
-import java.awt.event.WindowEvent;
-import java.net.URL;
import java.util.List;
import java.util.Locale;
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java
index 10fb3e60..91d0aba0 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalBKUWorker.java
@@ -18,6 +18,14 @@ package at.gv.egiz.bku.local.stal;
import at.gv.egiz.bku.gui.BKUGUIFacade;
import at.gv.egiz.bku.smccstal.AbstractBKUWorker;
+import at.gv.egiz.stal.QuitRequest;
+import at.gv.egiz.stal.STALRequest;
+import at.gv.egiz.stal.STALResponse;
+import at.gv.egiz.stal.SignRequest;
+import at.gv.egiz.stal.ext.APDUScriptRequest;
+
+import java.util.List;
+import javax.swing.JDialog;
/**
*
@@ -25,7 +33,27 @@ import at.gv.egiz.bku.smccstal.AbstractBKUWorker;
*/
public class LocalBKUWorker extends AbstractBKUWorker {
- public LocalBKUWorker(BKUGUIFacade gui) {
+ private JDialog container;
+
+ public LocalBKUWorker(BKUGUIFacade gui, JDialog container) {
super(gui);
+ this.container = container;
+ addRequestHandler(SignRequest.class, new LocalSignRequestHandler());
+ }
+
+ @Override
+ public List<STALResponse> handleRequest(List<? extends STALRequest> requestList) {
+ signatureCard = null;
+ List<STALResponse> responses = super.handleRequest(requestList);
+ // container.setVisible(false);
+ return responses;
+ }
+
+ @Override
+ public STALResponse handleRequest(STALRequest request) {
+ if (request instanceof QuitRequest) {
+ container.setVisible(false);
+ }
+ return null;
}
}
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
index 3ae739d9..c2548cd5 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
@@ -34,16 +34,16 @@ import java.net.URL;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-public class SMCCSTALFactory implements STALFactory {
+public class LocalSTALFactory implements STALFactory {
- protected static final Log log = LogFactory.getLog(SMCCSTALFactory.class);
+ protected static final Log log = LogFactory.getLog(LocalSTALFactory.class);
protected String helpURL;
protected Locale locale;
@Override
public STAL createSTAL() {
- SMCCSTAL stal;
+ LocalBKUWorker stal;
JDialog dialog = new JDialog();
if (locale != null) {
dialog.setLocale(locale);
@@ -64,7 +64,7 @@ public class SMCCSTALFactory implements STALFactory {
BKUGUIFacade.Style.advanced,
null,
helpListener);
- stal = new SMCCSTAL(new BKUGuiProxy(dialog, gui), dialog);
+ stal = new LocalBKUWorker(new BKUGuiProxy(dialog, gui), dialog);
dialog.setPreferredSize(new Dimension(400, 200));
dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
dialog.setTitle("MOCCA");
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
deleted file mode 100644
index 716050d6..00000000
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTAL.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package at.gv.egiz.bku.local.stal;
-
-import java.util.List;
-
-import javax.swing.JDialog;
-
-import at.gv.egiz.bku.gui.BKUGUIFacade;
-import at.gv.egiz.bku.smccstal.AbstractBKUWorker;
-import at.gv.egiz.stal.QuitRequest;
-import at.gv.egiz.stal.STALRequest;
-import at.gv.egiz.stal.STALResponse;
-import at.gv.egiz.stal.SignRequest;
-
-public class SMCCSTAL extends AbstractBKUWorker {
-
- private JDialog container;
-
- public SMCCSTAL(BKUGUIFacade gui, JDialog container) {
- super(gui);
- this.container = container;
- addRequestHandler(SignRequest.class, new LocalSignRequestHandler());
- }
-
- @Override
- public List<STALResponse> handleRequest(List<STALRequest> requestList) {
- signatureCard = null;
- List<STALResponse> responses = super.handleRequest(requestList);
- // container.setVisible(false);
- return responses;
- }
-
- @Override
- public STALResponse handleRequest(STALRequest request) {
- if (request instanceof QuitRequest) {
- container.setVisible(false);
- }
- return null;
- }
-
-}
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/CACerts/A-CERT GLOBALTRUST.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/CACerts/A-CERT GLOBALTRUST.cer
new file mode 100644
index 00000000..9a25e57d
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/CACerts/A-CERT GLOBALTRUST.cer
Binary files differ
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT ADVANCED.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT ADVANCED.cer
new file mode 100644
index 00000000..66ff251b
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT ADVANCED.cer
Binary files differ
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT GLOBALTRUST.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT GLOBALTRUST.cer
new file mode 100644
index 00000000..9a25e57d
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-CERT GLOBALTRUST.cer
Binary files differ
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-01a.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-01a.cer
new file mode 100644
index 00000000..f9fef65f
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-01a.cer
Binary files differ
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-02a.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-02a.cer
new file mode 100644
index 00000000..36a442b8
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-02a.cer
Binary files differ
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-03a.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-03a.cer
new file mode 100644
index 00000000..ab9e0cd7
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-Qual-03a.cer
Binary files differ
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-01a.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-01a.cer
new file mode 100644
index 00000000..efa28178
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-01a.cer
Binary files differ
diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-03.cer b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-03.cer
new file mode 100644
index 00000000..33e77636
--- /dev/null
+++ b/BKULocal/src/main/resources/at/gv/egiz/bku/local/conf/certs/certStore/A-Trust-nQual-03.cer
Binary files differ
diff --git a/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml
index 3191f82f..2ddd46a1 100644
--- a/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml
@@ -18,7 +18,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
- <bean id="STALFactory" class="at.gv.egiz.bku.local.stal.SMCCSTALFactory"
+ <bean id="STALFactory" class="at.gv.egiz.bku.local.stal.LocalSTALFactory"
scope="singleton">
<property name="helpURL" value="http://localhost:3495/help"/>
</bean>
@@ -48,6 +48,46 @@
<bean id="commandInvoker" class="at.gv.egiz.bku.binding.SLCommandInvokerImpl">
<property name="securityManager" ref="accessController" />
</bean>
+
+ <bean id="slCommandFactory" class="at.gv.egiz.bku.slcommands.SLCommandFactory"
+ factory-method="getInstance">
+ <property name="commandImpl">
+ <map>
+ <entry
+ key="http://www.buergerkarte.at/namespaces/securitylayer/1.2#:NullOperationRequest"
+ value="at.gv.egiz.bku.slcommands.impl.NullOperationCommandImpl" />
+ <entry
+ key="http://www.buergerkarte.at/namespaces/securitylayer/1.2#:InfoboxReadRequest"
+ value="at.gv.egiz.bku.slcommands.impl.InfoboxReadCommandImpl" />
+ <entry
+ key="http://www.buergerkarte.at/namespaces/securitylayer/1.2#:InfoboxUpdateRequest"
+ value="at.gv.egiz.bku.slcommands.impl.InfoboxUpdateCommandImpl" />
+ <entry
+ key="http://www.buergerkarte.at/namespaces/securitylayer/1.2#:CreateXMLSignatureRequest"
+ value="at.gv.egiz.bku.slcommands.impl.CreateXMLSignatureCommandImpl" />
+ </map>
+ </property>
+ </bean>
+
+ <bean id="infoboxFactory" class="at.gv.egiz.bku.slcommands.impl.InfoboxFactory"
+ factory-method="getInstance">
+ <property name="infoboxImpl">
+ <map>
+ <entry
+ key="Certificates"
+ value="at.gv.egiz.bku.slcommands.impl.CertificatesInfoboxImpl" />
+ <entry
+ key="IdentityLink"
+ value="at.gv.egiz.bku.slcommands.impl.IdentityLinkInfoboxImpl" />
+ <entry
+ key="CardChannel"
+ value="at.gv.egiz.bku.slcommands.impl.CardChannelInfoboxImpl" />
+ <entry
+ key="SV-Personendaten"
+ value="at.gv.egiz.bku.slcommands.impl.SVPersonendatenInfoboxImpl" />
+ </map>
+ </property>
+ </bean>
<!-- Configure Configuration -->
<bean id="certValidator" class="at.gv.egiz.bku.conf.CertValidatorImpl"></bean>
diff --git a/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java b/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java
index 51e7ff7d..2108d2b3 100644
--- a/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java
+++ b/BKULocal/src/test/java/at/gv/egiz/bku/local/stal/TestSignRequest.java
@@ -14,42 +14,42 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package at.gv.egiz.bku.local.stal;
-
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Ignore;
-
-import at.gv.egiz.bku.utils.StreamUtil;
-import at.gv.egiz.smcc.SignatureCard;
-import at.gv.egiz.stal.STALRequest;
-import at.gv.egiz.stal.SignRequest;
-
-@Ignore
-public class TestSignRequest {
-
- public void test() throws Exception {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- StreamUtil.copyStream(getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/local/stal/sigInfo.xml"), os);
- byte[] signedInfo = os.toByteArray();
- SignRequest sr = new SignRequest();
- sr.setSignedInfo(signedInfo);
- sr.setKeyIdentifier(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR.getKeyboxName());
- List<STALRequest> reqList = new ArrayList<STALRequest>(1);
- reqList.add(sr);
- System.out.println((new SMCCSTALFactory()).createSTAL().handleRequest(reqList));
- }
-
- public static void main(String[] args) {
- TestSignRequest tsr = new TestSignRequest();
- try {
- tsr.test();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
-}
+package at.gv.egiz.bku.local.stal;
+
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Ignore;
+
+import at.gv.egiz.bku.utils.StreamUtil;
+import at.gv.egiz.smcc.SignatureCard;
+import at.gv.egiz.stal.STALRequest;
+import at.gv.egiz.stal.SignRequest;
+
+@Ignore
+public class TestSignRequest {
+
+ public void test() throws Exception {
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ StreamUtil.copyStream(getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/local/stal/sigInfo.xml"), os);
+ byte[] signedInfo = os.toByteArray();
+ SignRequest sr = new SignRequest();
+ sr.setSignedInfo(signedInfo);
+ sr.setKeyIdentifier(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR.getKeyboxName());
+ List<STALRequest> reqList = new ArrayList<STALRequest>(1);
+ reqList.add(sr);
+ System.out.println((new LocalSTALFactory()).createSTAL().handleRequest(reqList));
+ }
+
+ public static void main(String[] args) {
+ TestSignRequest tsr = new TestSignRequest();
+ try {
+ tsr.test();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}