diff options
Diffstat (limited to 'mocca-1.2.11/bkucommon')
311 files changed, 0 insertions, 33814 deletions
diff --git a/mocca-1.2.11/bkucommon/pom.xml b/mocca-1.2.11/bkucommon/pom.xml deleted file mode 100644 index 2ac6c5fc..00000000 --- a/mocca-1.2.11/bkucommon/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <artifactId>bku</artifactId> - <groupId>at.gv.egiz</groupId> - <version>1.2.11</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <groupId>at.gv.egiz</groupId> - <artifactId>bkucommon</artifactId> - <name>BKU Common</name> - <version>1.2.11</version> - - <build> - <plugins> - <!-- - plugin> <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> <executions> <execution> - <id>MOA-SPSS</id> <goals> <goal>wsimport</goal> </goals> - </execution> </executions> <configuration> - <extension>true</extension> <verbose>true</verbose> - <packageName>moaspss.generated</packageName> - <wsdlDirectory>${basedir}/src/test/wsdl</wsdlDirectory> <wsdlFiles> - <wsdlFile>MOA-SPSS-1.3.wsdl</wsdlFile> </wsdlFiles> - <sourceDestDir>${project.build.directory}/generated-sources/moaspss</sourceDestDir> - <staleFile>${project.build.directory}/generated-sources/moaspss/.staleFlag</staleFile> - <xnocompile>true</xnocompile> </configuration> </plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifest> - </manifest> - <manifestEntries> - <SignatureLayout>1.0</SignatureLayout> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - <dependencies> - <dependency> - <groupId>at.gv.egiz</groupId> - <artifactId>utils</artifactId> - <version>${version}</version> - </dependency> - <dependency> - <groupId>at.gv.egiz</groupId> - <artifactId>STALExt</artifactId> - <version>${version}</version> - </dependency> - <!-- bkucommon implements default FontProvider (ResourceFontLoader) --> - <dependency> - <groupId>at.gv.egiz</groupId> - <artifactId>BKUCommonGUI</artifactId> - <version>${version}</version> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - <dependency> - <groupId>iaik</groupId> - <artifactId>iaik_jce_full_signed</artifactId> - </dependency> - <dependency> - <groupId>commons-fileupload</groupId> - <artifactId>commons-fileupload</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - </dependency> - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - </dependency> - <dependency> - <groupId>iaik</groupId> - <artifactId>iaik_xsect</artifactId> - </dependency> - <dependency> - <groupId>iaik</groupId> - <artifactId>iaik_pki</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.sun.xml.ws</groupId> - <artifactId>jaxws-rt</artifactId> - <scope>test</scope> - <version>2.1.5</version> - </dependency> - <!-- dependency to ensure NamespacePrefixmapper --> - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-impl</artifactId> - </dependency> - </dependencies> -</project>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/private/cache/retriever/www.w3.org/2000/09/xmldsig b/mocca-1.2.11/bkucommon/private/cache/retriever/www.w3.org/2000/09/xmldsig deleted file mode 100644 index 931c6d12..00000000 --- a/mocca-1.2.11/bkucommon/private/cache/retriever/www.w3.org/2000/09/xmldsig +++ /dev/null @@ -1,7 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> -<html><head> -<title>303 See Other</title> -</head><body> -<h1>See Other</h1> -<p>The answer to your request is located <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/Overview.html">here</a>.</p> -</body></html> diff --git a/mocca-1.2.11/bkucommon/src/main/java/META-INF/MANIFEST.MF b/mocca-1.2.11/bkucommon/src/main/java/META-INF/MANIFEST.MF deleted file mode 100644 index 46e7dd84..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Manifest-Version: 1.0
-Archiver-Version: Plexus Archiver
-Created-By: Apache Maven
-Built-By: clemens
-Build-Jdk: 1.6.0_10
-SignatureLayout: 1.0
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/AccessControl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/AccessControl.java deleted file mode 100644 index a03505f6..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/AccessControl.java +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.accesscontrol.config; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{}Chains"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "chains" -}) -@XmlRootElement(name = "AccessControl") -public class AccessControl { - - @XmlElement(name = "Chains", required = true) - protected Chains chains; - - /** - * Gets the value of the chains property. - * - * @return - * possible object is - * {@link Chains } - * - */ - public Chains getChains() { - return chains; - } - - /** - * Sets the value of the chains property. - * - * @param value - * allowed object is - * {@link Chains } - * - */ - public void setChains(Chains value) { - this.chains = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Action.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Action.java deleted file mode 100644 index 9b15f0fd..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Action.java +++ /dev/null @@ -1,114 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.accesscontrol.config; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice> - * <element name="ChainRef" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="RuleAction"> - * <simpleType> - * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> - * <enumeration value="allow"/> - * <enumeration value="deny"/> - * </restriction> - * </simpleType> - * </element> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "chainRef", - "ruleAction" -}) -@XmlRootElement(name = "Action") -public class Action { - - @XmlElement(name = "ChainRef") - protected String chainRef; - @XmlElement(name = "RuleAction") - protected String ruleAction; - - /** - * Gets the value of the chainRef property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getChainRef() { - return chainRef; - } - - /** - * Sets the value of the chainRef property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setChainRef(String value) { - this.chainRef = value; - } - - /** - * Gets the value of the ruleAction property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getRuleAction() { - return ruleAction; - } - - /** - * Sets the value of the ruleAction property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setRuleAction(String value) { - this.ruleAction = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Chain.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Chain.java deleted file mode 100644 index 92975e48..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Chain.java +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package at.gv.egiz.bku.accesscontrol.config; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{}Rules" minOccurs="0"/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "rules" -}) -@XmlRootElement(name = "Chain") -public class Chain { - - @XmlElement(name = "Rules") - protected Rules rules; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the rules property. - * - * @return - * possible object is - * {@link Rules } - * - */ - public Rules getRules() { - return rules; - } - - /** - * Sets the value of the rules property. - * - * @param value - * allowed object is - * {@link Rules } - * - */ - public void setRules(Rules value) { - this.rules = value; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Chains.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Chains.java deleted file mode 100644 index ea8c36bd..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Chains.java +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.accesscontrol.config; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{}Chain" maxOccurs="unbounded"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "chain" -}) -@XmlRootElement(name = "Chains") -public class Chains { - - @XmlElement(name = "Chain", required = true) - protected List<Chain> chain; - - /** - * Gets the value of the chain property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the chain property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getChain().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Chain } - * - * - */ - public List<Chain> getChain() { - if (chain == null) { - chain = new ArrayList<Chain>(); - } - return this.chain; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Command.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Command.java deleted file mode 100644 index a2a9ebb4..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Command.java +++ /dev/null @@ -1,116 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.accesscontrol.config; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{}Param" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * <attribute name="Name" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "param" -}) -@XmlRootElement(name = "Command") -public class Command { - - @XmlElement(name = "Param") - protected List<Param> param; - @XmlAttribute(name = "Name", required = true) - @XmlSchemaType(name = "anySimpleType") - protected String name; - - /** - * Gets the value of the param property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the param property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getParam().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Param } - * - * - */ - public List<Param> getParam() { - if (param == null) { - param = new ArrayList<Param>(); - } - return this.param; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/ObjectFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/ObjectFactory.java deleted file mode 100644 index 2c6e2187..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/ObjectFactory.java +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package at.gv.egiz.bku.accesscontrol.config; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the at.gv.egiz.bku.accesscontrol.config package. - * <p>An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _UserInteraction_QNAME = new QName("", "UserInteraction"); - private final static QName _AuthClass_QNAME = new QName("", "AuthClass"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.gv.egiz.bku.accesscontrol.config - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link Param } - * - */ - public Param createParam() { - return new Param(); - } - - /** - * Create an instance of {@link AccessControl } - * - */ - public AccessControl createAccessControl() { - return new AccessControl(); - } - - /** - * Create an instance of {@link Command } - * - */ - public Command createCommand() { - return new Command(); - } - - /** - * Create an instance of {@link Rules } - * - */ - public Rules createRules() { - return new Rules(); - } - - /** - * Create an instance of {@link Action } - * - */ - public Action createAction() { - return new Action(); - } - - /** - * Create an instance of {@link Chains } - * - */ - public Chains createChains() { - return new Chains(); - } - - /** - * Create an instance of {@link Chain } - * - */ - public Chain createChain() { - return new Chain(); - } - - /** - * Create an instance of {@link Rule } - * - */ - public Rule createRule() { - return new Rule(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "", name = "UserInteraction") - public JAXBElement<String> createUserInteraction(String value) { - return new JAXBElement<String>(_UserInteraction_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "", name = "AuthClass") - public JAXBElement<String> createAuthClass(String value) { - return new JAXBElement<String>(_AuthClass_QNAME, String.class, null, value); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Param.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Param.java deleted file mode 100644 index daffa98d..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Param.java +++ /dev/null @@ -1,109 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.accesscontrol.config; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <simpleContent> - * <extension base="<http://www.w3.org/2001/XMLSchema>string"> - * <attribute name="Name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" /> - * </extension> - * </simpleContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "value" -}) -@XmlRootElement(name = "Param") -public class Param { - - @XmlValue - protected String value; - @XmlAttribute(name = "Name", required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "NCName") - protected String name; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Rule.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Rule.java deleted file mode 100644 index 2ad1e660..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Rule.java +++ /dev/null @@ -1,285 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package at.gv.egiz.bku.accesscontrol.config; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{}AuthClass"/> - * <choice minOccurs="0"> - * <element name="DomainName" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="IPv4Address" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="URL" type="{http://www.w3.org/2001/XMLSchema}string"/> - * </choice> - * <element ref="{}Command" minOccurs="0"/> - * <element ref="{}Action"/> - * <element ref="{}UserInteraction"/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "authClass", - "domainName", - "iPv4Address", - "url", - "command", - "action", - "userInteraction" -}) -@XmlRootElement(name = "Rule") -public class Rule { - - @XmlElement(name = "AuthClass", required = true) - protected String authClass; - @XmlElement(name = "DomainName") - protected String domainName; - @XmlElement(name = "IPv4Address") - protected String iPv4Address; - @XmlElement(name = "URL") - protected String url; - @XmlElement(name = "Command") - protected Command command; - @XmlElement(name = "Action", required = true) - protected Action action; - @XmlElement(name = "UserInteraction", required = true) - protected String userInteraction; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the authClass property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAuthClass() { - return authClass; - } - - /** - * Sets the value of the authClass property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAuthClass(String value) { - this.authClass = value; - } - - /** - * Gets the value of the domainName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDomainName() { - return domainName; - } - - /** - * Sets the value of the domainName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDomainName(String value) { - this.domainName = value; - } - - /** - * Gets the value of the iPv4Address property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIPv4Address() { - return iPv4Address; - } - - /** - * Sets the value of the iPv4Address property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIPv4Address(String value) { - this.iPv4Address = value; - } - - /** - * Gets the value of the url property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getURL() { - return url; - } - - /** - * Sets the value of the url property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setURL(String value) { - this.url = value; - } - - /** - * Gets the value of the command property. - * - * @return - * possible object is - * {@link Command } - * - */ - public Command getCommand() { - return command; - } - - /** - * Sets the value of the command property. - * - * @param value - * allowed object is - * {@link Command } - * - */ - public void setCommand(Command value) { - this.command = value; - } - - /** - * Gets the value of the action property. - * - * @return - * possible object is - * {@link Action } - * - */ - public Action getAction() { - return action; - } - - /** - * Sets the value of the action property. - * - * @param value - * allowed object is - * {@link Action } - * - */ - public void setAction(Action value) { - this.action = value; - } - - /** - * Gets the value of the userInteraction property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUserInteraction() { - return userInteraction; - } - - /** - * Sets the value of the userInteraction property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUserInteraction(String value) { - this.userInteraction = value; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Rules.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Rules.java deleted file mode 100644 index 16150f0c..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontrol/config/Rules.java +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.accesscontrol.config; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{}Rule" maxOccurs="unbounded"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "rule" -}) -@XmlRootElement(name = "Rules") -public class Rules { - - @XmlElement(name = "Rule", required = true) - protected List<Rule> rule; - - /** - * Gets the value of the rule property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the rule property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getRule().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Rule } - * - * - */ - public List<Rule> getRule() { - if (rule == null) { - rule = new ArrayList<Rule>(); - } - return this.rule; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessChecker.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessChecker.java deleted file mode 100644 index d930c74e..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessChecker.java +++ /dev/null @@ -1,23 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import at.gv.egiz.bku.slexceptions.SLException;
-
-public interface AccessChecker {
- public ChainResult check(AccessCheckerContext checkCtx) throws SLException;
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessCheckerContext.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessCheckerContext.java deleted file mode 100644 index 60935678..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessCheckerContext.java +++ /dev/null @@ -1,43 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import at.gv.egiz.bku.slcommands.SLCommand;
-
-public class AccessCheckerContext {
- private SLCommand command;
- private AuthenticationClass authenticationClass;
- private String peerUrl;
-
- public AccessCheckerContext(SLCommand cmd, AuthenticationClass ac, String url) {
- this.command = cmd;
- this.authenticationClass = ac;
- this.peerUrl = url;
- }
-
- public SLCommand getCommand() {
- return command;
- }
-
- public AuthenticationClass getAuthenticationClass() {
- return authenticationClass;
- }
-
- public String getPeerUrl() {
- return peerUrl;
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessControllerFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessControllerFactory.java deleted file mode 100644 index 19fec084..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AccessControllerFactory.java +++ /dev/null @@ -1,153 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import java.io.InputStream;
-import java.util.Hashtable;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.accesscontrol.config.AccessControl;
-import at.gv.egiz.bku.accesscontrol.config.Chain;
-import at.gv.egiz.bku.accesscontrol.config.Command;
-import at.gv.egiz.bku.accesscontrol.config.ObjectFactory;
-import at.gv.egiz.bku.accesscontrol.config.Param;
-import at.gv.egiz.bku.accesscontrol.config.Rule;
-import at.gv.egiz.bku.accesscontroller.RuleChecker.PEER_TYPE;
-import at.gv.egiz.bku.slexceptions.SLRuntimeException;
-
-public class AccessControllerFactory {
-
- private static AccessControllerFactory instance = new AccessControllerFactory();
- private static Log log = LogFactory.getLog(AccessControllerFactory.class);
- private static JAXBContext jaxbContext;
- public static String INPUT_CHAIN = "InputChain";
- public static String OUTPUT_CHAIN = "OutputChain";
-
- static {
- try {
- jaxbContext = JAXBContext.newInstance(ObjectFactory.class.getPackage()
- .getName());
- } catch (JAXBException e) {
- log.fatal("Cannot init jaxbContext", e);
- }
- }
-
- private Hashtable<String, ChainChecker> chainTable = new Hashtable<String, ChainChecker>();
-
- private AccessControllerFactory() {
- }
-
- public static AccessControllerFactory getInstance() {
- return instance;
- }
-
- /**
- *
- * @param id
- * @return null if there is no chain with this id.
- */
- public ChainChecker getChainChecker(String id) {
- return chainTable.get(id);
- }
-
- public ChainChecker createChainChecker(String id, boolean register) {
- ChainChecker cc = new ChainChecker(id);
- if (register) {
- chainTable.put(id, cc);
- }
- return cc;
- }
-
- public void registerChainChecker(ChainChecker cc) {
- chainTable.put(cc.getId(), cc);
- }
-
- public CommandParamChecker createParamChecker(String cmd) {
- if ((cmd != null) && (cmd.startsWith("Infobox"))) {
- return new InfoboxParamChecker();
- } else {
- return null;
- }
- }
-
- public RuleChecker createRuleChecker(Rule rule) {
- RuleChecker rc;
- rc = new RuleChecker(rule.getId());
- Command cmd = rule.getCommand();
- if (cmd != null) {
- rc.setCommandName(cmd.getName());
- for (Param p : cmd.getParam()) {
- rc.addParameter(p.getName(), p.getValue());
- }
- }
- rc.setAuthenticationClass(rule.getAuthClass());
- if (rule.getIPv4Address() != null) {
- rc.setPeerId(rule.getIPv4Address(), PEER_TYPE.IP);
- } else if (rule.getDomainName() != null) {
- rc.setPeerId(rule.getDomainName(), PEER_TYPE.HOST);
- } else if (rule.getURL() != null) {
- rc.setPeerId(rule.getURL(), PEER_TYPE.URL);
- }
- rc.setAction(rule.getAction().getRuleAction());
- rc.setChainId(rule.getAction().getChainRef());
- rc.setUserAction(rule.getUserInteraction());
- return rc;
- }
-
- public void init(InputStream is) throws JAXBException {
- chainTable.clear();
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- AccessControl ac = (AccessControl) unmarshaller.unmarshal(is);
- List<Chain> chainList = ac.getChains().getChain();
- log.debug("Found " + chainList.size() + " chains in config");
- for (Chain chain : chainList) {
- log.trace("Creating chain: " + chain.getId());
- ChainChecker cc = createChainChecker(chain.getId(), false);
- List<Rule> ruleList = chain.getRules().getRule();
- log
- .debug("Found " + ruleList.size() + " rules in chain "
- + chain.getId());
- for (Rule rule : ruleList) {
- log.trace("Creating rule: " + rule.getId());
- cc.addRule(createRuleChecker(rule));
- }
- registerChainChecker(cc);
- }
- validate();
- }
-
- private void validate() {
- for (ChainChecker chain : chainTable.values()) {
- for (RuleChecker rule : chain.getRules()) {
- if (rule.getChainId() != null) {
- log.trace("Checking reference to chain: "+rule.getChainId());
- if (getChainChecker(rule.getChainId()) == null) {
- throw new SLRuntimeException("Invalid reference to unknown chain: "+rule.getChainId());
- }
- }
- }
- }
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/Action.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/Action.java deleted file mode 100644 index f3d15ad6..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/Action.java +++ /dev/null @@ -1,35 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-public enum Action {
- ALLOW("allow"), DENY("deny");
- private String name;
-
- Action(String name) {
- this.name = name;
- }
-
- public static Action fromString(String s) {
- for (Action ac : values()) {
- if (ac.name.equals(s)) {
- return ac;
- }
- }
- return null;
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClass.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClass.java deleted file mode 100644 index 3c442a6d..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClass.java +++ /dev/null @@ -1,37 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-public enum AuthenticationClass {
- ANONYMOUS("anonymous"), PSEUDO_ANONYMOUS("pseudoanonymous"), CERTIFIED(
- "certified"), CERTIFIED_GOV_AGENCY("certifiedGovAgency");
-
- private String name;
-
- AuthenticationClass(String name) {
- this.name = name;
- }
-
- public static AuthenticationClass fromString(String s) {
- for (AuthenticationClass ac : values()) {
- if (ac.name.equals(s)) {
- return ac;
- }
- }
- return null;
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java deleted file mode 100644 index 61d3d7a5..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java +++ /dev/null @@ -1,110 +0,0 @@ -/*
- * Copyright 2008 Federal Chancellery Austria and
- * Graz University of Technology
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.gv.egiz.bku.accesscontroller;
-
-import static at.gv.egiz.bku.accesscontroller.AuthenticationClass.ANONYMOUS;
-import static at.gv.egiz.bku.accesscontroller.AuthenticationClass.CERTIFIED;
-import static at.gv.egiz.bku.accesscontroller.AuthenticationClass.CERTIFIED_GOV_AGENCY;
-import static at.gv.egiz.bku.accesscontroller.AuthenticationClass.PSEUDO_ANONYMOUS;
-
-import java.net.URL;
-import java.security.cert.CertificateParsingException;
-import java.security.cert.X509Certificate;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class AuthenticationClassifier {
- private static AuthenticationClassifier instance = new AuthenticationClassifier();
- private static Log log = LogFactory.getLog(AuthenticationClassifier.class);
- private final static String GOV_DOMAIN = ".gv.at";
-
- private AuthenticationClassifier() {
- }
-
- public static boolean isGovAgency(X509Certificate cert) {
- String[] rdns = (cert.getSubjectX500Principal().getName()).split(",");
- for (String rdn : rdns) {
- if (rdn.startsWith("CN=")) {
- String dns = rdn.split("=")[1];
- log.trace("Analyzing cn dn: " + dns);
- if (dns.endsWith(GOV_DOMAIN)) {
- return true;
- }
- }
- }
- try {
- Collection<List<?>> sanList = cert.getSubjectAlternativeNames();
- if (sanList != null) {
- for (List<?> san : sanList) {
- log.trace("Analyzing subj. alt name: " + san);
- if ((Integer) san.get(0) == 2) {
- String dns = (String) san.get(1);
- if (dns.endsWith(GOV_DOMAIN)) {
- return true;
- }
- }
- }
- }
- } catch (CertificateParsingException e) {
- log.error(e);
- }
- if ((cert.getExtensionValue("1.2.40.0.10.1.1.1") != null)
- || (cert.getExtensionValue("1.2.40.0.10.1.1.2") != null)) {
- return true;
- }
- return false;
- }
-
- /**
- * Client Certificates are currently not supported
- *
- */
- protected AuthenticationClass getMyAuthenticationClass(boolean isDataUrl,
- URL url, X509Certificate cert) {
- if (isDataUrl) {
- if (url.getProtocol().equalsIgnoreCase("https")) {
- if (isGovAgency(cert)) {
- return CERTIFIED_GOV_AGENCY;
- }
- if (cert.getExtensionValue("1.2.40.0.10.1.1.1") != null) {
- return CERTIFIED_GOV_AGENCY;
- }
- return CERTIFIED;
- } else {
- return PSEUDO_ANONYMOUS;
- }
- } else {
- return ANONYMOUS;
- }
- }
-
- /**
- *
- * @param isDataUrl
- * @param url
- * if the url's protocol is https a cert parameter must be provided.
- * @param cert
- * @return
- */
- public static AuthenticationClass getAuthenticationClass(boolean isDataUrl,
- URL url, X509Certificate cert) {
- return instance.getMyAuthenticationClass(isDataUrl, url, cert);
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/ChainChecker.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/ChainChecker.java deleted file mode 100644 index 716f81e4..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/ChainChecker.java +++ /dev/null @@ -1,91 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.slexceptions.SLException;
-
-public class ChainChecker implements AccessChecker {
- private static Log log = LogFactory.getLog(ChainChecker.class);
-
- private String id;
- private List<RuleChecker> rules = new LinkedList<RuleChecker>();
-
- /**
- *
- * @param id must not be null
- */
- public ChainChecker(String id) {
- if (id == null) {
- throw new NullPointerException("Id argument must not be null");
- }
- this.id = id;
- }
-
-
- public String getId() {
- return id;
- }
-
- public void addRule(RuleChecker rule) {
- if (rule != null) {
- rules.add(rule);
- }
- }
-
- public List<RuleChecker> getRules() {
- return Collections.unmodifiableList(rules);
- }
-
- @Override
- public ChainResult check(AccessCheckerContext checkCtx) throws SLException {
- log.debug("Processing chain: "+id);
- for (RuleChecker rule : rules) {
- log.trace("Checking rule: "+rule.getId());
- RuleResult result = rule.check(checkCtx);
- if (result.matchFound()) {
- if (result.getDelegateChainId() != null) {
- // process chain
- ChainChecker cc = AccessControllerFactory.getInstance().getChainChecker(result.getDelegateChainId());
- if (cc == null) {
- log.error("Cannot delegate to chain. Unknown chain id: "+result.getDelegateChainId());
- throw new SLException(4000);
- }
- ChainResult cr = cc.check(checkCtx);
- if (cr.matchFound()) {
- return cr;
- }
- // if chain does not contain matching rule
- // cont. here.
- } else {
- return result;
- }
- }
- }
- log.debug("Did not find a matching rule here");
- return new ChainResult(null, null, false);
- }
-
-
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/ChainResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/ChainResult.java deleted file mode 100644 index a5547cab..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/ChainResult.java +++ /dev/null @@ -1,49 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-/**
- * Result of the access controller
- *
- */
-public class ChainResult {
- private UserAction userAction;
- private Action action;
- private boolean matchFound;
-
- public ChainResult(Action action, UserAction userAction, boolean matchFound) {
- this.action = action;
- this.userAction = userAction;
- this.matchFound = matchFound;
- }
-
- public Action getAction() {
- return action;
- }
-
- public UserAction getUserAction() {
- return userAction;
- }
-
- /**
- *
- * @return true if a matching rule has been found
- */
- public boolean matchFound() {
- return matchFound;
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/CommandParamChecker.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/CommandParamChecker.java deleted file mode 100644 index 003eb2f7..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/CommandParamChecker.java +++ /dev/null @@ -1,68 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import at.gv.egiz.bku.slcommands.SLCommand;
-
-public abstract class CommandParamChecker {
-
- protected List<Tupel<String, String>> paramList = new LinkedList<Tupel<String, String>>();
-
- public static class Tupel<T, Q> {
- private T key;
- private Q val;
-
- public Tupel(T key, Q val) {
- if ((key == null) || (val == null)) {
- throw new NullPointerException("Tupel key and value must not be null");
- }
- this.key = key;
- this.val = val;
- }
-
- public T getKey() {
- return key;
- }
-
- public Q getVal() {
- return val;
- }
-
- @SuppressWarnings("unchecked")
- public boolean equals(Object other) {
- if (other instanceof Tupel) {
- Tupel ot = (Tupel) other;
- return (key.equals(ot.key) && val.equals(ot.val));
- }
- return false;
- }
-
- public int hashCode() {
- return key.hashCode();
- }
- }
-
- public void addParameter(String key, String value) {
- paramList.add(new Tupel<String, String>(key, value));
- }
-
- public abstract boolean checkParameter(SLCommand cmd);
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/InfoboxParamChecker.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/InfoboxParamChecker.java deleted file mode 100644 index 8fa328de..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/InfoboxParamChecker.java +++ /dev/null @@ -1,74 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.slcommands.InfoboxReadCommand;
-import at.gv.egiz.bku.slcommands.SLCommand;
-import at.gv.egiz.bku.slexceptions.SLRuntimeException;
-
-public class InfoboxParamChecker extends CommandParamChecker {
- private static Log log = LogFactory.getLog(InfoboxParamChecker.class);
-
- public final static String INFOBOX_ID = "InfoboxIdentifier";
- public final static String PERSON_ID = "PersonIdentifier";
- public final static String DERIVED = "derived";
-
- @Override
- public boolean checkParameter(SLCommand cmd) {
- if (paramList.size() == 0) {
- return true;
- }
-
- if (cmd instanceof InfoboxReadCommand) {
- InfoboxReadCommand irc = (InfoboxReadCommand) cmd;
- for (Tupel<String, String> param : paramList) {
- if (param.getKey().equals(INFOBOX_ID)) {
- if (!param.getVal().equals(irc.getInfoboxIdentifier())) {
- return false;
- }
- } else if (param.getKey().equals(PERSON_ID)) {
- if (param.getVal().equals(DERIVED)) {
- if (irc.getIdentityLinkDomainId() == null) {
- return false;
- }
- } else {
- Pattern p = Pattern.compile(param.getVal());
- Matcher m = p.matcher(irc.getIdentityLinkDomainId());
- if (!m.matches()) {
- return false;
- }
- }
-
- } else {
- throw new SLRuntimeException("Cannot handle parameter "
- + param.getKey());
- }
- }
- return true;
- } else {
- log.error("Cannot handle parameter for command: " + cmd.getName());
- throw new SLRuntimeException("Cannot handle parameters for command: "
- + cmd.getName());
- }
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/RuleChecker.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/RuleChecker.java deleted file mode 100644 index 1cba89ef..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/RuleChecker.java +++ /dev/null @@ -1,203 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.slcommands.SLCommand;
-import at.gv.egiz.bku.slexceptions.SLRuntimeException;
-
-public class RuleChecker implements AccessChecker {
-
- private static Log log = LogFactory.getLog(RuleChecker.class);
-
- public static enum PEER_TYPE {
- HOST, IP, URL
- };
-
- protected String id;
- protected AuthenticationClass authenticationClass;
- protected String commandName;
- protected Pattern commandNamePattern;
- protected String peerId;
- protected Pattern peerIdPattern;
- protected PEER_TYPE peerType;
- protected Action action;
- protected UserAction userAction;
- protected String chainId;
- protected CommandParamChecker paramChecker;
-
- public RuleChecker(String id) {
- if (id == null) {
- throw new NullPointerException("Id argument must not be null");
- }
- this.id = id;
- }
-
- public void setAuthenticationClass(String ac) {
- if (ac != null) {
- AuthenticationClass tmp = AuthenticationClass.fromString(ac);
- if (tmp == null) {
- throw new SLRuntimeException("Unknown authentication class " + ac);
- }
- authenticationClass = tmp;
- }
- }
-
- public void setAction(String ac) {
- if (ac != null) {
- Action tmp = Action.fromString(ac);
- if (tmp == null) {
- throw new SLRuntimeException("Unknown action " + ac);
- }
- action = tmp;
- }
- }
-
- public void setUserAction(String uac) {
- if (uac != null) {
- UserAction tmp = UserAction.fromString(uac);
- if (tmp == null) {
- throw new SLRuntimeException("Unknown user action " + uac);
- }
- userAction = tmp;
- }
- }
-
- public void setChainId(String chainId) {
- this.chainId = chainId;
- }
-
- public void setPeerId(String peerId, PEER_TYPE type) {
- this.peerType = type;
- this.peerId = peerId;
- peerIdPattern = Pattern.compile(peerId);
- }
-
- public void setCommandName(String commandName) {
- this.commandName = commandName;
- commandNamePattern = Pattern.compile(commandName);
- paramChecker = AccessControllerFactory.getInstance().createParamChecker(
- commandName);
- }
-
- /**
- * Make sure to set the commandName first
- *
- * @param key
- * @param value
- */
- public void addParameter(String key, String value) {
- if (paramChecker == null) {
- throw new IllegalArgumentException("Cannot set parameters for command "
- + commandName);
- }
- paramChecker.addParameter(key, value);
- }
-
- public String getId() {
- return id;
- }
-
- protected boolean matchAuthenticationClass(AuthenticationClass cls) {
- if ((this.authenticationClass == null) || (cls == null)) {
- return true;
- }
- return this.authenticationClass.compareTo(cls) <= 0;
- }
-
- protected boolean matchCommandName(SLCommand cmd) {
- if ((commandName == null) || (cmd == null)) {
- return true;
- }
- Matcher matcher = commandNamePattern.matcher(cmd.getName());
- if (matcher.matches()) {
- if (paramChecker != null) {
- return paramChecker.checkParameter(cmd);
- } else {
- return true;
- }
- } else {
- return false;
- }
- }
-
- protected boolean matchPeerId(String peerUrl) {
- if ((peerId == null) || (peerUrl == null)) {
- return true;
- }
- if (peerType == PEER_TYPE.URL) {
- Matcher matcher = peerIdPattern.matcher(peerUrl);
- return matcher.matches();
- } else {
- try {
- URL url = new URL(peerUrl);
- if (peerType == PEER_TYPE.HOST) {
- try {
- String host = url.getHost();
- String hostName = InetAddress.getByName(host)
- .getCanonicalHostName();
- Matcher matcher = peerIdPattern.matcher(hostName);
- return matcher.matches();
- } catch (UnknownHostException e) {
- log.error("Cannot resolve hostname", e);
- return false;
- }
- } else {
- try {
- String hostAddr = InetAddress.getByName(url.getHost())
- .getHostAddress();
- Matcher matcher = peerIdPattern.matcher(hostAddr);
- return matcher.matches();
- } catch (UnknownHostException e) {
- log.error("Cannot resolve host address", e);
- return false;
- }
- }
- } catch (MalformedURLException e) {
- log.error("Cannot parse url", e);
- return false;
- }
- }
- }
-
- @Override
- public RuleResult check(AccessCheckerContext checkCtx) {
- log.debug("Processing rule: " + id);
- if (matchAuthenticationClass(checkCtx.getAuthenticationClass())
- && matchCommandName(checkCtx.getCommand())
- && matchPeerId(checkCtx.getPeerUrl())) {
- log.debug("Match found for rule: " + id);
- return new RuleResult(action, userAction, true, chainId);
- }
- log.debug("No match found for rule: " + id);
- return new RuleResult(action, userAction, false, chainId);
- }
-
- public String getChainId() {
- return chainId;
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/RuleResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/RuleResult.java deleted file mode 100644 index 706615c2..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/RuleResult.java +++ /dev/null @@ -1,32 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-
-public class RuleResult extends ChainResult {
- private String chainId;
-
- public RuleResult(Action action, UserAction userAction, boolean matchFound, String chainId) {
- super(action, userAction, matchFound);
- this.chainId = chainId;
- }
-
- public String getDelegateChainId() {
- return chainId;
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/SecurityManagerFacade.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/SecurityManagerFacade.java deleted file mode 100644 index 482d3ecb..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/SecurityManagerFacade.java +++ /dev/null @@ -1,118 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-import java.io.InputStream;
-
-import javax.xml.bind.JAXBException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.slcommands.SLCommand;
-import at.gv.egiz.bku.slcommands.SLSourceContext;
-import at.gv.egiz.bku.slcommands.SLTargetContext;
-
-/**
- * Facade for the access controller
- */
-public class SecurityManagerFacade {
-
- private static Log log = LogFactory.getLog(SecurityManagerFacade.class);
-
- private boolean allowUnmatched = false;
- private ChainChecker inputFilter = null;
- private ChainChecker outputFilter = null;
-
- public boolean mayInvokeCommand(SLCommand cmd, SLSourceContext ctx) {
- if (inputFilter != null) {
- AuthenticationClass ac = AuthenticationClassifier.getAuthenticationClass(
- ctx.isSourceIsDataURL(), ctx.getSourceUrl(), ctx
- .getSourceCertificate());
- AccessCheckerContext acc = new AccessCheckerContext(cmd, ac, ctx
- .getSourceUrl().toString());
- try {
- ChainResult cr = inputFilter.check(acc);
- if (cr.matchFound()) {
- if (cr.getAction() == Action.ALLOW) {
- return true;
- } else {
- return false;
- }
- } else {
- return allowUnmatched;
- }
- } catch (Exception e) {
- log.error(e);
- return false;
- }
- } else {
- log.warn("No input chain defined");
- return allowUnmatched;
- }
- }
-
- public boolean maySendResult(SLCommand cmd, SLTargetContext ctx) {
- if (outputFilter != null) {
- AuthenticationClass ac = AuthenticationClassifier.getAuthenticationClass(
- ctx.isTargetIsDataURL(), ctx.getTargetUrl(), ctx
- .getTargetCertificate());
- AccessCheckerContext acc = new AccessCheckerContext(cmd, ac, ctx
- .getTargetUrl().toString());
- try {
- ChainResult cr = outputFilter.check(acc);
- if (cr.matchFound()) {
- if (cr.getAction() == Action.ALLOW) {
- return true;
- } else {
- return false;
- }
- } else {
- return allowUnmatched;
- }
- } catch (Exception e) {
- log.error(e);
- return false;
- }
- } else {
- log.warn("No output chain defined");
- return allowUnmatched;
- }
- }
-
- /**
- * Default policy if not match was found
- *
- * @param allow
- */
- public void setAllowUnmatched(boolean allow) {
- this.allowUnmatched = allow;
- }
-
- public void init(InputStream is) {
- inputFilter = null;
- outputFilter = null;
- AccessControllerFactory fab = AccessControllerFactory.getInstance();
- try {
- fab.init(is);
- } catch (JAXBException e) {
- log.error(e);
- }
- inputFilter = fab.getChainChecker(AccessControllerFactory.INPUT_CHAIN);
- outputFilter = fab.getChainChecker(AccessControllerFactory.OUTPUT_CHAIN);
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/UserAction.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/UserAction.java deleted file mode 100644 index c1f7028b..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/UserAction.java +++ /dev/null @@ -1,36 +0,0 @@ -/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package at.gv.egiz.bku.accesscontroller;
-
-public enum UserAction {
- NONE("none"), INFO("info"), CONFIRM("confirm"), CONFIRM_WITH_SECRET("confirmWithSecret");
-
- private String name;
-
- UserAction(String name) {
- this.name = name;
- }
-
- public static UserAction fromString(String s) {
- for (UserAction ac : values()) {
- if (ac.name.equals(s)) {
- return ac;
- }
- }
- return null;
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/AbstractBindingProcessor.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/AbstractBindingProcessor.java deleted file mode 100644 index 23f62134..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/AbstractBindingProcessor.java +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configuration; -import java.io.InputStream; -import java.util.Date; - -import at.gv.egiz.bku.slcommands.SLCommandInvoker; -import at.gv.egiz.stal.STAL; - -public abstract class AbstractBindingProcessor implements BindingProcessor { - protected Id id; - protected Configuration config; - protected STAL stal; - protected SLCommandInvoker commandInvoker; - protected long lastAccessedTime = System.currentTimeMillis(); - - public AbstractBindingProcessor(String idString) { - this.id = IdFactory.getInstance().createId(idString); - } - - /** - * @see java.lang.Thread#run() - */ - public abstract void run(); - - /** - * The caller is advised to check the result in case an error occurred. - * - * @see #getResult() - */ - public abstract void consumeRequestStream(InputStream aIs); - - public Id getId() { - return id; - } - - public STAL getSTAL() { - return stal; - } - - public SLCommandInvoker getCommandInvoker() { - return commandInvoker; - } - - public void updateLastAccessTime() { - lastAccessedTime = System.currentTimeMillis(); - } - - public Date getLastAccessTime() { - return new Date(lastAccessedTime); - } - - /** - * To be called after object creation. - * - * @param aStal - * must not be null - * @param aCommandInvoker - * must not be null - */ - public void init(STAL aStal, SLCommandInvoker aCommandInvoker, Configuration conf) { - if (aStal == null) { - throw new NullPointerException("STAL must not be set to null"); - } - if (aCommandInvoker == null) { - throw new NullPointerException("Commandinvoker must not be set to null"); - } - config = conf; - stal = aStal; - commandInvoker = aCommandInvoker; - Thread.currentThread().setName("BPID#"+getId().toString()); - } -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java deleted file mode 100644 index 0d978992..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configuration; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Date; -import java.util.Locale; - -import at.gv.egiz.bku.slcommands.SLCommandInvoker; -import at.gv.egiz.stal.STAL; - -/** - * Represents an single instance of a SL HTTP binding. - * - * @author wbauer - * - */ -public interface BindingProcessor extends Runnable { - - /** - * The stream must be read completely within this method. - * - * The caller is advised to check the result in case an error occurred. - * - * @see #getResult() - */ - public void consumeRequestStream(InputStream aIs); - - /** - * The unique Id of this http binding instance. - * @return - */ - public Id getId(); - - /** - * The used underlying STAL instance - * @return - */ - public STAL getSTAL(); - - public SLCommandInvoker getCommandInvoker(); - - public Date getLastAccessTime(); - - public void updateLastAccessTime(); - - public String getResultContentType(); - - public void writeResultTo(OutputStream os, String encoding) throws IOException; - - public void init(STAL aStal, SLCommandInvoker aCommandInvoker, Configuration config); - - /** - * Sets the preferred locale for userinteraction. - * If the locale is not set the default locale will be used. - * @param locale must not be null. - */ - public void setLocale(Locale locale); - - public boolean isFinished(); -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManager.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManager.java deleted file mode 100644 index 9cad95a4..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManager.java +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import java.net.MalformedURLException; -import java.util.Locale; -import java.util.Set; - -import at.gv.egiz.bku.slcommands.SLCommandInvoker; -import at.gv.egiz.stal.STALFactory; - -/** - * Central player that handles the protocol binding. - * - * @author wbauer - * - */ -public interface BindingProcessorManager { - - /** - * FactoryMethod creating a new BindingProcessor object. - * The created binding processor must be passed to the process method to execute. - * - * @param urlString - * the source url - * @param aSessionId - * optional an external sessionId (e.g. http session) could be - * provided. This parameter may be null. - * @param locale the locale used for user interaction, may be null - */ - public BindingProcessor createBindingProcessor(String urlString, - String aSessionId, Locale locale) throws MalformedURLException; - - /** - * FactoryMethod creating a new BindingProcessor object. - * The created binding processor must be passed to the process method to execute. - * - * @param protcol - * the source url - * @param aSessionId - * optional an external sessionId (e.g. http session) could be - * provided. This parameter may be null. - */ - public BindingProcessor createBindingProcessor(String urlString, - String aSessionId) throws MalformedURLException; - - - /** - * Gets the binding processor with a certain id. The binding processor must be passed to the - * process method before it is managed and thus returned by this method. - * @param aId must not be null - * @return null if the binding processor was not "processed" before. - */ - public BindingProcessor getBindingProcessor(Id aId); - - /** - * Sets the STAL factory that is used for creating STAL objects that are used by BindingProcessor objects. - * For each new BindingProcessor a new STAL object is created. - * @param aStalFactory the factory to be used. Must not be null. - */ - public void setSTALFactory(STALFactory aStalFactory); - - /** - * Sets the invoker to be used. - * @param invoker - */ - public void setSLCommandInvoker(SLCommandInvoker invoker); - - /** - * Creates a processing context, - * schedules the provided binding processor for processing and - * immediately returns the context. - * - * @param aBindingProcessor - */ - public ProcessingContext process(BindingProcessor aBindingProcessor); - - /** - * Removes a formerly added (by calling the process method) binding processor. - * @param bindingProcessor must not be null - */ - public void removeBindingProcessor(Id sessionId); - - /** - * A set of all managed binding processors. - * @return - */ - public Set<Id> getManagedIds(); - - public void shutdown(); - - public void shutdownNow(); -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java deleted file mode 100644 index bf9a63e2..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configuration; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.slcommands.SLCommandInvoker; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.utils.binding.Protocol; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.STALFactory; - -/** - * This class maintains all active BindingProcessor Objects. Currently, only - * HTTPBinding is supported. - */ -public class BindingProcessorManagerImpl implements BindingProcessorManager { - - public final static Protocol[] SUPPORTED_PROTOCOLS = { Protocol.HTTP, - Protocol.HTTPS }; - - private static Log log = LogFactory.getLog(BindingProcessorManagerImpl.class); - - /** spring injected config - * Passed to created bindingprocessors, to replace their configuration */ - protected Configuration config; - - protected STALFactory stalFactory; - protected SLCommandInvoker commandInvokerClass; - - private RemovalStrategy removalStrategy; - private ExecutorService executorService; - private Map<Id, ProcessingContext> contextMap = Collections.synchronizedMap(new HashMap<Id, ProcessingContext>()); -// private Map<Id, MapEntityWrapper> bindingProcessorMap = Collections -// .synchronizedMap(new HashMap<Id, MapEntityWrapper>()); - - /** - * Container to hold a Future and Bindingprocessor object as map value. - * - * @author wbauer - * @see BindingProcessorManagerImpl#bindingProcessorMap - */ -// static class MapEntityWrapper { -// private Future<?> future; -// private BindingProcessor bindingProcessor; -// -// public MapEntityWrapper(Future<?> future, BindingProcessor bindingProcessor) { -// if ((bindingProcessor == null) || (future == null)) { -// throw new NullPointerException("Argument must not be null"); -// } -// this.bindingProcessor = bindingProcessor; -// this.future = future; -// } -// -// public Future<?> getFuture() { -// return future; -// } -// -// public BindingProcessor getBindingProcessor() { -// return bindingProcessor; -// } -// -// public int hashCode() { -// return bindingProcessor.getId().hashCode(); -// } -// -// public boolean equals(Object other) { -// if (other instanceof MapEntityWrapper) { -// MapEntityWrapper o = (MapEntityWrapper) other; -// return (o.bindingProcessor.getId().equals(bindingProcessor.getId())); -// } else { -// return false; -// } -// } -// } - - /** - * - * @param fab - * must not be null - * @param ci - * must not be null (prototype to generate new instances) - */ - public BindingProcessorManagerImpl(STALFactory fab, SLCommandInvoker ci, Configuration conf) { - if (fab == null) { - throw new NullPointerException("STALFactory must not be null"); - } - stalFactory = fab; - if (ci == null) { - throw new NullPointerException("SLCommandInvoker must not be null"); - } - commandInvokerClass = ci; - config = conf; - executorService = Executors.newCachedThreadPool(); - } - - /** - * - * @return the STALFactory currently used. - */ - public STALFactory getStalFactory() { - return stalFactory; - } - - /** - * Sets the STALFactory to be used. - * - * @param stalFactory - */ - public void setStalFactory(STALFactory stalFactory) { - this.stalFactory = stalFactory; - } - - /** - * Could be used to setup a new executor service during application stratup. - * - * @param executorService - */ - public void setExecutorService(ExecutorService executorService) { - this.executorService = executorService; - } - - public void setRemovalStrategy(RemovalStrategy aStrategy) { - removalStrategy = aStrategy; - } - - public RemovalStrategy getRemovlaStrategy() { - return removalStrategy; - } - - public void shutdown() { - log.info("Shutting down the BindingProcessorManager"); - executorService.shutdown(); - } - - public void shutdownNow() { - log.info("Shutting down the BindingProcessorManager NOW!"); - executorService.shutdownNow(); - log.debug("Number of binding contexts currently managed: " - + contextMap.size()); -// + bindingProcessorMap.size()); - if (log.isDebugEnabled()) { - for (ProcessingContext ctx : contextMap.values()) { - Id bpId = ctx.getBindingProcessor().getId(); - Future future = ctx.getFuture(); - log.debug(bpId + " cancelled: " + future.isCancelled()); - log.debug(bpId + " done: " + future.isDone()); - } -// for (Iterator<MapEntityWrapper> it = bindingProcessorMap.values() -// .iterator(); it.hasNext();) { -// MapEntityWrapper entry = it.next(); -// log.debug(entry.getBindingProcessor().getId() + ": isDone: " -// + entry.getFuture().isDone()); -// log.debug(entry.getBindingProcessor().getId() + ": isCanceled: " -// + entry.getFuture().isCancelled()); -// } - } - } - - /** - * Uses the default locale - */ - public BindingProcessor createBindingProcessor(String srcUrl, - String aSessionId) throws MalformedURLException { - return createBindingProcessor(srcUrl, aSessionId, null); - } - - /** - * FactoryMethod creating a new BindingProcessor object. - * - * @param protocol - * must not be null - * @throws MalformedURLException - */ - public BindingProcessor createBindingProcessor(String srcUrl, - String aSessionId, Locale locale) throws MalformedURLException { - URL url = new URL(srcUrl); - String low = url.getProtocol().toLowerCase(); - Protocol proto = null; - for (int i = 0; i < SUPPORTED_PROTOCOLS.length; i++) { - if (SUPPORTED_PROTOCOLS[i].toString().equals(low)) { - proto = SUPPORTED_PROTOCOLS[i]; - break; - } - } - if (proto == null) { - throw new UnsupportedOperationException(); - } - BindingProcessor bindingProcessor = new HTTPBindingProcessor(aSessionId, - commandInvokerClass.newInstance(), url); - stalFactory.setLocale(locale); - STAL stal = stalFactory.createSTAL(); - bindingProcessor.init(stal, commandInvokerClass.newInstance(), config); - if (locale != null) { - bindingProcessor.setLocale(locale); -// stal.setLocale(locale); - } - return bindingProcessor; - } - - /** - * @return the bindingprocessor object for this id or null if no - * bindingprocessor was found. - */ - @Override - public BindingProcessor getBindingProcessor(Id aId) { -// if (bindingProcessorMap.get(aId) != null) { -// return bindingProcessorMap.get(aId).getBindingProcessor(); - ProcessingContext ctx = contextMap.get(aId); - if (ctx != null) { - return ctx.getBindingProcessor(); - } else { - return null; - } - } - - /** - * - */ - @Override - public void setSTALFactory(STALFactory aStalFactory) { - if (aStalFactory == null) { - throw new NullPointerException("Cannot set STALFactory to null"); - } - stalFactory = aStalFactory; - } - - /** - * Causes the BindingProcessorManager to manage the provided BindingProcessor - * Creates a processing context, - * schedules the provided binding processor for processing and - * immediately returns the context. - * - * @param aBindingProcessor - * must not be null - */ - @Override - public ProcessingContext process(BindingProcessor aBindingProcessor) { - if (contextMap.containsKey(aBindingProcessor.getId())) { -// if (bindingProcessorMap.containsKey(aBindingProcessor.getId())) { - log.fatal("Clashing ids, cannot process bindingprocessor with id:" - + aBindingProcessor.getId()); - throw new SLRuntimeException( - "Clashing ids, cannot process bindingprocessor with id:" - + aBindingProcessor.getId()); - } - log.debug("processing bindingprocessor: " + aBindingProcessor.getId()); - Future<?> f = executorService.submit(aBindingProcessor); - ProcessingContext ctx = new ProcessingContext(aBindingProcessor, f); - contextMap.put(aBindingProcessor.getId(), ctx); -// bindingProcessorMap.put(aBindingProcessor.getId(), new MapEntityWrapper(f, -// aBindingProcessor)); - return ctx; - } - - @Override - public void setSLCommandInvoker(SLCommandInvoker invoker) { - commandInvokerClass = invoker; - } - - @Override - public void removeBindingProcessor(Id sessionId) { - log.debug("Removing binding processor: " + sessionId); - ProcessingContext ctx = contextMap.get(sessionId); - if (ctx == null) { - log.warn("no processing context to remove for session " + sessionId); - return; - } - Future f = ctx.getFuture(); - -// MapEntityWrapper wrapper = bindingProcessorMap.get(sessionId); -// if (wrapper == null) { -// return; -// } -// Future<?> f = wrapper.getFuture(); - - if (!f.isDone()) { - log.trace("canceling " + sessionId); - f.cancel(true); - } - contextMap.remove(sessionId); -// bindingProcessorMap.remove(sessionId); - } - - @Override - public Set<Id> getManagedIds() { - Set<Id> result = new HashSet<Id>(); - synchronized (contextMap) { - for (Id id : contextMap.keySet()) { - result.add(id); - } - } -// synchronized (bindingProcessorMap) { -// for (Iterator<Id> it = bindingProcessorMap.keySet().iterator(); it -// .hasNext();) { -// result.add(it.next()); -// } -// } - return result; - } -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java deleted file mode 100644 index d3945253..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configurator; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLSocketFactory; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.slexceptions.SLRuntimeException; - -/** - * Used to handle DataUrl connections as specified in the CCE's HTTP protocol binding. - * - */ -public class DataUrl { - - private static Log log = LogFactory.getLog(DataUrl.class); - private static DataUrlConnectionSPI connection; - private static Properties configuration; - private static SSLSocketFactory sslSocketFactory; - private static HostnameVerifier hostNameVerifier; - private URL url; - - /** spring injected config, to replace configuration */ - //private Configuration config; - - /** - * Sets the default DataUrlConnection implementation - * @param aClass must not be null - */ - static void setDataUrlConnectionImpl(DataUrlConnectionSPI conn) { - if (conn != null) { - connection = conn; - } - } - - public DataUrl(String aUrlString) throws MalformedURLException { - url = new URL(aUrlString); - if (connection == null) { - log.debug("Using default DataURLConnection class"); - connection = new DataUrlConnectionImpl(); - } - connection.setConfiguration(configuration); - connection.setSSLSocketFactory(sslSocketFactory); - connection.setHostnameVerifier(hostNameVerifier); - } - - public DataUrlConnection openConnection() { - try { - log.debug("Opening dataurl connection"); - DataUrlConnectionSPI retVal = connection.newInstance(); - retVal.init(url); - return retVal; - } catch (Exception e) { - log.error(e); - throw new SLRuntimeException("Cannot instantiate a dataurlconnection:", e); - } - } - - - /** - * set configuration for all subsequently instantiated DataURL objects - * @param props - */ - public static void setConfiguration(Properties props) { - configuration = props; - if (configuration != null) { - String className = configuration.getProperty(Configurator.DATAURLCONNECTION_CONFIG_P); - if (className != null) { - log.warn("Set DataURLConnection class not supported!"); - } - } - } - - /** - * set SSLSocketFactory for all subsequently instantiated DataURL objects - * @param socketFactory - */ - public static void setSSLSocketFactory(SSLSocketFactory socketFactory) { - sslSocketFactory = socketFactory; - } - - /** - * set HostnameVerifier for all subsequently instantiated DataURL objects - * @param hostNameVerifier - */ - public static void setHostNameVerifier(HostnameVerifier hostNameVerifier) { - DataUrl.hostNameVerifier = hostNameVerifier; - } -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnection.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnection.java deleted file mode 100644 index 384cf71c..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnection.java +++ /dev/null @@ -1,82 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import java.io.IOException; -import java.io.InputStream; -import java.net.SocketTimeoutException; -import java.net.URL; -import java.security.cert.X509Certificate; - -import at.gv.egiz.bku.slcommands.SLResult; - -/** - * Transmit a security layer result to DataURL via HTTP POST, encoded as multipart/form-data. - * The HTTP header user-agent is set to <em>citizen-card-environment/1.2 BKU2 1.0</em>. - * The form-parameter ResponseType is set to <em>HTTP-Security-Layer-RESPONSE</em>. - * All other headers/parameters are set by the caller. - * - * @author clemens - */ -public interface DataUrlConnection { - - public static final String FORMPARAM_RESPONSETYPE = "ResponseType"; - public static final String DEFAULT_RESPONSETYPE = "HTTP-Security-Layer-RESPONSE"; - public static final String FORMPARAM_XMLRESPONSE = "XMLResponse"; - public static final String FORMPARAM_BINARYRESPONSE = "BinaryResponse"; - - public static final String XML_RESPONSE_ENCODING = "UTF-8"; - - - public String getProtocol(); - - public URL getUrl(); - - /** - * Set a HTTP Header. - * @param key - * @param value multiple values are assumed to have the correct formatting (comma-separated list) - */ - public void setHTTPHeader(String key, String value); - - /** - * Set a form-parameter. - * @param name - * @param data - * @param contentType may be null - * @param charSet may be null - * @param transferEncoding may be null - */ - public void setHTTPFormParameter(String name, InputStream data, String contentType, String charSet, String transferEncoding); - - /** - * @pre httpHeaders != null - * @throws java.net.SocketTimeoutException - * @throws java.io.IOException - */ - public void connect() throws SocketTimeoutException, IOException; - - public X509Certificate getServerCertificate(); - - /** - * @pre connection != null - * @throws java.io.IOException - */ - public void transmit(SLResult slResult) throws IOException; - - public DataUrlResponse getResponse() throws IOException; -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java deleted file mode 100644 index 82c1be53..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java +++ /dev/null @@ -1,539 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.binding; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.net.HttpURLConnection; -import java.net.SocketTimeoutException; -import java.net.URL; -import java.net.URLEncoder; -import java.nio.charset.Charset; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLSocketFactory; -import javax.xml.transform.stream.StreamResult; - -import org.apache.commons.httpclient.methods.multipart.FilePart; -import org.apache.commons.httpclient.methods.multipart.Part; -import org.apache.commons.httpclient.methods.multipart.StringPart; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.binding.multipart.InputStreamPartSource; -import at.gv.egiz.bku.binding.multipart.SLResultPart; -import at.gv.egiz.bku.conf.Configurator; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slcommands.SLResult.SLResultType; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.utils.URLEncodingWriter; -import at.gv.egiz.bku.utils.binding.Protocol; - -/** - * An implementation of the DataUrlConnectionSPI that supports - * <code>multipart/form-data</code> encoding and - * <code>application/x-www-form-urlencoded</code> for compatibility with legacy - * systems. - * - */ -public class DataUrlConnectionImpl implements DataUrlConnectionSPI { - - private final static Log log = LogFactory.getLog(DataUrlConnectionImpl.class); - - public static final byte[] B_DEFAULT_RESPONSETYPE = DEFAULT_RESPONSETYPE.getBytes(Charset.forName("UTF-8")); - - /** - * Supported protocols are HTTP and HTTPS. - */ - public final static Protocol[] SUPPORTED_PROTOCOLS = { Protocol.HTTP, - Protocol.HTTPS }; - - /** - * The X509 certificate of the DataURL server. - */ - protected X509Certificate serverCertificate; - - /** - * The protocol of the DataURL. - */ - protected Protocol protocol; - - /** - * Use <code>application/x-www-form-urlencoded</code> instead of - * standard conform <code>application/x-www-form-urlencoded</code>. - */ - protected boolean urlEncoded = true; - - /** - * The value of the DataURL. - */ - protected URL url; - - /** - * The URLConnection used for communication with the DataURL server. - */ - private HttpURLConnection connection; - - /** - * The HTTP request headers. - */ - protected Map<String, String> requestHttpHeaders; - - /** - * The HTTP form parameters. - */ - protected ArrayList<HTTPFormParameter> httpFormParameter; - - /** - * The boundary for multipart/form-data requests. - */ - protected String boundary; - - /** - * The configuration properties. - */ - protected Properties config = null; - - /** - * The SSLSocketFactory for HTTPS connections. - */ - protected SSLSocketFactory sslSocketFactory; - - /** - * The HostnameVerifier for HTTPS connections. - */ - protected HostnameVerifier hostnameVerifier; - - /** - * The response of the DataURL server. - */ - protected DataUrlResponse result; - - /* (non-Javadoc) - * @see at.gv.egiz.bku.binding.DataUrlConnection#getProtocol() - */ - public String getProtocol() { - if (protocol == null) { - return null; - } - return protocol.toString(); - } - - /* (non-Javadoc) - * @see at.gv.egiz.bku.binding.DataUrlConnection#connect() - */ - public void connect() throws SocketTimeoutException, IOException { - connection = (HttpURLConnection) url.openConnection(); - if (connection instanceof HttpsURLConnection) { - log.trace("Detected ssl connection"); - HttpsURLConnection https = (HttpsURLConnection) connection; - if (sslSocketFactory != null) { - log.debug("Setting custom ssl socket factory for ssl connection"); - https.setSSLSocketFactory(sslSocketFactory); - } else { - log.trace("No custom socket factory set"); - } - if (hostnameVerifier != null) { - log.debug("Setting custom hostname verifier"); - https.setHostnameVerifier(hostnameVerifier); - } - } else { - log.trace("No secure connection with: " + url + " class=" - + connection.getClass()); - } - connection.setDoOutput(true); - // Transfer-Encoding: chunked is problematic ... - // e.g. https://issues.apache.org/bugzilla/show_bug.cgi?id=37794 - // ... therefore disabled. - // connection.setChunkedStreamingMode(5*1024); - if (urlEncoded) { - log.debug("Setting DataURL Content-Type to " - + HttpUtil.APPLICATION_URL_ENCODED); - connection.addRequestProperty(HttpUtil.HTTP_HEADER_CONTENT_TYPE, - HttpUtil.APPLICATION_URL_ENCODED); - } else { - log.debug("Setting DataURL Content-Type to " - + HttpUtil.MULTIPART_FOTMDATA_BOUNDARY); - connection.addRequestProperty(HttpUtil.HTTP_HEADER_CONTENT_TYPE, - HttpUtil.MULTIPART_FOTMDATA + HttpUtil.SEPERATOR[0] - + HttpUtil.MULTIPART_FOTMDATA_BOUNDARY + "=" + boundary); - } - Set<String> headers = requestHttpHeaders.keySet(); - Iterator<String> headerIt = headers.iterator(); - while (headerIt.hasNext()) { - String name = headerIt.next(); - connection.setRequestProperty(name, requestHttpHeaders.get(name)); - } - log.trace("Connecting to: " + url); - connection.connect(); - if (connection instanceof HttpsURLConnection) { - HttpsURLConnection ssl = (HttpsURLConnection) connection; - X509Certificate[] certs = (X509Certificate[]) ssl.getServerCertificates(); - if ((certs != null) && (certs.length >= 1)) { - log.trace("Server certificate: " + certs[0]); - serverCertificate = certs[0]; - } - } - } - - /* (non-Javadoc) - * @see at.gv.egiz.bku.binding.DataUrlConnection#getServerCertificate() - */ - public X509Certificate getServerCertificate() { - return serverCertificate; - } - - /* (non-Javadoc) - * @see at.gv.egiz.bku.binding.DataUrlConnection#setHTTPHeader(java.lang.String, java.lang.String) - */ - public void setHTTPHeader(String name, String value) { - if (name != null && value != null) { - requestHttpHeaders.put(name, value); - } - } - - /* (non-Javadoc) - * @see at.gv.egiz.bku.binding.DataUrlConnection#setHTTPFormParameter(java.lang.String, java.io.InputStream, java.lang.String, java.lang.String, java.lang.String) - */ - public void setHTTPFormParameter(String name, InputStream data, - String contentType, String charSet, String transferEncoding) { - // if a content type is specified we have to switch to multipart/formdata encoding - if (contentType != null && contentType.length() > 0) { - urlEncoded = false; - } - httpFormParameter.add(new HTTPFormParameter(name, data, contentType, - charSet, transferEncoding)); - } - - - - /* (non-Javadoc) - * @see at.gv.egiz.bku.binding.DataUrlConnection#transmit(at.gv.egiz.bku.slcommands.SLResult) - */ - public void transmit(SLResult slResult) throws IOException { - log.trace("Sending data"); - if (urlEncoded) { - // - // application/x-www-form-urlencoded (legacy, SL < 1.2) - // - - OutputStream os = connection.getOutputStream(); - OutputStreamWriter streamWriter = new OutputStreamWriter(os, HttpUtil.DEFAULT_CHARSET); - - // ResponseType - streamWriter.write(FORMPARAM_RESPONSETYPE); - streamWriter.write("="); - streamWriter.write(URLEncoder.encode(DEFAULT_RESPONSETYPE, "UTF-8")); - streamWriter.write("&"); - - // XMLResponse / Binary Response - if (slResult.getResultType() == SLResultType.XML) { - streamWriter.write(DataUrlConnection.FORMPARAM_XMLRESPONSE); - } else { - streamWriter.write(DataUrlConnection.FORMPARAM_BINARYRESPONSE); - } - streamWriter.write("="); - streamWriter.flush(); - URLEncodingWriter urlEnc = new URLEncodingWriter(streamWriter); - slResult.writeTo(new StreamResult(urlEnc), false); - urlEnc.flush(); - - // transfer parameters - char[] cbuf = new char[512]; - int len; - for (HTTPFormParameter formParameter : httpFormParameter) { - streamWriter.write("&"); - streamWriter.write(URLEncoder.encode(formParameter.getName(), "UTF-8")); - streamWriter.write("="); - InputStreamReader reader = new InputStreamReader(formParameter.getData(), - (formParameter.getCharSet() != null) - ? formParameter.getCharSet() - : "UTF-8"); - // Note, using UTF-8 as fallback for decoding is safe. - // If the request was x-www-form-urlencoded, - // UTF-8 has been used for encoding of non-ASCII characters. - // If the request was multipart/form-data and contains any transfer parameters, - // the data URL request is going to be multipart/form-data encoded (see below). - while ((len = reader.read(cbuf)) != -1) { - urlEnc.write(cbuf, 0, len); - } - urlEnc.flush(); - } - streamWriter.close(); - - } else { - // - // multipart/form-data (conforming to SL 1.2) - // - - ArrayList<Part> parts = new ArrayList<Part>(); - - // ResponseType - StringPart responseType = new StringPart(FORMPARAM_RESPONSETYPE, - DEFAULT_RESPONSETYPE, "UTF-8"); - responseType.setTransferEncoding(null); - parts.add(responseType); - - // XMLResponse / Binary Response - SLResultPart slResultPart = new SLResultPart(slResult, - XML_RESPONSE_ENCODING); - if (slResult.getResultType() == SLResultType.XML) { - slResultPart.setTransferEncoding(null); - slResultPart.setContentType(slResult.getMimeType()); - slResultPart.setCharSet(XML_RESPONSE_ENCODING); - } else { - slResultPart.setTransferEncoding(null); - slResultPart.setContentType(slResult.getMimeType()); - } - parts.add(slResultPart); - - // transfer parameters - for (HTTPFormParameter formParameter : httpFormParameter) { - InputStreamPartSource source = new InputStreamPartSource(null, - formParameter.getData()); - FilePart part = new FilePart(formParameter.getName(), source, - formParameter.getContentType(), formParameter.getCharSet()); - part.setTransferEncoding(formParameter.getTransferEncoding()); - parts.add(part); - } - - OutputStream os = connection.getOutputStream(); - Part.sendParts(os, parts.toArray(new Part[parts.size()]), boundary.getBytes()); - os.close(); - - } - - // MultipartRequestEntity PostMethod - InputStream is = null; - try { - is = connection.getInputStream(); - } catch (IOException iox) { - log.info(iox); - } - log.trace("Reading response"); - result = new DataUrlResponse(url.toString(), connection.getResponseCode(), - is); - Map<String, String> responseHttpHeaders = new HashMap<String, String>(); - Map<String, List<String>> httpHeaders = connection.getHeaderFields(); - for (Iterator<String> keyIt = httpHeaders.keySet().iterator(); keyIt - .hasNext();) { - String key = keyIt.next(); - StringBuffer value = new StringBuffer(); - for (String val : httpHeaders.get(key)) { - value.append(val); - value.append(HttpUtil.SEPERATOR[0]); - } - String valString = value.substring(0, value.length() - 1); - if ((key != null) && (value.length() > 0)) { - responseHttpHeaders.put(key, valString); - } - } - result.setResponseHttpHeaders(responseHttpHeaders); - } - - @Override - public DataUrlResponse getResponse() throws IOException { - return result; - } - - /** - * inits protocol, url, httpHeaders, formParams - * - * @param url - * must not be null - */ - @Override - public void init(URL url) { - - for (int i = 0; i < SUPPORTED_PROTOCOLS.length; i++) { - if (SUPPORTED_PROTOCOLS[i].toString().equalsIgnoreCase(url.getProtocol())) { - protocol = SUPPORTED_PROTOCOLS[i]; - break; - } - } - if (protocol == null) { - throw new SLRuntimeException("Protocol " + url.getProtocol() - + " not supported for data url"); - } - this.url = url; - boundary = "--" + IdFactory.getInstance().createId().toString(); - requestHttpHeaders = new HashMap<String, String>(); - - if (config != null) { - String version = config.getProperty(Configurator.SIGNATURE_LAYOUT); - if ((version != null) && (!"".equals(version.trim()))) { - log.debug("setting SignatureLayout header to " + version); - requestHttpHeaders.put(Configurator.SIGNATURE_LAYOUT, version); - } else { - log.debug("do not set SignatureLayout header"); - } - String userAgent = config.getProperty(Configurator.USERAGENT_CONFIG_P, Configurator.USERAGENT_DEFAULT); - requestHttpHeaders.put(HttpUtil.HTTP_HEADER_USER_AGENT, userAgent); - } else { - requestHttpHeaders - .put(HttpUtil.HTTP_HEADER_USER_AGENT, Configurator.USERAGENT_DEFAULT); - - } - - httpFormParameter = new ArrayList<HTTPFormParameter>(); - - } - - @Override - public DataUrlConnectionSPI newInstance() { - DataUrlConnectionSPI uc = new DataUrlConnectionImpl(); - uc.setConfiguration(config); - uc.setSSLSocketFactory(sslSocketFactory); - uc.setHostnameVerifier(hostnameVerifier); - return uc; - } - - @Override - public URL getUrl() { - return url; - } - - @Override - public void setConfiguration(Properties config) { - this.config = config; - } - - @Override - public void setSSLSocketFactory(SSLSocketFactory socketFactory) { - this.sslSocketFactory = socketFactory; - } - - @Override - public void setHostnameVerifier(HostnameVerifier hostnameVerifier) { - this.hostnameVerifier = hostnameVerifier; - } - - public class HTTPFormParameter { - - private String name; - - private InputStream data; - - private String contentType; - - private String charSet; - - private String transferEncoding; - - /** - * @param name - * @param data - * @param contentType - * @param charSet - * @param transferEncoding - */ - public HTTPFormParameter(String name, InputStream data, String contentType, - String charSet, String transferEncoding) { - super(); - this.name = name; - this.data = data; - this.contentType = contentType; - this.charSet = charSet; - this.transferEncoding = transferEncoding; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return the data - */ - public InputStream getData() { - return data; - } - - /** - * @param data the data to set - */ - public void setData(InputStream data) { - this.data = data; - } - - /** - * @return the contentType - */ - public String getContentType() { - return contentType; - } - - /** - * @param contentType the contentType to set - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - /** - * @return the charSet - */ - public String getCharSet() { - return charSet; - } - - /** - * @param charSet the charSet to set - */ - public void setCharSet(String charSet) { - this.charSet = charSet; - } - - /** - * @return the transferEncoding - */ - public String getTransferEncoding() { - return transferEncoding; - } - - /** - * @param transferEncoding the transferEncoding to set - */ - public void setTransferEncoding(String transferEncoding) { - this.transferEncoding = transferEncoding; - } - - - - } -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionSPI.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionSPI.java deleted file mode 100644 index f838b919..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionSPI.java +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.net.URL;
-import java.util.Properties; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLSocketFactory; -
-/**
- * Prototype of a DataurlconnectionSPI
- * @author wbauer
- *
- */
-public interface DataUrlConnectionSPI extends DataUrlConnection {
-
- /**
- * Returns a new instance of this class to handle a dataurl.
- * Called by the factory each time the openConnection method is called.
- * @return
- */
- public DataUrlConnectionSPI newInstance();
-
- /**
- * Initializes the DataUrlConnection
- * @param url
- */
- public void init(URL url); - - /** - * Sets configuration parameters for this connection - * @param config - */ - public void setConfiguration(Properties config); - - /** - * Sets the socketfactory to be used for ssl connections. - * @param socketFactory if null the socket factory will not be set explicitly - */ - public void setSSLSocketFactory(SSLSocketFactory socketFactory); - - /** - * Sets the hostname verifier to be used, - * @param hostnameVerifier if null the default hostname verifier will be used - */ - public void setHostnameVerifier(HostnameVerifier hostnameVerifier);
-
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlResponse.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlResponse.java deleted file mode 100644 index b75cb0f3..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlResponse.java +++ /dev/null @@ -1,98 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PushbackInputStream;
-import java.util.Iterator;
-import java.util.Map;
-
-import at.gv.egiz.bku.utils.urldereferencer.StreamData;
-
-/**
- * The response of a dataurl server.
- * Additionally holds return code and response headers.
- */
-public class DataUrlResponse extends StreamData {
-
- public final static String OK = "<ok/>";
-
- protected Map<String, String> responseHttpHeaders;
-
- protected int responseCode = -1;
-
- public DataUrlResponse(String url, int responseCode, InputStream stream) {
- super(url, null, new PushbackInputStream(stream, 10));
- this.responseCode = responseCode;
- }
-
- public String getContentType() {
- if (contentType != null) {
- return contentType;
- }
- if (responseHttpHeaders == null) {
- return null;
- }
- for (Iterator<String> keyIt = responseHttpHeaders.keySet().iterator(); keyIt
- .hasNext();) {
- String key = keyIt.next();
- if (HttpUtil.HTTP_HEADER_CONTENT_TYPE.equalsIgnoreCase(key)) {
- contentType = responseHttpHeaders.get(key);
- return contentType;
- }
- }
- return contentType;
- }
-
- public void setResponseHttpHeaders(Map<String, String> responseHttpHeaders) {
- this.responseHttpHeaders = responseHttpHeaders;
- }
-
- public Map<String, String> getResponseHeaders() {
- return responseHttpHeaders;
- }
-
- public int getResponseCode() {
- return responseCode;
- }
-
- /**
- * Checks if the http response equals "<ok/>"
- *
- * @throws IOException
- */
- public boolean isHttpResponseXMLOK() throws IOException {
- String charset = HttpUtil.getCharset(contentType, true);
- byte[] buffer = new byte[10];
- int i = 0;
- int read = 0;
- while ((i < 10) && (read != -1)) {
- read = inputStream.read(buffer, i, 10 - i);
- if (read != -1) {
- i += read;
- }
- }
- PushbackInputStream pbis = (PushbackInputStream) inputStream;
- pbis.unread(buffer, 0, i);
- if (i < 5) {
- return false;
- }
- String ok = new String(buffer, 0, i, charset);
- return (OK.equals(ok));
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/ExpiryRemover.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/ExpiryRemover.java deleted file mode 100644 index d17a27c2..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/ExpiryRemover.java +++ /dev/null @@ -1,67 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * This class can be used to check the BindingProcessorManager for expired entries and remove them.
- * Should be run periodically.
- *
- */
-public class ExpiryRemover implements RemovalStrategy {
-
- private static Log log = LogFactory.getLog(ExpiryRemover.class);
-
- protected BindingProcessorManager bindingProcessorManager;
- // keep max 5 min.
- protected long maxAcceptedAge = 1000 * 60 * 5;
-
- @Override
- public void execute() {
- log.debug("Triggered Expiry Remover");
- if (bindingProcessorManager == null) {
- log.warn("Bindingprocessor not set, skipping removal");
- return;
- }
- Set<Id> managedIds = bindingProcessorManager.getManagedIds();
- for (Iterator<Id> it = managedIds.iterator(); it.hasNext();) {
- Id bindId = it.next();
- BindingProcessor bp = bindingProcessorManager.getBindingProcessor(bindId);
- if (bp != null) {
- if (bp.getLastAccessTime().getTime() < (System.currentTimeMillis() - maxAcceptedAge)) {
- log.debug("Removing binding processor: " + bp.getId());
- bindingProcessorManager.removeBindingProcessor(bp.getId());
- }
- }
- }
- }
-
- public void setMaxAcceptedAge(long maxAcceptedAge) {
- this.maxAcceptedAge = maxAcceptedAge;
- }
-
- @Override
- public void setBindingProcessorManager(BindingProcessorManager bp) {
- bindingProcessorManager = bp;
- }
-
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FixedFormParameters.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FixedFormParameters.java deleted file mode 100644 index cce3d720..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FixedFormParameters.java +++ /dev/null @@ -1,28 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-/**
- * Form parameters with special meaning as defined in the CCE's http binding.
- *
- */
-public interface FixedFormParameters {
- String XMLREQUEST = "XMLRequest";
- String REDIRECTURL = "RedirectURL";
- String DATAURL = "DataURL";
- String STYLESHEETURL = "StylesheetURL";
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameter.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameter.java deleted file mode 100644 index 93339451..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameter.java +++ /dev/null @@ -1,39 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.InputStream;
-import java.util.Iterator;
-
-/**
- * Interface to access form control contents from the http request.
- * It's designed to be used for URL encoded and multipart-formdata requests.
- * @author wbauer
- *
- */
-public interface FormParameter {
-
- String getFormParameterName();
-
- InputStream getFormParameterValue();
-
- String getFormParameterContentType();
-
- Iterator<String> getHeaderNames();
-
- String getHeaderValue(String headerName);
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterImpl.java deleted file mode 100644 index 45aa9be6..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.Iterator;
-
-import org.apache.commons.fileupload.FileItemHeaders;
-
-/**
- * Simple wrapper to read data while consuming an stream within the http
- * processor.
- *
- *
- */
-public class FormParameterImpl implements FormParameter {
-
- protected InputStream dataStream;
- protected String contentType;
- protected String formName;
- protected FileItemHeaders headers;
-
- public FormParameterImpl(String contentType, String formName, InputStream is,
- FileItemHeaders header) {
- this.contentType = contentType;
- this.formName = formName;
- this.dataStream = is;
- this.headers = header;
- }
-
- @Override
- public String getFormParameterContentType() {
- return contentType;
- }
-
- @Override
- public String getFormParameterName() {
- return formName;
- }
-
- @Override
- public InputStream getFormParameterValue() {
- return dataStream;
- }
-
- @Override
- public String getHeaderValue(String headerName) {
- if (headers == null) {
- return null;
- }
- return headers.getHeader(headerName);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Iterator<String> getHeaderNames() {
- if (headers == null) {
- return Collections.EMPTY_LIST.iterator();
- }
- return headers.getHeaderNames();
- }
-
- public FileItemHeaders getHeaders() {
- return headers;
- }
-
- public boolean equals(Object other) {
- if (other instanceof FormParameter) {
- FormParameter fp = (FormParameter) other;
- return fp.getFormParameterName().equals(getFormParameterName());
- }
- return false;
- }
-
- public int hashCode() {
- return getFormParameterName().hashCode();
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterStore.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterStore.java deleted file mode 100644 index 8b6cd4b2..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/FormParameterStore.java +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.Iterator;
-
-import org.apache.commons.fileupload.FileItemHeaders;
-import org.apache.commons.fileupload.util.FileItemHeadersImpl;
-
-import at.gv.egiz.bku.slexceptions.SLRuntimeException;
-import at.gv.egiz.bku.utils.StreamUtil;
-
-/**
- * Simple store for form parameters based on a byte[]
- *
- * @author wbauer
- *
- */
-public class FormParameterStore implements FormParameter {
-
- private byte[] dataBuffer;
- private String contentType;
- private String parameterName;
- private boolean initialized = false;
- protected FileItemHeaders headers;
-
- /**
- * Make sure to call init after creating a new instance.
- */
- public FormParameterStore() {
- }
-
- public void init(InputStream dataSource, String paramName,
- String contentType, FileItemHeaders header) throws IOException {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- StreamUtil.copyStream(dataSource, os);
- this.dataBuffer = os.toByteArray();
- this.parameterName = paramName;
- this.contentType = contentType;
- initialized = true;
- this.headers = header;
- }
-
- public void init(byte[] dataSource, String paramName,
- String contentType, FileItemHeaders header) throws IOException {
- this.dataBuffer = dataSource;
- this.parameterName = paramName;
- this.contentType = contentType;
- initialized = true;
- this.headers = header;
- }
-
- public void init(FormParameter fp) throws IOException {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- StreamUtil.copyStream(fp.getFormParameterValue(), os);
- this.dataBuffer = os.toByteArray();
- this.parameterName = fp.getFormParameterName();
- this.contentType = fp.getFormParameterContentType();
- if (fp instanceof FormParameterImpl) {
- headers = ((FormParameterImpl) fp).getHeaders();
- } else {
- FileItemHeadersImpl headersImpl = new FileItemHeadersImpl();
- for (Iterator<String> i = fp.getHeaderNames(); i.hasNext();) {
- String headerName = i.next();
- headersImpl.addHeader(headerName, fp.getHeaderValue(headerName));
- }
- }
- initialized = true;
- }
-
- protected void ensureInitialized() {
- if (!initialized) {
- throw new SLRuntimeException("FormParameterStore not initialized");
- }
- }
-
- /**
- * Reads all data from the stream and stores it internally. The stream will
- * not be closed.
- *
- * @param datSource
- * @param formName
- * @param contentType
- */
- @Override
- public String getFormParameterContentType() {
- ensureInitialized();
- return contentType;
- }
-
- @Override
- public String getFormParameterName() {
- ensureInitialized();
- return parameterName;
- }
-
- /**
- * May be called more than once.
- */
- @Override
- public InputStream getFormParameterValue() {
- return new ByteArrayInputStream(dataBuffer);
- }
-
- @Override
- public String getHeaderValue(String name) {
- if (headers == null) {
- return null;
- }
- return headers.getHeader(name);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Iterator<String> getHeaderNames() {
- if (headers == null) {
- return Collections.EMPTY_LIST.iterator();
- }
- return headers.getHeaderNames();
- }
-
- public boolean isEmpty() {
- ensureInitialized();
- return dataBuffer.length == 0;
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java deleted file mode 100644 index e39addb5..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java +++ /dev/null @@ -1,844 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.binding; - -import iaik.utils.Base64InputStream; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.Writer; -import java.net.URL; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import javax.net.ssl.SSLHandshakeException; -import javax.xml.transform.Templates; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.URIResolver; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.slcommands.ErrorResult; -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLCommandFactory; -import at.gv.egiz.bku.slcommands.SLCommandInvoker; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slcommands.SLSourceContext; -import at.gv.egiz.bku.slcommands.SLTargetContext; -import at.gv.egiz.bku.slcommands.impl.ErrorResultImpl; -import at.gv.egiz.bku.slexceptions.SLBindingException; -import at.gv.egiz.bku.slexceptions.SLException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.utils.StreamUtil; -import at.gv.egiz.bku.utils.binding.Protocol; -import at.gv.egiz.bku.utils.urldereferencer.FormDataURLSupplier; -import at.gv.egiz.bku.utils.urldereferencer.SimpleFormDataContextImpl; -import at.gv.egiz.bku.utils.urldereferencer.StreamData; -import at.gv.egiz.bku.utils.urldereferencer.URIResolverAdapter; -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; -import at.gv.egiz.stal.QuitRequest; -import at.gv.egiz.stal.STALRequest; - -/** - * Class performing the HTTP binding as defined by the CCE specification. - * Currently a huge monolithic class. - * - * @TODO refactor - */ -@SuppressWarnings("unchecked") -public class HTTPBindingProcessor extends AbstractBindingProcessor implements - FormDataURLSupplier { - - private static Log log = LogFactory.getLog(HTTPBindingProcessor.class); - - private static enum State { - INIT, PROCESS, DATAURL, TRANSFORM, FINISHED - }; - - public final static Collection<String> XML_REQ_TRANSFER_ENCODING = Arrays - .asList(new String[] { "binary" }); - - protected static String XML_MIME_TYPE = "text/xml"; - protected static String BINARY_MIME_TYPE = "application/octet-stream"; - - /** - * If null everything is ok and the result is taken from the command invoker. - */ - protected SLException bindingProcessorError; - protected SLCommandInvoker commandInvoker; - protected DataUrlResponse dataUrlResponse; - protected Map<String, String> headerMap = Collections.EMPTY_MAP; - protected SLCommand slCommand; - protected Map<String, FormParameter> formParameterMap = new HashMap<String, FormParameter>(); - protected SLSourceContext srcContex = new SLSourceContext(); - protected SLTargetContext targetContext = new SLTargetContext(); - protected URL srcUrl; - protected State currentState = State.INIT; - protected Templates templates = null; - protected String resultContentType = null; - protected SLResult slResult = null; - protected int responseCode = 200; - protected Map<String, String> responseHeaders = Collections.EMPTY_MAP; - protected Locale locale = Locale.getDefault(); - protected boolean finished = false; - - /** - * - * @param id - * may be null. In this case a new session id will be created. - * @param cmdInvoker - * must not be null; - */ - public HTTPBindingProcessor(String id, SLCommandInvoker cmdInvoker, URL source) { - super(id); - this.srcUrl = source; - Protocol protocol = Protocol.fromString(source.getProtocol()); - if ((protocol != Protocol.HTTP) && (protocol != Protocol.HTTPS)) { - throw new SLRuntimeException("Protocol not supported: " + protocol); - } - if (cmdInvoker == null) { - throw new NullPointerException("Commandinvoker cannot be set to null"); - } - commandInvoker = cmdInvoker; - srcContex.setSourceUrl(source); - srcContex.setSourceIsDataURL(false); - } - - //---------------------------------------------------------------------------- - // ----------- BEGIN CONVENIENCE METHODS ----------- - - protected void sendSTALQuit() { - log.info("Sending QUIT command to STAL"); - List<STALRequest> quit = new ArrayList<STALRequest>(1); - quit.add(new QuitRequest()); - getSTAL().handleRequest(quit); - } - - protected String getFormParameterAsString(String formParameterName) { - FormParameter fp = formParameterMap.get(formParameterName); - return getFormParameterAsString(fp); - } - - protected String getFormParameterAsString(FormParameter fp) { - if (fp == null) { - return null; - } - try { - return StreamUtil.asString(fp.getFormParameterValue(), HttpUtil - .getCharset(fp.getFormParameterContentType(), true)); - } catch (IOException e) { - return null; - } - } - - protected String getDataUrl() { - return getFormParameterAsString(FixedFormParameters.DATAURL); - } - - protected String getStyleSheetUrl() { - return getFormParameterAsString(FixedFormParameters.STYLESHEETURL); - } - - protected List<FormParameter> getFormParameters(String parameterNamePostfix) { - List<FormParameter> resultList = new ArrayList<FormParameter>(); - for (Iterator<String> fpi = formParameterMap.keySet().iterator(); fpi - .hasNext();) { - String paramName = fpi.next(); - if (paramName.endsWith(parameterNamePostfix)) { - resultList.add(formParameterMap.get(paramName)); - } - } - return resultList; - } - - protected List<FormParameter> getTransferHeaders() { - return getFormParameters("__"); - } - - protected List<FormParameter> getTransferForms() { - List<FormParameter> resultList = new ArrayList<FormParameter>(); - for (Iterator<String> fpi = formParameterMap.keySet().iterator(); fpi - .hasNext();) { - String paramName = fpi.next(); - if ((paramName.endsWith("_")) && (!paramName.endsWith("__"))) { - resultList.add(formParameterMap.get(paramName)); - } - } - return resultList; - } - - protected void closeDataUrlConnection() { - log.debug("Closing data url input stream"); - if (dataUrlResponse == null) { - return; - } - InputStream is = dataUrlResponse.getStream(); - if (is != null) { - try { - is.close(); - } catch (IOException e) { - log.info("Error closing input stream to dataurl server:" + e); - } - } - } - - //---------------------------------------------------------------------------- - // ----------- END CONVENIENCE METHODS ----------- - - //---------------------------------------------------------------------------- - // -- BEGIN Methods that handle the http binding activities as defined in the - // activity diagram -- - - protected void init() { - log.info("Starting Bindingprocessor in Thread: " - + Thread.currentThread().getId()); - if (bindingProcessorError != null) { - log.debug("Detected binding processor error, sending quit command"); - // sendSTALQuit(); - currentState = State.FINISHED; - } else if (slCommand == null) { - log.error("SLCommand not set (consumeRequest not called ??)"); - bindingProcessorError = new SLException(2000); - // sendSTALQuit(); - currentState = State.FINISHED; - } else { - currentState = State.PROCESS; - } - } - - protected void processRequest() { - log.debug("Entered State: " + State.PROCESS); - log.debug("Processing command: " + slCommand); - commandInvoker.setCommand(slCommand); - responseCode = 200; - responseHeaders = Collections.EMPTY_MAP; - dataUrlResponse = null; - try { - commandInvoker.invoke(srcContex); - } catch (SLException e) { - log.info("Caught exception: " + e); - bindingProcessorError = e; - currentState = State.TRANSFORM; - } - if (getDataUrl() != null) { - log.debug("Data Url set to: " + getDataUrl()); - currentState = State.DATAURL; - } else { - log.debug("No data url set"); - currentState = State.TRANSFORM; - } - } - - protected void handleDataUrl() { - log.debug("Entered State: " + State.DATAURL); - try { - DataUrl dataUrl = new DataUrl(getDataUrl()); - DataUrlConnection conn = dataUrl.openConnection(); - - // set transfer headers - for (FormParameter fp : getTransferHeaders()) { - String paramString = getFormParameterAsString(fp); - if (paramString == null) { - log.error("Got empty transfer header, ignoring this"); - } else { - String[] keyVal = paramString.split(":", 2); - String key = keyVal[0]; - String val = null; - if (keyVal.length == 2) { - val = keyVal[1]; - val = val.trim(); - } else { - log.error("Invalid transfer header encoding: "+paramString); - throw new SLBindingException(2005); - } - log.debug("Setting header " + key + " to value " + val); - conn.setHTTPHeader(key, val); - } - } - - // set transfer form parameters - for (FormParameter fp : getTransferForms()) { - String contentTransferEncoding = null; - String contentType = fp.getFormParameterContentType(); - String charSet = HttpUtil.getCharset(contentType, false); - if (charSet != null) { - contentType = contentType.substring(0, contentType - .lastIndexOf(HttpUtil.SEPERATOR[0])); - } - for (Iterator<String> header = fp.getHeaderNames(); header.hasNext();) { - if (HttpUtil.CONTENT_TRANSFER_ENCODING - .equalsIgnoreCase(header.next())) { - contentTransferEncoding = getFormParameterAsString(fp); - } - } - log.debug("Setting form: " + fp.getFormParameterName() - + " contentType: " + contentType + " charset: " + charSet - + " contentTransferEncoding: " + contentTransferEncoding); - conn.setHTTPFormParameter(fp.getFormParameterName(), fp - .getFormParameterValue(), contentType, charSet, - contentTransferEncoding); - } - - // connect - conn.connect(); - // fetch and set SL result - targetContext.setTargetIsDataURL(true); - targetContext.setTargetCertificate(conn.getServerCertificate()); - targetContext.setTargetUrl(conn.getUrl()); - SLResult result = commandInvoker.getResult(targetContext); - - // transfer result - conn.transmit(result); - - // process Dataurl response - dataUrlResponse = conn.getResponse(); - log.debug("Received data url response code: " - + dataUrlResponse.getResponseCode()); - - switch (dataUrlResponse.getResponseCode()) { - case 200: - String contentType = dataUrlResponse.getContentType(); - log.debug("Got dataurl response content type: " + contentType); - if (contentType != null) { - if ((contentType.startsWith(HttpUtil.APPLICATION_URL_ENCODED)) - || (contentType.startsWith(HttpUtil.MULTIPART_FOTMDATA))) { - log.debug("Detected SL Request in dataurl response"); - // process headers and request - setHTTPHeaders(dataUrlResponse.getResponseHeaders()); - consumeRequestStream(dataUrlResponse.getStream()); - //TODO check for bindingProcessorError - closeDataUrlConnection(); - srcContex.setSourceCertificate(conn.getServerCertificate()); - srcContex.setSourceIsDataURL(true); - srcContex.setSourceUrl(conn.getUrl()); - currentState = State.PROCESS; - } else if (((contentType.startsWith(HttpUtil.TXT_HTML)) - || (contentType.startsWith(HttpUtil.TXT_PLAIN)) - || (contentType.startsWith(HttpUtil.TXT_XML))) - && (dataUrlResponse.isHttpResponseXMLOK())) { - log.info("Dataurl response matches <ok/> with content type: " - + contentType); - currentState = State.TRANSFORM; - - } else if ((contentType.startsWith(HttpUtil.TXT_XML)) - && (!dataUrlResponse.isHttpResponseXMLOK())) { - log - .debug("Detected text/xml dataurl response with content != <ok/>"); - headerMap.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, contentType); - assignXMLRequest(dataUrlResponse.getStream(), HttpUtil.getCharset( - contentType, true)); - closeDataUrlConnection(); - srcContex.setSourceCertificate(conn.getServerCertificate()); - srcContex.setSourceIsDataURL(true); - srcContex.setSourceUrl(conn.getUrl()); - currentState = State.PROCESS; - // just to be complete, actually not used - srcContex.setSourceHTTPReferer(dataUrlResponse.getResponseHeaders() - .get(HttpUtil.HTTP_HEADER_REFERER)); - } else { - resultContentType = contentType; - responseHeaders = dataUrlResponse.getResponseHeaders(); - responseCode = dataUrlResponse.getResponseCode(); - currentState = State.FINISHED; - } - } else { - log.debug("Content type not set in dataurl response"); - closeDataUrlConnection(); - throw new SLBindingException(2007); - } - - break; - case 307: - contentType = dataUrlResponse.getContentType(); - if ((contentType != null) && (contentType.startsWith(HttpUtil.TXT_XML))) { - log.debug("Received dataurl response code 307 with XML content"); - String location = dataUrlResponse.getResponseHeaders().get( - HttpUtil.HTTP_HEADER_LOCATION); - if (location == null) { - log - .error("Did not get a location header for a 307 data url response"); - throw new SLBindingException(2003); - } - // consumeRequestStream(dataUrlResponse.getStream()); - FormParameterStore fp = new FormParameterStore(); - fp.init(location.getBytes(HttpUtil.DEFAULT_CHARSET), - FixedFormParameters.DATAURL, null, null); - formParameterMap.put(FixedFormParameters.DATAURL, fp); - headerMap.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, contentType); - assignXMLRequest(dataUrlResponse.getStream(), HttpUtil.getCharset( - dataUrlResponse.getContentType(), true)); - closeDataUrlConnection(); - srcContex.setSourceCertificate(conn.getServerCertificate()); - srcContex.setSourceIsDataURL(true); - srcContex.setSourceUrl(conn.getUrl()); - currentState = State.PROCESS; - // just to be complete, actually not used - srcContex.setSourceHTTPReferer(dataUrlResponse.getResponseHeaders() - .get(HttpUtil.HTTP_HEADER_REFERER)); - - } else { - log.debug("Received dataurl response code 307 non XML content: " - + dataUrlResponse.getContentType()); - resultContentType = dataUrlResponse.getContentType(); - currentState = State.FINISHED; - } - responseHeaders = dataUrlResponse.getResponseHeaders(); - responseCode = dataUrlResponse.getResponseCode(); - break; - - case 301: - case 302: - case 303: - responseHeaders = dataUrlResponse.getResponseHeaders(); - responseCode = dataUrlResponse.getResponseCode(); - resultContentType = dataUrlResponse.getContentType(); - currentState = State.FINISHED; - break; - - default: - // issue error - log.info("Unexpected response code from dataurl server: " - + dataUrlResponse.getResponseCode()); - throw new SLBindingException(2007); - } - - } catch (SLException slx) { - bindingProcessorError = slx; - log.error("Error during dataurl communication"); - resultContentType = HttpUtil.TXT_XML; - currentState = State.TRANSFORM; - } catch (SSLHandshakeException hx) { - bindingProcessorError = new SLException(2010); - log.info("Error during dataurl communication", hx); - resultContentType = HttpUtil.TXT_XML; - currentState = State.TRANSFORM; - } catch (IOException e) { - bindingProcessorError = new SLBindingException(2001); - log.error("Error while data url handling", e); - resultContentType = HttpUtil.TXT_XML; - currentState = State.TRANSFORM; - return; - } - } - - protected void transformResult() { - log.debug("Entered State: " + State.TRANSFORM); - if (bindingProcessorError != null) { - resultContentType = HttpUtil.TXT_XML; - } else if (dataUrlResponse != null) { - resultContentType = dataUrlResponse.getContentType(); - } else { - targetContext.setTargetIsDataURL(false); - targetContext.setTargetUrl(srcUrl); - try { - slResult = commandInvoker.getResult(targetContext); - resultContentType = slResult.getMimeType(); - log - .debug("Successfully got SLResult from commandinvoker, setting mimetype to: " - + resultContentType); - } catch (SLException e) { - log.info("Cannot get result from invoker:", e); - bindingProcessorError = new SLException(6002); - resultContentType = HttpUtil.TXT_XML; - } - } - templates = getTemplates(getStyleSheetUrl()); - if (templates != null) { - log.debug("Output transformation required"); - resultContentType = templates.getOutputProperties().getProperty("media-type"); - log.debug("Got media type from stylesheet: " + resultContentType); - if (resultContentType == null) { - log.debug("Setting to default text/xml result conent type"); - resultContentType = "text/xml"; - } - log.debug("Deferring sytylesheet processing"); - } - currentState = State.FINISHED; - } - - protected void finished() { - log.debug("Entered State: " + State.FINISHED); - if (bindingProcessorError != null) { - log.debug("Binding processor error, sending quit command"); - resultContentType = HttpUtil.TXT_XML; - } - sendSTALQuit(); - log.info("Terminating Bindingprocessor; Thread: " - + Thread.currentThread().getId()); - finished = true; - } - - // -- END Methods that handle the http binding activities as defined in the - // activity diagram -- - //---------------------------------------------------------------------------- - - /** - * Sets the headers of the SL Request. IMPORTANT: make sure to set all headers - * before invoking {@link #consumeRequestStream(InputStream)} - * - * @param aHeaderMap - * if null all header will be cleared. - */ - public void setHTTPHeaders(Map<String, String> aHeaderMap) { - headerMap = new HashMap<String, String>(); - // ensure lowercase keys - if (aHeaderMap != null) { - for (String s : aHeaderMap.keySet()) { - if (s != null) { - headerMap.put(s.toLowerCase(), aHeaderMap.get(s)); - if (s.equalsIgnoreCase(HttpUtil.HTTP_HEADER_REFERER)) { - String referer = aHeaderMap.get(s); - log.debug("Got referer header: " + referer); - srcContex.setSourceHTTPReferer(referer); - } - } - } - } - } - - public void setSourceCertificate(X509Certificate aCert) { - srcContex.setSourceCertificate(aCert); - } - - /** - * The HTTPBindingProcessor does not handle redirect URLs. It only provides - * the parameter. - * - * @return null if redirect url is not set. - */ - public String getRedirectURL() { - return getFormParameterAsString(FixedFormParameters.REDIRECTURL); - } - - public String getFormDataContentType(String aParameterName) { - FormParameter fp = formParameterMap.get(aParameterName); - if (fp != null) { - return fp.getFormParameterContentType(); - } - return null; - } - - public InputStream getFormData(String aParameterName) { - FormParameter fp = formParameterMap.get(aParameterName); - if (fp != null) { - final String enc = fp.getHeaderValue("Content-Transfer-Encoding"); - if (enc == null || "binary".equals(enc)) { - return fp.getFormParameterValue(); - } else if ("base64".equals(enc)) { - return new Base64InputStream(fp.getFormParameterValue()); - } else { - return new InputStream() { - @Override - public int read() throws IOException { - throw new IOException("Content-Transfer-Encoding : " + enc - + " is not supported."); - } - }; - } - } - return null; - } - - protected void assignXMLRequest(InputStream is, String charset) - throws IOException, SLException { - Reader r = new InputStreamReader(is, charset); - StreamSource source = new StreamSource(r); - SLCommandContext commandCtx = new SLCommandContext(); - commandCtx.setSTAL(getSTAL()); - commandCtx.setURLDereferencerContext(new SimpleFormDataContextImpl(this)); - commandCtx.setLocale(locale); - slCommand = SLCommandFactory.getInstance().createSLCommand(source, - commandCtx); - log.debug("Created new command: " + slCommand); - } - - @Override - public void run() { - boolean done = false; - int hopcounter = 0; - if (bindingProcessorError != null) { - currentState = State.FINISHED; - } - try { - while (!done) { - try { - switch (currentState) { - case INIT: - init(); - break; - case PROCESS: - processRequest(); - break; - case DATAURL: - handleDataUrl(); - if (++hopcounter > config.getMaxDataUrlHops()) { - log.error("Maximum number of dataurl hops reached"); - bindingProcessorError = new SLBindingException(2000); - currentState = State.FINISHED; - } - break; - case TRANSFORM: - transformResult(); - break; - case FINISHED: - done = true; - finished(); - break; - } - } catch (RuntimeException rte) { - throw rte; - } catch (Exception t) { - log.error("Caught unexpected exception", t); - responseCode = 200; - resultContentType = HttpUtil.TXT_XML; - responseHeaders = Collections.EMPTY_MAP; - bindingProcessorError = new SLException(2000); - currentState = State.FINISHED; - } - } - } catch (Throwable t) { - log.error("Caught unexpected exception", t); - responseCode = 200; - resultContentType = HttpUtil.TXT_XML; - responseHeaders = Collections.EMPTY_MAP; - bindingProcessorError = new SLException(2000); - currentState = State.FINISHED; - } - log.debug("Terminated http binding processor"); - finished = true; - } - - @Override - public void consumeRequestStream(InputStream is) { - try { - log.debug("Start consuming request stream"); - formParameterMap.clear(); - String cl = headerMap - .get(HttpUtil.HTTP_HEADER_CONTENT_TYPE.toLowerCase()); - if (cl == null) { - log.info("No content type set in http header"); - throw new SLBindingException(2006); - } - InputDecoder id = InputDecoderFactory.getDecoder(cl, is); - if (id == null) { - log.error("Cannot get inputdecoder for is"); - throw new SLException(2006); - } - for (Iterator<FormParameter> fpi = id.getFormParameterIterator(); fpi - .hasNext();) { - FormParameter fp = fpi.next(); - log.debug("Got request parameter with name: " - + fp.getFormParameterName()); - if (fp.getFormParameterName().equals(FixedFormParameters.XMLREQUEST)) { - log.debug("Creating XML Request"); - for (Iterator<String> headerIterator = fp.getHeaderNames(); headerIterator - .hasNext();) { - String headerName = headerIterator.next(); - if (HttpUtil.CONTENT_TRANSFER_ENCODING.equalsIgnoreCase(headerName)) { - String transferEncoding = fp.getHeaderValue(headerName); - log.debug("Got transfer encoding for xmlrequest: " - + transferEncoding); - if (XML_REQ_TRANSFER_ENCODING.contains(transferEncoding)) { - log.debug("Supported transfer encoding: " + transferEncoding); - } else { - log - .error("Transferencoding not supported: " - + transferEncoding); - throw new SLBindingException(2005); - } - } - } - String charset = HttpUtil.getCharset(cl, true); - assignXMLRequest(fp.getFormParameterValue(), charset); - } else { - FormParameterStore fps = new FormParameterStore(); - fps.init(fp); - //if (!fps.isEmpty()) { - log.debug("Setting form parameter: " + fps.getFormParameterName()); - formParameterMap.put(fps.getFormParameterName(), fps); - //} - } - } - if (slCommand == null) { - throw new SLBindingException(2004); - } - } catch (SLException slx) { - log.info("Error while consuming input stream " + slx); - bindingProcessorError = slx; - } catch (Throwable t) { - log.info("Error while consuming input stream " + t, t); - bindingProcessorError = new SLException(2000); - } finally { - try { - if (is.read() != -1) { - log.warn("Request input stream not completely read."); - while (is.read() != -1); - } - } catch (IOException e) { - log.error(e); - } - } - } - - @Override - public String getResultContentType() { - return resultContentType; - } - - protected Templates getTemplates(String styleSheetURL) { - if (styleSheetURL == null) { - log.debug("Stylesheet URL not set"); - return null; - } - try { - URLDereferencerContext urlCtx = new SimpleFormDataContextImpl(this); - URIResolver resolver = new URIResolverAdapter(URLDereferencer - .getInstance(), urlCtx); - TransformerFactory factory = TransformerFactory.newInstance(); - factory.setURIResolver(resolver); - StreamData sd = URLDereferencer.getInstance().dereference(styleSheetURL, - urlCtx); - return factory.newTemplates(new StreamSource(sd.getStream())); - } catch (Exception ex) { - log.info("Cannot instantiate transformer", ex); - bindingProcessorError = new SLException(2002); - return null; - } - } - - protected void handleBindingProcessorError(OutputStream os, String encoding, - Templates templates) throws IOException { - log.debug("Writing error as result"); - ErrorResultImpl error = new ErrorResultImpl(bindingProcessorError, locale); - Writer writer = writeXMLDeclarationAndProcessingInstruction(os, encoding); - error.writeTo(new StreamResult(writer), templates, true); - } - - protected Writer writeXMLDeclarationAndProcessingInstruction(OutputStream os, String encoding) throws IOException { - if (encoding == null) { - encoding = HttpUtil.DEFAULT_CHARSET; - } - OutputStreamWriter writer = new OutputStreamWriter(os, encoding); - writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"); - writer.write("<?xml-stylesheet type=\"text/css\" href=\"errorresponse.css\"?>\n"); - return writer; - } - - @Override - public void writeResultTo(OutputStream os, String encoding) - throws IOException { - if (encoding == null) { - encoding = HttpUtil.DEFAULT_CHARSET; - } - if (bindingProcessorError != null) { - log.debug("Detected error in binding processor, writing error as result"); - handleBindingProcessorError(os, encoding, templates); - return; - } else if (dataUrlResponse != null) { - log.debug("Writing data url response as result"); - String charEnc = HttpUtil.getCharset(dataUrlResponse.getContentType(), - true); - InputStreamReader isr = new InputStreamReader( - dataUrlResponse.getStream(), charEnc); - OutputStreamWriter osw = new OutputStreamWriter(os, encoding); - if (templates == null) { - StreamUtil.copyStream(isr, osw); - } else { - try { - Transformer transformer = templates.newTransformer(); - transformer.transform(new StreamSource(isr), new StreamResult(osw)); - } catch (TransformerException e) { - log.fatal("Exception occured during result transformation", e); - // bindingProcessorError = new SLException(2008); - // handleBindingProcessorError(os, encoding, null); - return; - } - } - osw.flush(); - isr.close(); - } else if (slResult == null) { - // result not yet assigned -> must be a cancel - bindingProcessorError = new SLException(6001); - handleBindingProcessorError(os, encoding, templates); - return; - } else { - log.debug("Getting result from invoker"); - boolean fragment = false; - Writer writer; - if (slResult instanceof ErrorResult) { - writer = writeXMLDeclarationAndProcessingInstruction(os, encoding); - fragment = true; - } else { - writer = new OutputStreamWriter(os, encoding); - } - slResult.writeTo(new StreamResult(writer), templates, fragment); - writer.flush(); - } - } - - /** - * The response code from the dataurl server or 200 if no dataurl server - * created the result - * - * @return - */ - public int getResponseCode() { - return responseCode; - } - - /** - * All headers from the data url server in case of a direct forward from the - * dataurl server. - * - * @return - */ - public Map<String, String> getResponseHeaders() { - return responseHeaders; - } - - @Override - public void setLocale(Locale locale) { - if (locale == null) { - throw new NullPointerException("Locale must not be set to null"); - } - this.locale = locale; - } - - @Override - public boolean isFinished() { - return finished; - } -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java deleted file mode 100644 index 5ea7b25e..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/HttpUtil.java +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.util.Map;
-
-import org.apache.commons.fileupload.ParameterParser;
-
-/**
- * Placeholder for some HTTP related constants and helper method to extract the charset for a request.
- *
- */
-public class HttpUtil {
-
- public final static String CHAR_SET = "charset";
- public final static String DEFAULT_CHARSET = "ISO-8859-1";
- public final static String HTTP_HEADER_CONTENT_TYPE = "Content-Type";
- public static final String HTTP_HEADER_USER_AGENT = "User-Agent"; - public static final String HTTP_HEADER_SERVER = "Server";
- public final static String HTTP_HEADER_REFERER = "Referer";
- public final static String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
- public final static String MULTIPART_FOTMDATA = "multipart/form-data";
- public final static String MULTIPART_FOTMDATA_BOUNDARY = "boundary";
- public final static String TXT_XML = "text/xml";
- public final static String TXT_PLAIN = "text/plain";
- public final static String TXT_HTML = "text/html";
- public final static String APPLICATION_URL_ENCODED = "application/x-www-form-urlencoded";
- public final static String HTTP_HEADER_LOCATION = "Location";
-
- public final static char[] SEPERATOR = { ';' };
-
- /**
- * Extracts charset from a content type header.
- *
- * @param contentType
- * @param replaceNullWithDefault
- * if true the method return the default charset if not set
- * @return charset String or null if not present
- */
- @SuppressWarnings("unchecked")
- public static String getCharset(String contentType,
- boolean replaceNullWithDefault) {
- ParameterParser pf = new ParameterParser();
- pf.setLowerCaseNames(true);
- Map map = pf.parse(contentType, SEPERATOR);
- String retVal = (String) map.get(CHAR_SET);
- if ((retVal == null) && (replaceNullWithDefault)) {
- if (map.containsKey(APPLICATION_URL_ENCODED)) {
- // default charset for url encoded data
- return "UTF-8";
- }
- retVal = getDefaultCharset();
- }
- return retVal;
- }
-
- /**
- *
- * Not to be used for url encoded requests.
- */
- public static String getDefaultCharset() {
- return DEFAULT_CHARSET;
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/Id.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/Id.java deleted file mode 100644 index fc7c35c3..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/Id.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -/** - * The unique identifier for a BindingProcessor - * @author wbauer - * - */ -public interface Id { - - @Override - public String toString(); - - @Override - public boolean equals(Object id); -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdFactory.java deleted file mode 100644 index 60bf69a4..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdFactory.java +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Creates or converts Ids for BindingProcessors.
- * @author wbauer
- *
- */
-public class IdFactory {
-
- public static int DEFAULT_NUMBER_OF_BITS = 168;
-
- private static Log log = LogFactory.getLog(IdFactory.class);
-
- private static IdFactory instance = new IdFactory();
-
- private SecureRandom random;
- private int numberOfBits = DEFAULT_NUMBER_OF_BITS;
-
- private IdFactory() {
- try {
- random = SecureRandom.getInstance("SHA1PRNG");
- } catch (NoSuchAlgorithmException e) {
- log.error("Cannot instantiate secure random" + e);
- }
- }
-
- public static IdFactory getInstance() {
- return instance;
- }
-
-
- /**
- * set the secure random number generator to create secure ids.
- *
- * @param random
- * must not be null
- */
- public void setSecureRandom(SecureRandom random) {
- if (random == null) {
- throw new NullPointerException("Cannot set secure random to null");
- }
- this.random = random;
- }
-
- /**
- * Don't use this method unless you know exactly what you do !
- * Be sure to use a sufficient large entropy
- * @param numberOfBits >=1 (although this small entropy does not make sense)
- */
- public void setNumberOfBits(int numberOfBits) {
- if (numberOfBits <1) {
- throw new IllegalArgumentException("Cannot set number of bits < 1");
- }
- this.numberOfBits = numberOfBits;
- }
-
- public int getNumberOfBits() {
- return numberOfBits;
- }
-
- /**
- * Creates a new Id object with the factory's secure RNG and the set number of
- * bits.
- *
- * @return
- */
- public Id createId() {
- return new IdImpl(numberOfBits, random);
- }
-
- /**
- * Creates an Id object for the provided String
- *
- * @param idString
- * may be null in this case the method call creates a new Id.
- * @return
- */
- public Id createId(String idString) {
- if (idString == null) {
- return createId();
- }
- return new IdImpl(idString);
- }
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdImpl.java deleted file mode 100644 index c8a76823..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/IdImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import iaik.utils.Base64OutputStream; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.security.SecureRandom; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Implementation that uses a Base64 representation for self generated Ids. - * @author wbauer - * - */ -public class IdImpl implements at.gv.egiz.bku.binding.Id { - private static Log log = LogFactory.getLog(IdImpl.class); - - private String idString; - - public IdImpl(int bitNumber, SecureRandom random) { - int byteSize = bitNumber/8; - if (bitNumber % 8 != 0) { - byteSize++; - } - byte[] randomBytes = new byte[byteSize]; - random.nextBytes(randomBytes); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - Base64OutputStream b64 = new Base64OutputStream(baos); - try { - b64.write(randomBytes); - b64.flush(); - b64.close(); - idString = new String(baos.toByteArray()); - } catch (IOException e) { - log.error("Cannot create secure id: "+e); - } - } - - public IdImpl(String idString) { - if (idString == null) { - throw new NullPointerException("Provided idstring must not be null"); - } - this.idString = idString; - } - - @Override - public String toString() { - return idString; - } - - @Override - public int hashCode() { - return idString.hashCode(); - } - - @Override - public boolean equals(Object other) { - if (other instanceof Id) { - Id otherId = (Id)other; - return otherId.toString().equals(idString); - } else { - return false; - } - } -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoder.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoder.java deleted file mode 100644 index e22e54f2..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoder.java +++ /dev/null @@ -1,41 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.InputStream;
-import java.util.Iterator;
-
-/**
- * Decodes http input stream (either url encoded or multipart formdata)
- * @author wbauer
- *
- */
-public interface InputDecoder {
- /**
- * Called from Factory.
- * @param contentType
- */
- void setContentType(String contentType);
-
- /**
- * Called from Factory.
- * @param is the input must not be null
- */
- void setInputStream(InputStream is);
-
- Iterator<FormParameter> getFormParameterIterator();
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoderFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoderFactory.java deleted file mode 100644 index 211deee7..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/InputDecoderFactory.java +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Factory to get a matching instance for a encoded input stream when reading a http request.
- *
- */
-public class InputDecoderFactory {
-
- public final static String MULTIPART_FORMDATA = "multipart/form-data";
- public final static String URL_ENCODED = "application/x-www-form-urlencoded";
-
- private static InputDecoderFactory instance = new InputDecoderFactory();
- private static Log log = LogFactory.getLog(InputDecoderFactory.class);
-
- private String defaultEncoding = URL_ENCODED;
- private Map<String, Class<? extends InputDecoder>> decoderMap = new HashMap<String, Class<? extends InputDecoder>>();
-
- private InputDecoderFactory() {
- decoderMap.put(MULTIPART_FORMDATA, MultiPartFormDataInputDecoder.class);
- decoderMap.put(URL_ENCODED, XWWWFormUrlInputDecoder.class);
- }
-
- public static InputDecoder getDefaultDecoder(InputStream is) {
- return getDecoder(instance.defaultEncoding, is);
- }
-
- /**
- *
- * @param contentType
- * @param is
- * @return null if the content type is not supported
- */
- public static InputDecoder getDecoder(String contentType, InputStream is) {
- String prefix = contentType.split(";")[0].trim().toLowerCase();
- Class<? extends InputDecoder> dec = instance.decoderMap.get(prefix);
- if (dec == null) {
- log.info("Unknown encoding prefix " + contentType);
- return null;
- }
- InputDecoder id;
- try {
- id = dec.newInstance();
- id.setContentType(contentType);
- id.setInputStream(is);
- return id;
- } catch (InstantiationException e) {
- log.error(e);
- throw new IllegalArgumentException(
- "Cannot get an input decoder for content type: " + contentType);
- } catch (IllegalAccessException e) {
- log.error(e);
- throw new IllegalArgumentException(
- "Cannot get an input decoder for content type: " + contentType);
- }
- }
-
- /**
- * Allows to register decoders for special mime types.
- * @param mimeType
- * @param decoder
- */
- public static void registerDecoder(String mimeType,
- Class<? extends InputDecoder> decoder) {
- instance.decoderMap.put(mimeType.toLowerCase(), decoder);
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/MultiPartFormDataInputDecoder.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/MultiPartFormDataInputDecoder.java deleted file mode 100644 index f8b13553..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/MultiPartFormDataInputDecoder.java +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
-import org.apache.commons.fileupload.FileItemIterator;
-import org.apache.commons.fileupload.FileItemStream;
-import org.apache.commons.fileupload.FileUpload;
-import org.apache.commons.fileupload.FileUploadException;
-import org.apache.commons.fileupload.RequestContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.slexceptions.SLRuntimeException;
-
-/**
- * The code to detect the multipart boundary is based on
- * org.apache.commons.fileupload.FileUploadBase of
- * http://commons.apache.org/fileupload/
- *
- * @author wbauer
- *
- */
-public class MultiPartFormDataInputDecoder implements InputDecoder,
- RequestContext {
-
- private static Log log = LogFactory
- .getLog(MultiPartFormDataInputDecoder.class);
-
- private String contentType;
- private InputStream stream;
-
- @Override
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- @Override
- public String getCharacterEncoding() {
- return null;
- }
-
- @Override
- public int getContentLength() {
- return 0;
- }
-
- @Override
- public String getContentType() {
- return contentType;
- }
-
- @Override
- public InputStream getInputStream() throws IOException {
- return stream;
- }
-
- @Override
- public Iterator<FormParameter> getFormParameterIterator() {
- try {
- FileUpload fup = new FileUpload();
- FileItemIterator fit = fup.getItemIterator(this);
- return new IteratorDelegator(fit);
- } catch (Exception iox) {
- log.error("Cannot decode multipart form data stream " + iox);
- throw new SLRuntimeException(iox);
- }
- }
-
- @Override
- public void setInputStream(InputStream is) {
- stream = is;
- }
-
- static class IteratorDelegator implements Iterator<FormParameter> {
-
- private FileItemIterator fileItemIterator;
-
- public IteratorDelegator(FileItemIterator fit) {
- fileItemIterator = fit;
- }
-
- @Override
- public boolean hasNext() {
- try {
- return fileItemIterator.hasNext();
- } catch (FileUploadException e) {
- log.error(e);
- throw new SLRuntimeException(e);
- } catch (IOException e) {
- log.error(e);
- throw new SLRuntimeException(e);
- }
- }
-
- @Override
- public FormParameter next() {
- try {
- FileItemStream item = fileItemIterator.next();
- return new FormParameterImpl(item.getContentType(),
- item.getFieldName(), item.openStream(), item.getHeaders());
- } catch (FileUploadException e) {
- log.error(e);
- throw new SLRuntimeException(e);
- } catch (IOException e) {
- log.error(e);
- throw new SLRuntimeException(e);
- }
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException("Remove not supported");
- }
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/ProcessingContext.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/ProcessingContext.java deleted file mode 100644 index 913259f6..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/ProcessingContext.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package at.gv.egiz.bku.binding; - -import java.util.Hashtable; -import java.util.Map; -import java.util.concurrent.Future; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public class ProcessingContext { - - public static final String BINDING_PROCESSOR = "binding.processor"; - public static final String FUTURE = "future"; - - protected static final Log log = LogFactory.getLog(ProcessingContext.class); - - protected Map<String, Object> properties = new Hashtable<String, Object>(); - - public ProcessingContext(BindingProcessor bp, Future future) { - properties.put(BINDING_PROCESSOR, bp); - properties.put(FUTURE, future); - } - - public BindingProcessor getBindingProcessor() { - return (BindingProcessor) properties.get(BINDING_PROCESSOR); - } - - public Future getFuture() { - return (Future) properties.get(FUTURE); - } - - public Object get(String key) { - return properties.get(key); - } - - public void put(String key, Object value) { - properties.put(key, value); - } -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/RemovalStrategy.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/RemovalStrategy.java deleted file mode 100644 index 6c2dcb9f..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/RemovalStrategy.java +++ /dev/null @@ -1,26 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-/**
- * Could be used to remove expired BindingProcessor objects from a BindingProcessorManager.
- *
- */
-public interface RemovalStrategy {
- public void execute();
- public void setBindingProcessorManager(BindingProcessorManager bp);
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/SLCommandInvokerImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/SLCommandInvokerImpl.java deleted file mode 100644 index a23d96e8..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/SLCommandInvokerImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.binding; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.accesscontroller.SecurityManagerFacade; -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLCommandInvoker; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slcommands.SLSourceContext; -import at.gv.egiz.bku.slcommands.SLTargetContext; -import at.gv.egiz.bku.slexceptions.SLException; - -/** - * This class implements the entry point for the CCEs security management. - * - */ -public class SLCommandInvokerImpl implements SLCommandInvoker { - - private static Log log = LogFactory.getLog(SLCommandInvokerImpl.class); - - protected SLCommand command; - protected SLResult result; - protected SecurityManagerFacade securityManager; - - /** - * Invokes a sl command. - * - * @throws SLException - */ - public void invoke(SLSourceContext aContext) throws SLException { - if (securityManager == null) { - log.warn("Security policy not implemented yet, invoking command: " - + command); - result = command.execute(); - } else { - if (securityManager.mayInvokeCommand(command, aContext)) { - result = command.execute(); - } else { - throw new SLException(6002); - } - } - } - - public SLResult getResult(SLTargetContext aContext) throws SLException { - if (securityManager == null) { - log - .warn("Security policy not implemented yet, getting result of command: " - + command); - return result; - } else { - if (securityManager.maySendResult(command, aContext)) { - return result; - } else { - throw new SLException(6002); - } - } - } - - public void setCommand(SLCommand aCmd) { - command = aCmd; - } - - @Override - public SLCommandInvoker newInstance() { - SLCommandInvokerImpl cmdInv = new SLCommandInvokerImpl(); - cmdInv.setSecurityManager(securityManager); - return cmdInv; - } - - public SecurityManagerFacade getSecurityManager() { - return securityManager; - } - - public void setSecurityManager(SecurityManagerFacade securityManager) { - this.securityManager = securityManager; - } - -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java deleted file mode 100644 index 69c659e1..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.InputStream; -import java.util.Iterator; -import java.util.Map; - -import org.apache.commons.fileupload.ParameterParser; -
-public class XWWWFormUrlInputDecoder implements InputDecoder {
- - /** - * The MIME type 'application/x-www-form-urlencoded'. - */ - public static final String CONTENT_TYPE = "application/x-www-form-urlencoded"; - - /** - * The form parameter iterator. - */ - protected XWWWFormUrlInputIterator iterator; -
- @SuppressWarnings("unchecked") - @Override
- public void setContentType(String contentType) {
- ParameterParser pp = new ParameterParser();
- pp.setLowerCaseNames(true);
- Map<String, String> params = pp.parse(contentType, new char[] { ':', ';' });
- if (!params.containsKey(CONTENT_TYPE)) {
- throw new IllegalArgumentException(
- "not a url encoded content type specification: " + contentType);
- }
- }
-
- @Override
- public Iterator<FormParameter> getFormParameterIterator() {
- return iterator;
- }
-
- @Override
- public void setInputStream(InputStream is) {
- iterator = new XWWWFormUrlInputIterator(is);
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputIterator.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputIterator.java deleted file mode 100644 index 9279130d..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputIterator.java +++ /dev/null @@ -1,386 +0,0 @@ -package at.gv.egiz.bku.binding; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FilterInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; - -public class XWWWFormUrlInputIterator implements Iterator<FormParameter> { - - public static final byte NAME_VALUE_SEP = '='; - - public static final byte PARAM_SEP = '&'; - - public static final Charset UTF_8 = Charset.forName("UTF-8"); - - /** - * The default buffer size. - */ - protected static final int DEFAULT_BUFFER_SIZE = 4096; - - /** - * Are we done with parsing the input. - */ - protected boolean done = false; - - /** - * The x-www-formdata-urlencoded input stream to be parsed. - */ - protected final InputStream in; - - /** - * The buffer size. - */ - protected int bufferSize = DEFAULT_BUFFER_SIZE; - - /** - * The read buffer. - */ - protected final byte[] buf = new byte[bufferSize]; - - /** - * The read position. - */ - protected int pos; - - /** - * The number of valid bytes in the buffer; - */ - protected int count; - - /** - * The parameter returned by the last call of {@link #next()}; - */ - protected XWWWFormUrlEncodedParameter currentParameter; - - /** - * An IOException that cannot be reported immediately. - */ - protected IOException deferredIOException; - - /** - * Creates a new instance of this x-www-formdata-urlencoded input iterator - * with the given InputStream <code>in</code> to be parsed. - * - * @param in the InputStream to be parsed - */ - public XWWWFormUrlInputIterator(InputStream in) { - this.in = in; - } - - /* (non-Javadoc) - * @see java.util.Iterator#hasNext() - */ - @Override - public boolean hasNext() { - if (done) { - return false; - } - try { - if (currentParameter != null) { - // we have to disconnect the current parameter - // to look for further parameters - currentParameter.formParameterValue.disconnect(); - } - // fill buffer if empty - if (pos >= count) { - if ((count = in.read(buf)) == -1) { - // done - done = true; - return false; - } - pos = 0; - } - } catch (IOException e) { - deferredIOException = e; - // return true to be able to report error - return true; - } - return true; - } - - @Override - public FormParameter next() { - if (hasNext()) { - // skip separator - if (buf[pos] == PARAM_SEP) { - pos++; - } - currentParameter = new XWWWFormUrlEncodedParameter(); - return currentParameter; - } else { - throw new NoSuchElementException(); - } - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - public class XWWWFormUrlEncodedParameter implements FormParameter { - - /** - * The list of header names. - */ - // x-www-form-urlencoded parameters do not provide headers - protected final List<String> headers = Collections.emptyList(); - - /** - * The name of the form parameter. - */ - protected String formParameterName; - - /** - * The value of the form parameter. - */ - protected URLDecodingInputStream formParameterValue; - - public XWWWFormUrlEncodedParameter() { - // parse parameter name - URLDecodingInputStream urldec = new URLDecodingInputStream(in, NAME_VALUE_SEP); - InputStreamReader reader = new InputStreamReader(urldec, UTF_8); - try { - StringBuilder sb = new StringBuilder(); - char[] b = new char[128]; - for (int l = 0; (l = reader.read(b)) != -1;) { - sb.append(b, 0, l); - } - formParameterName = sb.toString(); - // fill buffer if empty - if (pos >= count) { - if ((count = in.read(buf)) == -1) { - throw new IOException("Invalid URL encoding."); - } - pos = 0; - } - // skip separator - pos++; - } catch (IOException e) { - deferredIOException = e; - formParameterName = ""; - } - formParameterValue = new URLDecodingInputStream(in, PARAM_SEP); - } - - @Override - public String getFormParameterContentType() { - // x-www-form-urlencoded parameters do not specify a content type - return null; - } - - @Override - public String getFormParameterName() { - return formParameterName; - } - - @Override - public InputStream getFormParameterValue() { - if (deferredIOException != null) { - final IOException e = deferredIOException; - deferredIOException = null; - return new InputStream() { - @Override - public int read() throws IOException { - throw e; - } - }; - } else { - return formParameterValue; - } - } - - @Override - public Iterator<String> getHeaderNames() { - return headers.iterator(); - } - - @Override - public String getHeaderValue(String headerName) { - return null; - } - - } - - public class URLDecodingInputStream extends FilterInputStream { - - /** - * Has this stream already been closed. - */ - private boolean closed = false; - - /** - * Has this stream been disconnected. - */ - private boolean disconnected = false; - - /** - * Read until this byte occurs. - */ - protected final byte term; - - /** - * Creates a new instance of this URLDecodingInputStream. - * - * @param in - * @param separator - */ - protected URLDecodingInputStream(InputStream in, byte separator) { - super(in); - this.term = separator; - } - - /* (non-Javadoc) - * @see java.io.FilterInputStream#read() - */ - @Override - public int read() throws IOException { - if (closed) { - throw new IOException("The stream has already been closed."); - } - if (disconnected) { - return in.read(); - } - - if (pos >= count) { - if ((count = in.read(buf)) == -1) { - return -1; - } - pos = 0; - } if (buf[pos] == term) { - return -1; - } else if (buf[pos] == '+') { - pos++; - return ' '; - } else if (buf[pos] == '%') { - if (++pos == count) { - if ((count = in.read(buf)) == -1) { - throw new IOException("Invalid URL encoding."); - } - pos = 0; - } - int c1 = Character.digit(buf[pos], 16); - if (++pos == count) { - if ((count = in.read(buf)) == -1) { - throw new IOException("Invalid URL encoding."); - } - pos = 0; - } - int c2 = Character.digit(buf[pos], 16); - return ((c1 << 4) | c2); - } else { - return buf[pos++]; - } - } - - /* (non-Javadoc) - * @see java.io.FilterInputStream#read(byte[], int, int) - */ - @Override - public int read(byte[] b, int off, int len) throws IOException { - if (closed) { - throw new IOException("The stream has already been closed."); - } - if (disconnected) { - return in.read(b, off, len); - } - - if ((off | len | (off + len) | (b.length - (off + len))) < 0) { - throw new IndexOutOfBoundsException(); - } else if (len == 0) { - return 0; - } - - if (pos >= count) { - if ((count = in.read(buf)) == -1) { - return -1; - } - pos = 0; - } - if (buf[pos] == term) { - return -1; - } - - int l = 0; - for (;;) { - while (pos < count) { - if (l == len || buf[pos] == term) { - return l; - } else if (buf[pos] == '+') { - b[off] = ' '; - } else if (buf[pos] == '%') { - if (++pos == count) { - if ((count = in.read(buf)) == -1) { - throw new IOException("Invalid URL encoding."); - } - pos = 0; - } - int c1 = Character.digit(buf[pos], 16); - if (++pos == count) { - if ((count = in.read(buf)) == -1) { - throw new IOException("Invalid URL encoding."); - } - pos = 0; - } - int c2 = Character.digit(buf[pos], 16); - b[off] = (byte) ((c1 << 4) | c2); - } else { - b[off] = buf[pos]; - } - pos++; - off++; - l++; - } - if ((count = in.read(buf)) == -1) { - return l; - } - pos = 0; - } - } - - /** - * Disconnect from the InputStream and buffer all remaining data. - * - * @throws IOException - */ - public void disconnect() throws IOException { - if (!disconnected) { - // don't waste space for a buffer if end of stream has already been - // reached - byte[] b = new byte[1]; - if ((read(b)) != -1) { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - os.write(b); - b = new byte[1024]; - for (int l; (l = read(b, 0, b.length)) != -1;) { - os.write(b, 0, l); - } - super.in = new ByteArrayInputStream(os.toByteArray()); - } - disconnected = true; - } - } - - /* (non-Javadoc) - * @see java.io.FilterInputStream#close() - */ - @Override - public void close() throws IOException { - if (!hasNext()) { - // don't close the underlying stream until all parts are read - super.close(); - } - disconnect(); - closed = true; - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/InputStreamPartSource.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/InputStreamPartSource.java deleted file mode 100644 index 1a22f787..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/InputStreamPartSource.java +++ /dev/null @@ -1,61 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding.multipart; - -import java.io.IOException; -import java.io.InputStream; -import org.apache.commons.httpclient.methods.multipart.PartSource; - -/** - * InputStream source for FilePart. - * DOES NOT RETURN A CORRECT LENGTH OF THE INPUT DATA. (but we don't care, since we use chunked encoding) - * - * @author clemens - */ -public class InputStreamPartSource implements PartSource { - - protected String name; - protected InputStream data; - - public InputStreamPartSource(String name, InputStream data) { - this.name = name; - this.data = data; - } - - /** - * Just a dummy value to make Part work - * @return 42 - */ - @Override - public long getLength() { - //System.out.println("***********GETLENGTH"); - return 42; - } - - @Override - public String getFileName() { - return name; - } - - @Override - public InputStream createInputStream() throws IOException { - if (data == null) - throw new IOException("Failed to get stream for part: no data was set."); - return data; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/SLResultPart.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/SLResultPart.java deleted file mode 100644 index d896ea9f..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/binding/multipart/SLResultPart.java +++ /dev/null @@ -1,71 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding.multipart; - -import at.gv.egiz.bku.binding.DataUrlConnection; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slcommands.SLResult.SLResultType; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.OutputStreamWriter; - -import javax.xml.transform.stream.StreamResult; - -import org.apache.commons.httpclient.methods.multipart.FilePart; -import org.apache.commons.httpclient.methods.multipart.PartSource; - -public class SLResultPart extends FilePart { - - protected SLResult slResult; - protected String encoding; - - public SLResultPart(SLResult slResult, String encoding) { - super((slResult.getResultType() == SLResultType.XML) - ? DataUrlConnection.FORMPARAM_XMLRESPONSE - : DataUrlConnection.FORMPARAM_BINARYRESPONSE, - new PartSource() { - - @Override - public long getLength() { - // may return null, as sendData() is overridden - return 0; - } - - @Override - public String getFileName() { - // return null, to prevent content-disposition header - return null; - } - - @Override - public InputStream createInputStream() throws IOException { - // may return null, as sendData() is overridden below - return null; - } - } - ); - this.slResult = slResult; - this.encoding = encoding; - } - - @Override - protected void sendData(OutputStream out) throws IOException { - slResult.writeTo(new StreamResult(new OutputStreamWriter(out, encoding)), false); - } -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/CertValidator.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/CertValidator.java deleted file mode 100644 index 6a95b369..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/CertValidator.java +++ /dev/null @@ -1,13 +0,0 @@ -package at.gv.egiz.bku.conf;
-
-import iaik.x509.X509Certificate;
-
-import java.io.File;
-
-public interface CertValidator {
-
- public abstract void init(File certDir, File caDir);
-
- public abstract boolean isCertificateValid(String transactionId, X509Certificate[] certs);
-
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/CertValidatorImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/CertValidatorImpl.java deleted file mode 100644 index 3b2d1b99..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/CertValidatorImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -package at.gv.egiz.bku.conf;
-
-import iaik.logging.LogConfigurationException;
-import iaik.logging.TransactionId;
-import iaik.logging.impl.TransactionIdImpl;
-import iaik.logging.LoggerConfig;
-import iaik.pki.DefaultPKIConfiguration;
-import iaik.pki.DefaultPKIProfile;
-import iaik.pki.PKIConfiguration;
-import iaik.pki.PKIException;
-import iaik.pki.PKIFactory;
-import iaik.pki.PKIModule;
-import iaik.pki.PKIProfile;
-import iaik.pki.store.certstore.CertStoreParameters;
-import iaik.pki.store.certstore.directory.DefaultDirectoryCertStoreParameters;
-import iaik.pki.store.truststore.DefaultTrustStoreProfile;
-import iaik.pki.store.truststore.TrustStoreProfile;
-import iaik.pki.store.truststore.TrustStoreTypes;
-import iaik.x509.X509Certificate;
-
-import java.io.File;
-import java.util.Date;
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class CertValidatorImpl implements CertValidator {
-
- private static Log log = LogFactory.getLog(CertValidatorImpl.class);
-
- private PKIFactory pkiFactory;
- private PKIProfile profile;
-
- public CertValidatorImpl() {
-
- }
-
- /* (non-Javadoc)
- * @see at.gv.egiz.bku.conf.CertValidator#init(java.io.File, java.io.File)
- */
- public void init(File certDir, File caDir) {
- // initialize IAIK logging for PKI module
- log.debug("Configuring logging for IAIK PKI module");
- iaik.logging.LogFactory.configure(new LoggerConfig() {
-
- @Override
- public Properties getProperties() throws LogConfigurationException {
- return null;
- }
-
- @Override
- public String getNodeId() {
- return "pki";
- }
-
- @Override
- public String getFactory() {
- return IAIKCommonsLogFactory.class.getName();
- }
- });
-
-
- // the parameters specifying the directory certstore
- CertStoreParameters[] certStoreParameters = { new DefaultDirectoryCertStoreParameters(
- "CS-001", certDir.getAbsolutePath(), true, false) };
-
- // create a new PKI configuration using the certstore parameters
- PKIConfiguration pkiConfig = new DefaultPKIConfiguration(
- certStoreParameters);
-
- // Transaction ID for logging
- TransactionId tid = new TransactionIdImpl("Configure-PKI");
- // get PKI factory for creating PKI module(s)
- pkiFactory = PKIFactory.getInstance();
- // configure the factory
- try {
- pkiFactory.configure(pkiConfig, tid);
- } catch (PKIException e) {
- log.error("Cannot configure PKI module", e);
- }
- // the truststore to be used
- TrustStoreProfile trustProfile = new DefaultTrustStoreProfile("TS-001",
- TrustStoreTypes.DIRECTORY, caDir.getAbsolutePath());
- profile = new DefaultPKIProfile(trustProfile);
- ((DefaultPKIProfile)profile).setAutoAddCertificates(true);
- }
-
- /* (non-Javadoc)
- * @see at.gv.egiz.bku.conf.CertValidator#isCertificateValid(java.lang.String, iaik.x509.X509Certificate[])
- */
- public boolean isCertificateValid(String transactionId,
- X509Certificate[] certs) {
- // Transaction ID for logging
- TransactionId tid = new TransactionIdImpl(transactionId);
- // get a PKIModule
- PKIModule pkiModule;
- try {
- pkiModule = pkiFactory.getPKIModule(profile);
- return pkiModule.validateCertificate(new Date(), certs[0], certs, null,
- tid).isCertificateValid();
- } catch (PKIException e) {
- log.error("Cannot validate certificate", e);
- }
- return false;
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configuration.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configuration.java deleted file mode 100644 index f813b14d..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configuration.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package at.gv.egiz.bku.conf; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * BKU Common Configuration - * - * Injected to BKU Common classes as defined in mocca-conf.xml - * - * Replace at.gv.egiz.bku.conf.Configurator, - * currently only few configuration options are supported. - * - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public class Configuration { - - public static final int MAX_DATAURL_HOPS_DEFAULT = 50; - public static final String IMPLEMENTATION_NAME_DEFAULT = "MOCCA"; - public static final String IMPLEMENTATION_VERSION_DEFAULT = "UNKNOWN"; - - private static final Log log = LogFactory.getLog(Configuration.class); - - private int maxDataUrlHops = -1; - private String implementationName; - private String implementationVersion; - - public void setMaxDataUrlHops(int maxDataUrlHops) { - this.maxDataUrlHops = maxDataUrlHops; - } - - /** - * Defines the maximum number of dataurl connects that are allowed within a - * single SL Request processing. - */ - public int getMaxDataUrlHops() { - if (maxDataUrlHops < 0) { - log.warn("maxDataUrlHops not configured, using default: " + MAX_DATAURL_HOPS_DEFAULT); - return MAX_DATAURL_HOPS_DEFAULT; - } - return maxDataUrlHops; - } - - /** - * @return the implementationName - */ - public String getImplementationName() { - if (implementationName == null) { - log.info("implementationName not configured, using default: " + IMPLEMENTATION_NAME_DEFAULT); - return "MOCCA"; - } - return implementationName; - } - - /** - * @param implementationName the implementationName to set - */ - public void setImplementationName(String implementationName) { - this.implementationName = implementationName; - } - - /** - * @return the implementationVersion - */ - public String getImplementationVersion() { - if (implementationName == null) { - log.info("implementationName not configured, using default: " + IMPLEMENTATION_VERSION_DEFAULT); - return IMPLEMENTATION_VERSION_DEFAULT; - } - return implementationVersion; - } - - /** - * @param implementationVersion the implementationVersion to set - */ - public void setImplementationVersion(String implementationVersion) { - this.implementationVersion = implementationVersion; - } - - - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java deleted file mode 100644 index 50f5d2b4..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java +++ /dev/null @@ -1,467 +0,0 @@ -package at.gv.egiz.bku.conf;
-
-import iaik.security.ecc.provider.ECCProvider;
-import iaik.security.provider.IAIK;
-import iaik.xml.crypto.XSecProvider;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.security.GeneralSecurityException;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.NoSuchAlgorithmException;
-import java.security.Provider;
-import java.security.Security;
-import java.security.Provider.Service;
-import java.security.cert.CertStore;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.CollectionCertStoreParameters;
-import java.security.cert.LDAPCertStoreParameters;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.binding.DataUrl;
-import at.gv.egiz.bku.slcommands.impl.xsect.DataObject;
-import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider;
-import at.gv.egiz.bku.slexceptions.SLRuntimeException;
-import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer;
-import javax.net.ssl.SSLSocketFactory;
-
-public abstract class Configurator {
-
- private Log log = LogFactory.getLog(Configurator.class);
-
- public final static String USERAGENT_CONFIG_P = "UserAgent";
- public static final String DATAURLCONNECTION_CONFIG_P = "DataURLConnectionImplClass";
-
- public static final String USERAGENT_DEFAULT = "citizen-card-environment/1.2 MOCCA/UNKNOWN";
- public static final String USERAGENT_BASE = "citizen-card-environment/1.2 MOCCA/";
-
- public static final String SIGNATURE_LAYOUT = "SignatureLayout";
-
- protected Properties properties;
-
- protected CertValidator certValidator;
- protected String signaturLayoutVersion;
-
- protected Configurator() {
- }
-
- protected abstract File getCertDir();
-
- protected abstract File getCADir();
-
- protected abstract InputStream getManifest();
-
- private X509Certificate[] getCACerts() throws IOException,
- CertificateException {
- List<X509Certificate> caCerts = new ArrayList<X509Certificate>();
- File caDir = getCADir();
- if (caDir != null) {
- if (!caDir.isDirectory()) {
- log.error("Expecting directory as SSL.caDirectory parameter");
- throw new SLRuntimeException(
- "Expecting directory as SSL.caDirectory parameter");
- }
- log.info("loading trustStore from " + caDir.getAbsolutePath());
- CertificateFactory cf = CertificateFactory.getInstance("X.509");
- for (File f : caDir.listFiles()) {
- try {
- FileInputStream fis = new FileInputStream(f);
- X509Certificate cert = (X509Certificate) cf.generateCertificate(fis);
- fis.close();
- log.debug("Adding trusted cert " + cert.getSubjectDN());
- caCerts.add(cert);
- } catch (Exception e) {
- log.error("Cannot add trusted ca", e);
- }
- }
- return caCerts.toArray(new X509Certificate[caCerts.size()]);
- } else {
- log.warn("No CA certificates configured");
- }
- return null;
- }
-
- protected List<CertStore> getCertstore() throws IOException,
- CertificateException, InvalidAlgorithmParameterException,
- NoSuchAlgorithmException {
- List<CertStore> resultList = new ArrayList<CertStore>();
- File certDir = getCertDir();
- if (certDir != null) {
- if (!certDir.isDirectory()) {
- log.error("Expecting directory as SSL.certDirectory parameter");
- throw new SLRuntimeException(
- "Expecting directory as SSL.certDirectory parameter");
- }
- log.info("loading certStore from " + certDir.getAbsolutePath());
- List<X509Certificate> certCollection = new LinkedList<X509Certificate>();
- CertificateFactory cf = CertificateFactory.getInstance("X.509");
- for (File f : certDir.listFiles()) {
- try {
- FileInputStream fis = new FileInputStream(f);
- X509Certificate cert = (X509Certificate) cf.generateCertificate(fis);
- certCollection.add(cert);
- fis.close();
- log
- .trace("Added following cert to certstore: "
- + cert.getSubjectDN());
- } catch (Exception ex) {
- log.error("Cannot add certificate", ex);
- }
- }
- CollectionCertStoreParameters csp = new CollectionCertStoreParameters(
- certCollection);
- resultList.add(CertStore.getInstance("Collection", csp));
- log.info("Added collection certstore");
- } else {
- log.warn("No certstore directory configured");
- }
- String ldapHost = getProperty("SSL.ldapServer");
- if ((ldapHost != null) && (!"".equals(ldapHost))) {
- String ldapPortString = getProperty("SSL.ldapPort");
- int ldapPort = 389;
- if (ldapPortString != null) {
- try {
- ldapPort = Integer.parseInt(ldapPortString);
- } catch (NumberFormatException nfe) {
- log.error("Invalid ldap port, using default 389");
- }
- } else {
- log.warn("ldap port not specified, using default 389");
- }
- LDAPCertStoreParameters ldapParams = new LDAPCertStoreParameters(
- ldapHost, ldapPort);
- resultList.add(CertStore.getInstance("LDAP", ldapParams));
- log.info("Added LDAP certstore");
- }
- return resultList;
- }
-
- protected void configUrlConnections() {
- HttpsURLConnection.setFollowRedirects(false);
- HttpURLConnection.setFollowRedirects(false);
- }
-
- protected void configureProviders() {
- log.debug("Registering security providers");
-
- IAIK iaikProvider = new IAIK();
- if (Security.getProvider(iaikProvider.getName()) == null) {
- // register IAIK provider at first position
- Security.insertProviderAt(iaikProvider, 1);
- } else {
- // IAIK provider already registered
- log.info("Provider " + iaikProvider.getName() + " already registered.");
- }
-
- ECCProvider eccProvider = new ECCProvider(false);
- if (Security.getProvider(eccProvider.getName()) == null) {
- // register ECC Provider at second position
- Security.insertProviderAt(eccProvider, 2);
- } else {
- // ECC Provider already registered
- log.info("Provider " + eccProvider.getName() + " already registered.");
- }
-
- // registering STALProvider as delegation provider for XSECT
- STALProvider stalProvider = new STALProvider();
- if (Security.getProvider(stalProvider.getName()) == null) {
- // register STAL provider
- Set<Service> services = stalProvider.getServices();
- StringBuilder sb = new StringBuilder();
- for (Service service : services) {
- String algorithm = service.getType() + "." + service.getAlgorithm();
- XSecProvider.setDelegationProvider(algorithm, stalProvider.getName());
- sb.append("\n" + algorithm);
- }
- log
- .debug("Registered STALProvider as XSecProvider delegation provider for the following services : "
- + sb.toString());
-
- Security.addProvider(stalProvider);
- } else {
- // STAL Provider already registered
- log.info("Provider " + stalProvider.getName() + " already registered.");
- }
-
- if (Security.getProvider(XSecProvider.NAME) == null) {
- // register XML Security provider
- XSecProvider.addAsProvider(false);
- } else {
- log.info("Provider " + XSecProvider.NAME + " already registered.");
- }
-
- if (log.isDebugEnabled()) {
- StringBuilder sb = new StringBuilder();
- sb.append("Registered providers: ");
- int i = 1;
- for (Provider prov : Security.getProviders()) {
- sb.append((i++) + ". : " + prov);
- }
- log.debug(sb.toString());
- }
- }
-
- protected void configViewer() {
- String bv = properties.getProperty("ValidateHashDataInputs");
- if (bv != null) {
- DataObject.enableHashDataInputValidation(Boolean.parseBoolean(bv));
- } else {
- log.warn("ValidateHashDataInputs not set, falling back to default");
- }
- }
-
- public void configureSingatureLayoutVersion() {
- if (properties.get(SIGNATURE_LAYOUT) == null) {
- try {
- String classContainer = Configurator.class.getProtectionDomain()
- .getCodeSource().getLocation().toString();
- URL manifestUrl = new URL("jar:" + classContainer
- + "!/META-INF/MANIFEST.MF");
- Manifest manifest = new Manifest(manifestUrl.openStream());
- Attributes att = manifest.getMainAttributes();
- String layout = null;
- if (att != null) {
- layout = att.getValue(SIGNATURE_LAYOUT);
- }
- if (layout != null) {
- log.info("setting SignatureLayout header to " + layout);
- properties.put(SIGNATURE_LAYOUT, layout);
- } else {
- log.warn("no SignatureLayout version defined");
- }
- } catch (Exception ex) {
- log.warn("Cannot read manifest", ex);
- }
- }
- }
-
- public void configureNetwork() {
- String proxy = getProperty("HTTPProxyHost");
- String portString = getProperty("HTTPProxyPort");
- if ((proxy == null) || (proxy.equals(""))) {
- log.info("No proxy configured");
- } else {
- log.info("Setting proxy to: " + proxy + ":" + portString);
- System.setProperty("proxyHost", proxy);
- System.setProperty("proxyPort", portString);
- }
- String timeout = getProperty("DefaultSocketTimeout");
- if ((timeout != null) && (!timeout.equals(""))) {
- System.setProperty("sun.net.client.defaultConnectTimeout", timeout);
- }
- }
-
- public void configureVersion() {
- if (properties.getProperty(USERAGENT_CONFIG_P) == null) {
- Properties p = new Properties();
- try {
- InputStream is = getManifest();
- if (is != null) {
- p.load(getManifest());
- String version = p.getProperty("Implementation-Build");
- if (version == null) {
- version="UNKNOWN";
- }
- properties.setProperty(USERAGENT_CONFIG_P, USERAGENT_BASE + version);
- log.debug("Setting user agent to: "
- + properties.getProperty(USERAGENT_CONFIG_P));
- } else {
- log.warn("Failed to read manifest, setting user-agent to " + USERAGENT_DEFAULT);
- properties.setProperty(USERAGENT_CONFIG_P, USERAGENT_DEFAULT);
- }
- } catch (IOException e) {
- log.error(e);
- }
- } else {
- log.info("using configured user agent " + properties.getProperty(USERAGENT_CONFIG_P));
- }
- }
-
- /**
- * TODO cleanup configuration (read MANIFEST, DataURLconfig,...)
- */
- public void configure() {
- configureProviders();
- configUrlConnections();
- configViewer();
- configureSSL();
- configureVersion();
- configureSingatureLayoutVersion();
- configureNetwork();
- //after configureVersion() and configureSignatureLayoutVersion()
- DataUrl.setConfiguration(properties);
- }
-
- public void setConfiguration(Properties props) {
- this.properties = props;
- }
-
- public String getProperty(String key) {
- if (properties != null) {
- return properties.getProperty(key);
- }
- return null;
- }
-
- public void configureSSL() {
- X509Certificate[] caCerts = null;
- try {
- caCerts = getCACerts();
- } catch (Exception e1) {
- log.error("Cannot load CA certificates", e1);
- }
- String disableAll = getProperty("SSL.disableAllChecks");
- String disableHostnameVerification = getProperty("SSL.disableHostnameVerification");
- try {
- KeyManager[] km = null;
- SSLContext sslCtx = SSLContext
- .getInstance(getProperty("SSL.sslProtocol"));
- if ((disableAll != null) && (Boolean.parseBoolean(disableAll))) {
- log.warn("--------------------------------------");
- log.warn(" Disabling SSL Certificate Validation ");
- log.warn("--------------------------------------");
-
- sslCtx.init(km,
- new TrustManager[] { new MyAlwaysTrustManager(caCerts) }, null);
- } else {
- MyPKITrustManager pkixTM = new MyPKITrustManager(certValidator,
- getCertDir(), getCADir(), caCerts);
- sslCtx.init(km, new TrustManager[] { pkixTM }, null);
- }
- DataUrl.setSSLSocketFactory(sslCtx.getSocketFactory());
- URLDereferencer.getInstance().setSSLSocketFactory(
- sslCtx.getSocketFactory());
- } catch (Exception e) {
- log.error("Cannot configure SSL", e);
- }
- if ((disableAll != null && Boolean.parseBoolean(disableAll))
- || (disableHostnameVerification != null && Boolean
- .parseBoolean(disableHostnameVerification))) {
- log.warn("---------------------------------");
- log.warn(" Disabling Hostname Verification ");
- log.warn("---------------------------------");
- DataUrl.setHostNameVerifier(new HostnameVerifier() {
- @Override
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
- });
- URLDereferencer.getInstance().setHostnameVerifier(new HostnameVerifier() {
- @Override
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
- });
- }
- }
-
- public void setCertValidator(CertValidator certValidator) {
- this.certValidator = certValidator;
- }
-
- private static class MyPKITrustManager implements X509TrustManager {
- private static Log log = LogFactory.getLog(MyPKITrustManager.class);
-
- private CertValidator certValidator;
- private X509Certificate[] trustedCerts;
-
- public MyPKITrustManager(CertValidator cv, File certStore, File trustStore,
- X509Certificate[] trustedCerts) {
- certValidator = cv;
- certValidator.init(certStore, trustStore);
- this.trustedCerts = trustedCerts;
- }
-
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType)
- throws CertificateException {
- log.error("Did not expect this method to get called");
- throw new CertificateException("Method not implemented");
- }
-
- private static iaik.x509.X509Certificate[] convertCerts(
- X509Certificate[] certs) throws GeneralSecurityException {
- iaik.x509.X509Certificate[] retVal = new iaik.x509.X509Certificate[certs.length];
- int i = 0;
- for (X509Certificate cert : certs) {
- if (cert instanceof iaik.x509.X509Certificate) {
- retVal[i++] = (iaik.x509.X509Certificate) cert;
- } else {
- retVal[i++] = new iaik.x509.X509Certificate(cert.getEncoded());
- }
- }
- return retVal;
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] chain, String authType)
- throws CertificateException {
- try {
- boolean valid = certValidator.isCertificateValid(Thread.currentThread()
- .getName(), convertCerts(chain));
- if (!valid) {
- throw new CertificateException("Certificate not valid");
- }
- } catch (GeneralSecurityException e) {
- throw new CertificateException(e);
- }
- }
-
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- return trustedCerts;
- }
- }
-
- private static class MyAlwaysTrustManager implements X509TrustManager {
- private static Log log = LogFactory.getLog(MyAlwaysTrustManager.class);
- private X509Certificate[] trustedCerts;
-
- public MyAlwaysTrustManager(X509Certificate[] trustedCerts) {
- this.trustedCerts = trustedCerts;
- }
-
- @Override
- public void checkClientTrusted(X509Certificate[] arg0, String arg1)
- throws CertificateException {
- log.error("Did not expect this method to get called");
- throw new CertificateException("Method not implemented");
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] certs, String arg1)
- throws CertificateException {
- log.warn("-------------------------------------");
- log.warn("SSL Certificate Validation Disabled !");
- log.warn("-------------------------------------");
- }
-
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- return trustedCerts;
- }
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/IAIKCommonsLog.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/IAIKCommonsLog.java deleted file mode 100644 index 1b7dd189..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/IAIKCommonsLog.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * - */ -package at.gv.egiz.bku.conf; - -import iaik.logging.Log; -import iaik.logging.TransactionId; - -/** - * @author mcentner - * - */ -public class IAIKCommonsLog implements Log { - - /** - * The id that will be written to the log if the transactionid == null - */ - public final static String NO_ID = "Null-ID"; - - protected org.apache.commons.logging.Log commonsLog; - - protected String nodeId; - - public IAIKCommonsLog(org.apache.commons.logging.Log log) { - this.commonsLog = log; - } - - /* (non-Javadoc) - * @see iaik.logging.Log#debug(iaik.logging.TransactionId, java.lang.Object, java.lang.Throwable) - */ - @Override - public void debug(TransactionId transactionId, Object message, Throwable t) { - if (commonsLog.isDebugEnabled()) { - commonsLog.debug(nodeId + ": " - + ((transactionId != null) ? transactionId.getLogID() : NO_ID) + ": " - + message, t); - } - } - - /* (non-Javadoc) - * @see iaik.logging.Log#info(iaik.logging.TransactionId, java.lang.Object, java.lang.Throwable) - */ - @Override - public void info(TransactionId transactionId, Object message, Throwable t) { - if (commonsLog.isInfoEnabled()) { - commonsLog.info(nodeId + ": " - + ((transactionId != null) ? transactionId.getLogID() : NO_ID) + ": " - + message, t); - } - } - - /* (non-Javadoc) - * @see iaik.logging.Log#warn(iaik.logging.TransactionId, java.lang.Object, java.lang.Throwable) - */ - @Override - public void warn(TransactionId transactionId, Object message, Throwable t) { - if (commonsLog.isWarnEnabled()) { - commonsLog.warn(nodeId + ": " - + ((transactionId != null) ? transactionId.getLogID() : NO_ID) + ": " - + message, t); - } - } - - /* (non-Javadoc) - * @see iaik.logging.Log#error(iaik.logging.TransactionId, java.lang.Object, java.lang.Throwable) - */ - @Override - public void error(TransactionId transactionId, Object message, Throwable t) { - if (commonsLog.isErrorEnabled()) { - commonsLog.error(nodeId + ": " - + ((transactionId != null) ? transactionId.getLogID() : NO_ID) + ": " - + message, t); - } - } - - /* (non-Javadoc) - * @see iaik.logging.Log#fatal(iaik.logging.TransactionId, java.lang.Object, java.lang.Throwable) - */ - @Override - public void fatal(TransactionId transactionId, Object message, Throwable t) { - if (commonsLog.isFatalEnabled()) { - commonsLog.fatal(nodeId + ": " - + ((transactionId != null) ? transactionId.getLogID() : NO_ID) + ": " - + message, t); - } - } - - /* (non-Javadoc) - * @see iaik.logging.Log#setNodeId(java.lang.String) - */ - @Override - public void setNodeId(String nodeId) { - this.nodeId = nodeId; - } - - /* (non-Javadoc) - * @see iaik.logging.Log#getNodeId() - */ - @Override - public String getNodeId() { - return nodeId; - } - - /* (non-Javadoc) - * @see iaik.logging.Log#isDebugEnabled() - */ - @Override - public boolean isDebugEnabled() { - return commonsLog.isDebugEnabled(); - } - - /* (non-Javadoc) - * @see iaik.logging.Log#isInfoEnabled() - */ - @Override - public boolean isInfoEnabled() { - return commonsLog.isInfoEnabled(); - } - - /* (non-Javadoc) - * @see iaik.logging.Log#isWarnEnabled() - */ - @Override - public boolean isWarnEnabled() { - return commonsLog.isWarnEnabled(); - } - - /* (non-Javadoc) - * @see iaik.logging.Log#isErrorEnabled() - */ - @Override - public boolean isErrorEnabled() { - return commonsLog.isErrorEnabled(); - } - - /* (non-Javadoc) - * @see iaik.logging.Log#isFatalEnabled() - */ - @Override - public boolean isFatalEnabled() { - return commonsLog.isFatalEnabled(); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/IAIKCommonsLogFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/IAIKCommonsLogFactory.java deleted file mode 100644 index 14e2c757..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/conf/IAIKCommonsLogFactory.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * - */ -package at.gv.egiz.bku.conf; - -import org.apache.commons.logging.impl.WeakHashtable; - -import iaik.logging.Log; -import iaik.logging.LogConfigurationException; -import iaik.logging.LogFactory; - -/** - * @author mcentner - * - */ -public class IAIKCommonsLogFactory extends LogFactory { - - protected WeakHashtable instances = new WeakHashtable(); - - /* (non-Javadoc) - * @see iaik.logging.LogFactory#getInstance(java.lang.String) - */ - @Override - public Log getInstance(String name) throws LogConfigurationException { - org.apache.commons.logging.Log commonsLog = org.apache.commons.logging.LogFactory.getLog(name); - Log log = (Log) instances.get(commonsLog); - if (log == null) { - log = new IAIKCommonsLog(commonsLog); - log.setNodeId(node_id_); - instances.put(commonsLog, log); - } - return log; - } - - /* (non-Javadoc) - * @see iaik.logging.LogFactory#getInstance(java.lang.Class) - */ - @SuppressWarnings("unchecked") - @Override - public Log getInstance(Class clazz) throws LogConfigurationException { - org.apache.commons.logging.Log commonsLog = org.apache.commons.logging.LogFactory.getLog(clazz); - Log log = (Log) instances.get(commonsLog); - if (log == null) { - log = new IAIKCommonsLog(commonsLog); - log.setNodeId(node_id_); - instances.put(commonsLog, log); - } - return log; - } - - /* (non-Javadoc) - * @see iaik.logging.LogFactory#release() - */ - @Override - public void release() { - instances.clear(); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/AccessControlInvocation.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/AccessControlInvocation.java deleted file mode 100644 index 014b7fd7..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/AccessControlInvocation.java +++ /dev/null @@ -1,21 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public class AccessControlInvocation implements
- at.gv.egiz.bku.slcommands.InvocationStrategy {
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureCommand.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureCommand.java deleted file mode 100644 index 2d87c39f..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureCommand.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-import at.gv.egiz.bku.slexceptions.SLCommandException;
-import at.gv.egiz.bku.slexceptions.SLRequestException;
-
-public interface CreateXMLSignatureCommand extends SLCommand {
-
- public void prepareXMLSignature() throws SLCommandException, SLRequestException;
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureResult.java deleted file mode 100644 index 4bc2820b..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/CreateXMLSignatureResult.java +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public interface CreateXMLSignatureResult extends SLResult {
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/ErrorResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/ErrorResult.java deleted file mode 100644 index 5d52c0ea..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/ErrorResult.java +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public interface ErrorResult extends SLResult {
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/GetStatusCommand.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/GetStatusCommand.java deleted file mode 100644 index 19099b63..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/GetStatusCommand.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package at.gv.egiz.bku.slcommands; - -/** - * - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public interface GetStatusCommand extends SLCommand { - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/GetStatusResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/GetStatusResult.java deleted file mode 100644 index c5518f51..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/GetStatusResult.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package at.gv.egiz.bku.slcommands; - -/** - * - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public interface GetStatusResult extends SLResult { - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadCommand.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadCommand.java deleted file mode 100644 index 73fddf1f..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadCommand.java +++ /dev/null @@ -1,28 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public interface InfoboxReadCommand extends SLCommand { - public String getInfoboxIdentifier(); - - /** - * Convenience method to get the domain identifier if the infobox - * referes to a Identitylink. - * @return the domain id or null if the Infobox is not of type Identitylink or no domain parameter was specified - */ - public String getIdentityLinkDomainId();
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadResult.java deleted file mode 100644 index c6a51362..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxReadResult.java +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public interface InfoboxReadResult extends SLResult {
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxUpdateCommand.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxUpdateCommand.java deleted file mode 100644 index c2974785..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxUpdateCommand.java +++ /dev/null @@ -1,23 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands; - -public interface InfoboxUpdateCommand extends SLCommand { - - public String getInfoboxIdentifier(); - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxUpdateResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxUpdateResult.java deleted file mode 100644 index d180facf..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InfoboxUpdateResult.java +++ /dev/null @@ -1,21 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands; - -public interface InfoboxUpdateResult extends SLResult { - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InvocationStrategy.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InvocationStrategy.java deleted file mode 100644 index 6b410fac..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/InvocationStrategy.java +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public interface InvocationStrategy {
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationCommand.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationCommand.java deleted file mode 100644 index 0651f882..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationCommand.java +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public interface NullOperationCommand extends SLCommand {
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationResult.java deleted file mode 100644 index c36c879e..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/NullOperationResult.java +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-public interface NullOperationResult extends SLResult {
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommand.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommand.java deleted file mode 100644 index a8625946..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommand.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-import at.gv.egiz.bku.slexceptions.SLCommandException;
-
-public interface SLCommand {
-
- public final String NAMESPACE_URI = "http://www.buergerkarte.at/namespaces/securitylayer/1.2#";
-
- public String getName();
-
- public void init(SLCommandContext aCtx, Object aUnmarshalledRequest) throws SLCommandException;
-
- public SLResult execute();
-
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandContext.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandContext.java deleted file mode 100644 index 5af2afac..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandContext.java +++ /dev/null @@ -1,55 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-import java.util.Locale; - -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext;
-import at.gv.egiz.stal.STAL;
-
-public class SLCommandContext {
-
- private STAL stal;
- private URLDereferencerContext urlDerefCtx; - - private Locale locale;
-
- public void setSTAL(STAL aStal) {
- this.stal = aStal;
- }
-
- public void setURLDereferencerContext(URLDereferencerContext aCtx) {
- this.urlDerefCtx = aCtx;
- }
-
- public STAL getSTAL() {
- return stal;
- }
-
- public URLDereferencerContext getURLDereferencerContext() {
- return urlDerefCtx;
- } - - public Locale getLocale() { - return locale; - } - - public void setLocale(Locale locale) { - this.locale = locale; - } -
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java deleted file mode 100644 index 6e84867e..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandFactory.java +++ /dev/null @@ -1,395 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands; - -import java.io.IOException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.XMLConstants; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.UnmarshalException; -import javax.xml.bind.Unmarshaller; -import javax.xml.bind.ValidationEvent; -import javax.xml.bind.ValidationEventLocator; -import javax.xml.namespace.QName; -import javax.xml.stream.XMLEventReader; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLExceptionMessages; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.slexceptions.SLVersionException; -import at.gv.egiz.bku.utils.DebugReader; -import at.gv.egiz.slbinding.RedirectEventFilter; -import at.gv.egiz.slbinding.RedirectUnmarshallerListener; -import at.gv.egiz.validation.ReportingValidationEventHandler; - -public class SLCommandFactory { - - /** - * Schema files required for Security Layer command validation. - */ - public static final String[] SCHEMA_FILES = new String[]{ - "at/gv/egiz/bku/slcommands/schema/xml.xsd", - "at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd", - "at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd", - "at/gv/egiz/bku/slcommands/schema/Core.20020225.xsd", - "at/gv/egiz/bku/slcommands/schema/Core.20020831.xsd" - }; - /** - * Logging facility. - */ - static Log log = LogFactory.getLog(SLCommandFactory.class); - /** - * The instance returned by {@link #getInstance()}. - */ - private static SLCommandFactory instance; - /** - * Schema for Security Layer command validation. - */ - private Schema slSchema; - /** - * The JAXBContext. - */ - private JAXBContext jaxbContext; - /** - * The map of <namespaceURI>:<localName> to implementation class of the - * corresponding {@link SLCommand}. - */ - private Map<String, Class<? extends SLCommand>> slRequestTypeMap = new HashMap<String, Class<? extends SLCommand>>(); - - /** - * The mapping of a requests's qualified name to a concrete command factories. - */ - private Map<QName, AbstractSLCommandFactory> slCommandFactories = new HashMap<QName, AbstractSLCommandFactory>(); - - /** - * Configures the singleton instance with command implementations - * @param commandImplMap - * @throws ClassNotFoundException - */ - @SuppressWarnings("unchecked") - public void setCommandImpl(Map<String, String> commandImplMap) throws ClassNotFoundException { - ClassLoader cl = getClass().getClassLoader(); - for (String key : commandImplMap.keySet()) { - Class<? extends SLCommand> impl = (Class<? extends SLCommand>) cl.loadClass(commandImplMap.get(key)); - log.debug("Registering sl command implementation for :"+key+ "; implementation class: "+impl.getCanonicalName()); - slRequestTypeMap.put(key, impl); - } - } - - public void setConcreteFactories(Map<QName, AbstractSLCommandFactory> factories) { - if (log.isDebugEnabled()) { - StringBuilder sb = new StringBuilder(); - sb.append("Registered sl command factory for"); - for (QName qname : factories.keySet()) { - sb.append("\n " + qname + " : " + factories.get(qname).getClass()); - } - log.debug(sb); - } - slCommandFactories = factories; - } - - /** - * Register an {@link SLCommand} implementation class of a Security Layer - * command with the given <code>namespaceUri</code> and <code>localname</code> - * . - * - * @param namespaceUri - * the namespace URI of the Security Layer command - * @param localname - * the localname of the Security Layer command - * @param slCommandClass - * the implementation class, or <code>null</code> to deregister a - * currently registered class - */ - public void setImplClass(String namespaceUri, String localname, - Class<? extends SLCommand> slCommandClass) { - if (slCommandClass != null) { - slRequestTypeMap.put(namespaceUri + ":" + localname, slCommandClass); - } else { - slRequestTypeMap.remove(namespaceUri + ":" + localname); - } - } - - /** - * Returns the implementation class of an {@link SLCommand} with the given - * <code>name</code>, or <code>null</code> if no such class is registered. - * - * @param name - * the <code>QName</code> of the Security Layer command - * @return the implementation class, or <code>null</code> if no class is - * registered for the given <code>name</code> - */ - public Class<? extends SLCommand> getImplClass(QName name) { - String namespaceURI = name.getNamespaceURI(); - String localPart = name.getLocalPart(); - return slRequestTypeMap.get(namespaceURI + ":" + localPart); - } - - /** - * Sets the schema to validate Security Layer commands with. - * - * @param slSchema the schema to validate Security Layer commands with - */ - public void setSLSchema(Schema slSchema) { - this.slSchema = slSchema; - } - - /** - * @return the jaxbContext - */ - public JAXBContext getJaxbContext() { - ensureJaxbContext(); - return jaxbContext; - } - - /** - * @param jaxbContext the jaxbContext to set - */ - public void setJaxbContext(JAXBContext jaxbContext) { - this.jaxbContext = jaxbContext; - } - - /** - * Initialize the JAXBContext. - */ - private synchronized void ensureJaxbContext() { - if (jaxbContext == null) { - try { - String slPkg = at.buergerkarte.namespaces.securitylayer._1.ObjectFactory.class.getPackage().getName(); - String xmldsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); - String cardChannelPkg = at.buergerkarte.namespaces.cardchannel.ObjectFactory.class.getPackage().getName(); - String slPkgLegacy1_0 = at.buergerkarte.namespaces.securitylayer._20020225_.ObjectFactory.class.getPackage().getName(); - String slPkgLegacy1_1 = at.buergerkarte.namespaces.securitylayer._20020831_.ObjectFactory.class.getPackage().getName(); - setJaxbContext(JAXBContext.newInstance(slPkg + ":" + xmldsigPkg + ":" + cardChannelPkg - + ":" + slPkgLegacy1_0 + ":" + slPkgLegacy1_1)); - } catch (JAXBException e) { - log.error("Failed to setup JAXBContext security layer request.", e); - throw new SLRuntimeException(e); - } - } - } - - /** - * Initialize the security layer schema. - */ - private synchronized void ensureSchema() { - if (slSchema == null) { - try { - SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); - ClassLoader cl = SLCommandFactory.class.getClassLoader(); - Source[] sources = new Source[SCHEMA_FILES.length]; - for (int i = 0; i < SCHEMA_FILES.length; i++) { - String schemaFile = SCHEMA_FILES[i]; - URL schemaURL = cl.getResource(schemaFile); - if (schemaURL == null) { - throw new SLRuntimeException("Failed to load schema file " + schemaFile + "."); - } - log.debug("Schema location: " + schemaURL); - sources[i] = new StreamSource(schemaURL.openStream()); - } - Schema schema = schemaFactory.newSchema(sources); - log.debug("Schema successfully created."); - setSLSchema(schema); - } catch (SAXException e) { - log.error("Failed to load security layer schema.", e); - throw new SLRuntimeException("Failed to load security layer schema.", e); - } catch (IOException e) { - log.error("Failed to load security layer schema.", e); - throw new SLRuntimeException("Failed to load security layer schema.", e); - } - - } - } - - /** - * Get an instance of the <code>SLCommandFactory</code>. - */ - public synchronized static SLCommandFactory getInstance() { - if (instance == null) { - instance = new SLCommandFactory(); - instance.ensureJaxbContext(); - instance.ensureSchema(); - } - return instance; - } - - /** - * Private constructor used by {@link #getInstance()}. - */ - private SLCommandFactory() { - } - - /** - * Unmarshalls from the given <code>source</code>. - * - * @see Unmarshaller#unmarshal(Source) - * - * <em>Note:</em>Could replace JAXB's unmarshal-time validation engine (see commented code), however, - * we need a redirect filter. - * - * @param source - * the source to unmarshal from - * @return the object returned by {@link Unmarshaller#unmarshal(Source)} - * @throws SLRequestException - * if unmarshalling fails - * @throws SLRuntimeException - * if an unexpected error occurs configuring the unmarshaller or if - * unmarshalling fails with an unexpected error - */ - protected Object unmarshal(Source source) throws SLRuntimeException, - SLRequestException { - - Object object; - ReportingValidationEventHandler validationEventHandler = new ReportingValidationEventHandler(); - try { - - XMLInputFactory inputFactory = XMLInputFactory.newInstance(); - XMLEventReader eventReader = inputFactory.createXMLEventReader(source); - RedirectEventFilter redirectEventFilter = new RedirectEventFilter(); - XMLEventReader filteredReader = inputFactory.createFilteredReader(eventReader, redirectEventFilter); - - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - unmarshaller.setListener(new RedirectUnmarshallerListener(redirectEventFilter)); - if (slSchema != null) { - unmarshaller.setSchema(slSchema); - } - log.trace("Before unmarshal()."); - unmarshaller.setEventHandler(validationEventHandler); - object = unmarshaller.unmarshal(filteredReader); - log.trace("After unmarshal()."); - } catch (UnmarshalException e) { - if (log.isDebugEnabled()) { - log.debug("Failed to unmarshall security layer request.", e); - } else { - log.info("Failed to unmarshall security layer request." + e.getMessage()); - } - if (validationEventHandler.getErrorEvent() != null) { - // Validation Error - ValidationEvent errorEvent = validationEventHandler.getErrorEvent(); - ValidationEventLocator locator = errorEvent.getLocator(); - throw new SLRequestException(3002, - SLExceptionMessages.EC3002_INVALID, new Object[]{errorEvent.getMessage()}); - } - Throwable cause = e.getCause(); - if (cause instanceof SAXParseException) { - throw new SLRequestException(3000, - SLExceptionMessages.EC3000_UNCLASSIFIED, new Object[]{cause.getMessage()}); - } else { - throw new SLRequestException(3000, - SLExceptionMessages.EC3000_UNCLASSIFIED, new Object[]{e}); - } - } catch (JAXBException e) { - // unexpected error - log.error("Failed to unmarshall security layer request.", e); - throw new SLRuntimeException(e); - } catch (XMLStreamException e) { - // unexpected error - log.error("Failed to unmarshall security layer request.", e); - throw new SLRuntimeException(e); - } - - return object; - - } - - /** - * Creates a new <code>SLCommand</code> from the given <code>source</code> and - * <code>context</code>. - * - * @param source - * the <code>Source</code> to unmarshall from - * @param context - * the context for the created <code>SLCommand</code> - * @return the <code>SLCommand</code> unmarshalled from the given - * <code>source</code> - * @throws SLRequestException - * if unmarshalling fails - * @throws SLCommandException - * if command ist not supported - * @throws SLRuntimeException - * if an unexpected error occurs configuring the unmarshaller, if - * unmarshalling fails with an unexpected error or if the - * corresponding <code>SLCommand</code> could not be instantiated - * @throws SLVersionException - */ - @SuppressWarnings("unchecked") - public SLCommand createSLCommand(Source source, SLCommandContext context) - throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException { - - DebugReader dr = null; - if (log.isTraceEnabled() && source instanceof StreamSource) { - StreamSource streamSource = (StreamSource) source; - if (streamSource.getReader() != null) { - dr = new DebugReader(streamSource.getReader(), "SLCommand unmarshalled from:\n"); - streamSource.setReader(dr); - } - } - - Object object; - try { - object = unmarshal(source); - } catch (SLRequestException e) { - throw e; - } finally { - if (dr != null) { - log.trace(dr.getCachedString()); - } - } - - if (!(object instanceof JAXBElement)) { - // invalid request - log.info("Invalid security layer request. " + object.toString()); - throw new SLRequestException(3002, SLExceptionMessages.EC3002_INVALID, - new Object[]{object.toString()}); - } - - QName qName = ((JAXBElement) object).getName(); - if (!SLCommand.NAMESPACE_URI.equals(qName.getNamespaceURI())) { - // security layer request version not supported - log.info("Unsupported security layer request version : " + qName.getNamespaceURI()); - throw new SLVersionException(qName.getNamespaceURI()); - } - - AbstractSLCommandFactory concreteFactory = slCommandFactories.get(qName); - if (concreteFactory == null) { - // command not supported - log.info("Unsupported command received: " + qName.toString()); - throw new SLCommandException(4011, - SLExceptionMessages.EC4011_NOTIMPLEMENTED, new Object[]{qName.toString()}); - } - - return concreteFactory.createSLCommand(context, (JAXBElement<?>) object); - - } -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandInvoker.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandInvoker.java deleted file mode 100644 index c28288c9..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLCommandInvoker.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-import at.gv.egiz.bku.slexceptions.SLCanceledException; -import at.gv.egiz.bku.slexceptions.SLException; -
-public interface SLCommandInvoker {
-
- /**
- *
- * @param aContext
- * @throws SLCanceledException if the security management prevents execution of this command
- */
- public void invoke(SLSourceContext aContext) throws SLException;
-
- /**
- *
- * @param aContext
- * @return
- * @throws SLCanceledException if the security management prevents execution of this command
- */
- public SLResult getResult(SLTargetContext aContext) throws SLException;
-
- public void setCommand(at.gv.egiz.bku.slcommands.SLCommand aCmd);
-
- /**
- * Prototype creation
- * @return
- */
- public SLCommandInvoker newInstance();
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLMarshallerFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLMarshallerFactory.java deleted file mode 100644 index e0a375cf..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLMarshallerFactory.java +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Copyright 2009 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.marshal.MarshallerFactory; - -public class SLMarshallerFactory { - - static Log log = LogFactory.getLog(SLMarshallerFactory.class); - - /** - * The JAXBContext used for result marshaling. - * <p> - * Note: Different contexts are used for marshaling and unmarshaling of - * security layer requests and responses to avoid propagation of namespace - * declarations of legacy namespaces into marshaled results. - * </p> - * @see #jaxbContextLegacy - */ - protected static JAXBContext context; - - /** - * The JAXBContext used for marshaling of of results in the legacy namespace. - */ - protected static JAXBContext legacyContext; - - // ------------------- initialization on demand idiom ------------------- - // see http://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom - // ---------------------------------------------------------------------- - - /** - * Private constructor called by {@link SLMarshallerFactoryInstanceHolder}. - */ - private SLMarshallerFactory() { - // context is initialized immediately while the legacy context is initialized only on demand - try { - String slPkg = at.buergerkarte.namespaces.securitylayer._1.ObjectFactory.class.getPackage().getName(); - String xmldsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); - String cardChannelPkg = at.buergerkarte.namespaces.cardchannel.ObjectFactory.class.getPackage().getName(); - context = JAXBContext.newInstance(slPkg + ":" + xmldsigPkg + ":" + cardChannelPkg); - } catch (JAXBException e) { - log.error("Failed to setup JAXBContext security layer request.", e); - throw new SLRuntimeException(e); - } - } - - /** - * The lazy instance holder for this SLMarshallerFactory. - */ - private static class SLMarshallerFactoryInstanceHolder { - /** - * The instance returned by {@link SLMarshallerFactory#getInstance()} - */ - private static final SLMarshallerFactory instance = new SLMarshallerFactory(); - } - - /** - * Get an instance of the <code>SLMarshallerFactory</code>. - */ - public static SLMarshallerFactory getInstance() { - return SLMarshallerFactoryInstanceHolder.instance; - } - - // ---------------------------------------------------------------------- - - /** - * Initialize the JAXBContext for the legacy namespace. - */ - private static synchronized void ensureLegacyContext() { - // legacy marshaller is initialized only on demand - if (legacyContext == null) { - try { - String slPkgLegacy1_0 = at.buergerkarte.namespaces.securitylayer._20020225_.ObjectFactory.class.getPackage().getName(); - String slPkgLegacy1_1 = at.buergerkarte.namespaces.securitylayer._20020831_.ObjectFactory.class.getPackage().getName(); - String xmldsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); - String cardChannelPkg = at.buergerkarte.namespaces.cardchannel.ObjectFactory.class.getPackage().getName(); - legacyContext = JAXBContext.newInstance(slPkgLegacy1_0 + ":" + slPkgLegacy1_1 + ":" + xmldsigPkg + ":" + cardChannelPkg); - } catch (JAXBException e) { - log.error("Failed to setup JAXBContext security layer request.", e); - throw new SLRuntimeException(e); - } - } - } - - /** - * Creates an SL marshaller. - * - * @param formattedOutput - * <code>true</code> if the marshaller should produce formated - * output, <code>false</code> otherwise - * @return an SL marshaller - */ - public Marshaller createMarshaller(boolean formattedOutput) { - return createMarshaller(formattedOutput, false); - } - - /** - * Creates an SL marshaller. - * - * @param formattedOutput - * <code>true</code> if the marshaller should produce formated - * output, <code>false</code> otherwise - * @param fragment - * <code>true</code> if the marshaller should produce a XML fragment - * (omit XML declaration), <code>false</code> otherwise - * @return an SL marshaller - */ - public Marshaller createMarshaller(boolean formattedOutput, boolean fragment) { - try { - return MarshallerFactory.createMarshaller(context, formattedOutput, fragment); - } catch (JAXBException e) { - log.fatal("Failed to marshall error response.", e); - throw new SLRuntimeException("Failed to marshall error response.", e); - } - } - - /** - * Creates a legacy SL marshaller. - * - * @param formattedOutput - * <code>true</code> if the marshaller should produce formated - * output, <code>false</code> otherwise - * @return a legacy SL marshaller - */ - public Marshaller createLegacyMarshaller(boolean formattedOutput) { - return createLegacyMarshaller(formattedOutput, false); - } - - /** - * Creates a legacy SL marshaller. - * - * @param formattedOutput - * <code>true</code> if the marshaller should produce formated - * output, <code>false</code> otherwise - * @param fragment - * <code>true</code> if the marshaller should produce a XML fragment - * (omit XML declaration), <code>false</code> otherwise - * @return a legacy SL marshaller - */ - public Marshaller createLegacyMarshaller(boolean formattedOutput, boolean fragment) { - try { - ensureLegacyContext(); - return MarshallerFactory.createMarshaller(legacyContext, formattedOutput, fragment); - } catch (JAXBException e) { - log.fatal("Failed to marshall error response.", e); - throw new SLRuntimeException("Failed to marshall error response.", e); - } - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLResult.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLResult.java deleted file mode 100644 index e9e483c5..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLResult.java +++ /dev/null @@ -1,45 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-import javax.xml.transform.Result; -import javax.xml.transform.Templates; -
-public interface SLResult {
-
- public static enum SLResultType {BINARY, XML};
-
- public SLResultType getResultType();
-
- /**
- * The MIME Type of the Result.
- *
- * @return may result null if unknown.
- */
- public String getMimeType();
-
- public void writeTo(Result aResult, boolean fragment);
-
- /**
- *
- * @param result - * @param fragment TODO - * @param transformer may be null.
- */
- public void writeTo(Result result, Templates templates, boolean fragment); - -}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLSourceContext.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLSourceContext.java deleted file mode 100644 index f25a0ea4..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLSourceContext.java +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-import java.net.URL; -import java.security.cert.X509Certificate;
-
-import at.gv.egiz.bku.utils.binding.Protocol;
-
-
-public class SLSourceContext {
-
- private URL sourceUrl;
- private boolean sourceIsDataURL;
- private X509Certificate sourceCertificate;
- private String sourceHTTPReferer;
-
- public URL getSourceUrl() {
- return sourceUrl;
- }
-
- public void setSourceUrl(URL sourceProtocol) {
- this.sourceUrl = sourceProtocol;
- }
-
- public boolean isSourceIsDataURL() {
- return sourceIsDataURL;
- }
-
- public void setSourceIsDataURL(boolean sourceIsDataURL) {
- this.sourceIsDataURL = sourceIsDataURL;
- }
-
- public X509Certificate getSourceCertificate() {
- return sourceCertificate;
- }
-
- public void setSourceCertificate(X509Certificate sourceCertificate) {
- this.sourceCertificate = sourceCertificate;
- }
-
- public String getSourceHTTPReferer() {
- return sourceHTTPReferer;
- }
-
- public void setSourceHTTPReferer(String sourceHTTPReferer) {
- this.sourceHTTPReferer = sourceHTTPReferer;
- }
-
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLTargetContext.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLTargetContext.java deleted file mode 100644 index f9df3ced..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/SLTargetContext.java +++ /dev/null @@ -1,51 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands;
-
-import java.net.URL; -import java.security.cert.X509Certificate; -
-public class SLTargetContext {
- private URL targetUrl;
- private boolean targetIsDataURL;
- private X509Certificate targetCertificate;
-
- public URL getTargetUrl() {
- return targetUrl;
- }
-
- public void setTargetUrl(URL targetUrl) {
- this.targetUrl = targetUrl;
- }
-
- public boolean isTargetIsDataURL() {
- return targetIsDataURL;
- }
-
- public void setTargetIsDataURL(boolean targetIsDataURL) {
- this.targetIsDataURL = targetIsDataURL;
- }
-
- public X509Certificate getTargetCertificate() {
- return targetCertificate;
- }
-
- public void setTargetCertificate(X509Certificate targetCertificate) {
- this.targetCertificate = targetCertificate;
- }
-
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractAssocArrayInfobox.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractAssocArrayInfobox.java deleted file mode 100644 index 9a4536e6..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractAssocArrayInfobox.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.slcommands.impl; - -import java.io.ByteArrayOutputStream; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.buergerkarte.namespaces.securitylayer._1.InfoboxAssocArrayPairType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadDataAssocArrayType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadParamsAssocArrayType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.buergerkarte.namespaces.securitylayer._1.XMLContentType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadParamsAssocArrayType.ReadKeys; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadParamsAssocArrayType.ReadPairs; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadParamsAssocArrayType.ReadValue; -import at.gv.egiz.bku.slcommands.InfoboxReadResult; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLMarshallerFactory; -import at.gv.egiz.bku.slexceptions.SLCommandException; - -/** - * An abstract base class for {@link Infobox} implementations of type associative array. - * - * @author mcentner - */ -public abstract class AbstractAssocArrayInfobox extends AbstractInfoboxImpl - implements AssocArrayInfobox { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(AbstractAssocArrayInfobox.class); - - /** - * The search string pattern. - */ - public static final String SEARCH_STRING_PATTERN = "(.&&[^/])+(/.&&[^/])*"; - - /** - * @return the keys available in this infobox. - */ - public abstract String[] getKeys(); - - /** - * @return <code>true</code> if the values are XML entities, or <code>false</code> otherwise. - */ - public abstract boolean isValuesAreXMLEntities(); - - /** - * Returns a key to value mapping for the given <code>keys</code>. - * - * @param keys a list of keys - * @param cmdCtx the command context - * - * @return a key to value mapping for the given <code>keys</code>. - * - * @throws SLCommandException if obtaining the values fails - */ - public abstract Map<String, Object> getValues(List<String> keys, SLCommandContext cmdCtx) throws SLCommandException; - - /** - * Returns all keys that match the given <code>searchString</code>. - * - * @param searchString the search string - * - * @return all keys that match the given <code>searchString</code> - * - * @throws SLCommandException if the given search string is invalid - */ - protected List<String> selectKeys(String searchString) throws SLCommandException { - - if ("*".equals(searchString) || "**".equals(searchString)) { - return Arrays.asList(getKeys()); - } - - if (!searchString.contains("*")) { - Arrays.asList(getKeys()).contains(searchString); - return Collections.singletonList(searchString); - } - - if (Pattern.matches(SEARCH_STRING_PATTERN, searchString)) { - -// for (int i = 0; i < searchString.length(); i++) { -// int codePoint = searchString.codePointAt(i); -// -// } - - // TODO : build pattern - return Collections.emptyList(); - } else { - log.info("Got invalid search string '" + searchString + "'"); - throw new SLCommandException(4010); - } - - } - - /** - * Read all keys specified by <code>readKeys</code>. - * - * @param readKeys - * the ReadKeys element - * @param cmdCtx - * the command context - * @return a corresponding InfoboxReadResult - * - * @throws SLCommandException - * if the ReadKeys element is invalid or obtaining the corresponding - * values fails - */ - protected InfoboxReadResult readKeys(ReadKeys readKeys, SLCommandContext cmdCtx) throws SLCommandException { - - List<String> selectedKeys = selectKeys(readKeys.getSearchString()); - - if (readKeys.isUserMakesUnique() && selectedKeys.size() > 1) { - log.info("UserMakesUnique not supported"); - // TODO: give more specific error message - throw new SLCommandException(4010); - } - - ObjectFactory objectFactory = new ObjectFactory(); - - InfoboxReadDataAssocArrayType infoboxReadDataAssocArrayType = objectFactory - .createInfoboxReadDataAssocArrayType(); - - List<String> keys = infoboxReadDataAssocArrayType.getKey(); - keys.addAll(selectedKeys); - - return new InfoboxReadResultImpl(infoboxReadDataAssocArrayType); - - } - - /** - * Read all pairs specified by <code>readPairs</code>. - * - * @param readPairs - * the readPairs element - * @param cmdCtx - * the command context - * @return a corresponding InfoboxReadResult - * - * @throws SLCommandException - * if the ReadPairs element is invalid or obtaining the corresponding - * values fails - */ - protected InfoboxReadResult readPairs(ReadPairs readPairs, SLCommandContext cmdCtx) throws SLCommandException { - - if (readPairs.isValuesAreXMLEntities() && !isValuesAreXMLEntities()) { - log.info("Got valuesAreXMLEntities=" + readPairs.isValuesAreXMLEntities() + " but infobox type is binary."); - throw new SLCommandException(4010); - } - - List<String> selectedKeys = selectKeys(readPairs.getSearchString()); - - if (readPairs.isUserMakesUnique() && selectedKeys.size() > 1) { - log.info("UserMakesUnique not supported"); - // TODO: give more specific error message - throw new SLCommandException(4010); - } - - return new InfoboxReadResultImpl(marshallPairs(selectedKeys, getValues( - selectedKeys, cmdCtx), readPairs.isValuesAreXMLEntities())); - } - - /** - * Read the value specified by <code>readPairs</code>. - * - * @param readValue - * the readValue element - * @param cmdCtx - * the command context - * @return a corresponding InfoboxReadResult - * - * @throws SLCommandException - * if the ReadValue element is invalid or obtaining the corresponding - * values fails - */ - protected InfoboxReadResult readValue(ReadValue readValue, SLCommandContext cmdCtx) throws SLCommandException { - - if (readValue.isValueIsXMLEntity() && !isValuesAreXMLEntities()) { - log.info("Got valuesAreXMLEntities=" + readValue.isValueIsXMLEntity() + " but infobox type is binary."); - throw new SLCommandException(4010); - } - - List<String> selectedKeys; - - if (Arrays.asList(getKeys()).contains(readValue.getKey())) { - selectedKeys = Collections.singletonList(readValue.getKey()); - } else { - selectedKeys = Collections.emptyList(); - } - - return new InfoboxReadResultImpl(marshallPairs(selectedKeys, getValues( - selectedKeys, cmdCtx), readValue.isValueIsXMLEntity())); - - } - - protected InfoboxReadDataAssocArrayType marshallPairs(List<String> selectedKeys, Map<String, Object> values, boolean areXMLEntities) throws SLCommandException { - - ObjectFactory objectFactory = new ObjectFactory(); - - InfoboxReadDataAssocArrayType infoboxReadDataAssocArrayType = objectFactory.createInfoboxReadDataAssocArrayType(); - - for (String key : selectedKeys) { - InfoboxAssocArrayPairType infoboxAssocArrayPairType = objectFactory.createInfoboxAssocArrayPairType(); - infoboxAssocArrayPairType.setKey(key); - - Object value = values.get(key); - if (areXMLEntities) { - if (value instanceof byte[]) { - log.info("Got valuesAreXMLEntities=" + areXMLEntities + " but infobox type is binary."); - throw new SLCommandException(4122); - } else { - XMLContentType contentType = objectFactory.createXMLContentType(); - contentType.getContent().add(value); - infoboxAssocArrayPairType.setXMLContent(contentType); - } - } else { - infoboxAssocArrayPairType.setBase64Content((value instanceof byte[]) ? (byte[]) value : marshallValue(value)); - } - - infoboxReadDataAssocArrayType.getPair().add(infoboxAssocArrayPairType); - } - - return infoboxReadDataAssocArrayType; - - } - - protected byte[] marshallValue(Object jaxbElement) throws SLCommandException { - - Marshaller marshaller = SLMarshallerFactory.getInstance().createMarshaller(false); - ByteArrayOutputStream result = new ByteArrayOutputStream(); - try { - marshaller.marshal(jaxbElement, result); - } catch (JAXBException e) { - log.info("Failed to marshall infobox content.", e); - throw new SLCommandException(4122); - } - - return result.toByteArray(); - - } - - @Override - public InfoboxReadResult read(InfoboxReadRequestType req, - SLCommandContext cmdCtx) throws SLCommandException { - - InfoboxReadParamsAssocArrayType assocArrayParameters = req - .getAssocArrayParameters(); - - if (assocArrayParameters == null) { - log.info("Infobox type is AssocArray but got no AssocArrayParameters."); - throw new SLCommandException(4010); - } - - if (assocArrayParameters.getReadKeys() != null) { - return readKeys(assocArrayParameters.getReadKeys(), cmdCtx); - } - - if (assocArrayParameters.getReadPairs() != null) { - return readPairs(assocArrayParameters.getReadPairs(), cmdCtx); - } - - // ReadValue - if (assocArrayParameters.getReadValue() != null) { - return readValue(assocArrayParameters.getReadValue(), cmdCtx); - } - - log - .info("Infobox type is AssocArray but got invalid AssocArrayParameters."); - throw new SLCommandException(4010); - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractBinaryFileInfobox.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractBinaryFileInfobox.java deleted file mode 100644 index 23394bd5..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractBinaryFileInfobox.java +++ /dev/null @@ -1,66 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadParamsBinaryFileType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; - -/** - * An abstract base class for {@link Infobox} implementations of type binary file. - * - * @author mcentner - */ -public abstract class AbstractBinaryFileInfobox extends AbstractInfoboxImpl implements BinaryFileInfobox { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(AbstractBinaryFileInfobox.class); - - /** - * Is this infobox' content an XML entity? - */ - protected boolean isXMLEntity = false; - - /** - * @return <code>true</code> if this infobox' content is an XML entity or <code>false</code> otherwise. - */ - public boolean isXMLEntity() { - return isXMLEntity; - } - - /** - * Sets the value returned by {@link #isXMLEntity()} according to the given - * <code>request</code>. - * - * @param request the InfoboxReadRequest - */ - public void setIsXMLEntity(InfoboxReadRequestType request) { - - InfoboxReadParamsBinaryFileType binaryFileParameters = request.getBinaryFileParameters(); - if (binaryFileParameters != null) { - isXMLEntity = binaryFileParameters.isContentIsXMLEntity(); - log.debug("Got ContentIsXMLEntity=" + isXMLEntity + "."); - } - - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractInfoboxCommandImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractInfoboxCommandImpl.java deleted file mode 100644 index b8e4030d..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractInfoboxCommandImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; - -/** - * An abstract base class for implementations of security layer infobox requests. - * - * @author mcentner - * - * @param <T> - */ -public abstract class AbstractInfoboxCommandImpl<T> extends SLCommandImpl<T> { - - /** - * The infobox implementation. - */ - protected Infobox infobox; - - /** - * The infobox factory. - */ - protected InfoboxFactory infoboxFactory; - - /** - * @return the infoboxFactory - */ - public InfoboxFactory getInfoboxFactory() { - return infoboxFactory; - } - - /** - * @param infoboxFactory the infoboxFactory to set - */ - public void setInfoboxFactory(InfoboxFactory infoboxFactory) { - this.infoboxFactory = infoboxFactory; - } - - @Override - public void init(SLCommandContext ctx, Object request) - throws SLCommandException { - super.init(ctx, request); - - String infoboxIdentifier = getInfoboxIdentifier(getRequestValue()); - - infobox = infoboxFactory.createInfobox(infoboxIdentifier); - } - - /** - * Returns the infobox identifier given in <code>request</code>. - * - * @param request the request value - * - * @return the infobox identifier givne in <code>request</code> - */ - protected abstract String getInfoboxIdentifier(T request); - - - public String getInfoboxIdentifier() { - if (infobox != null) { - return infobox.getIdentifier(); - } else { - return null; - } - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractInfoboxImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractInfoboxImpl.java deleted file mode 100644 index 564cb8ff..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AbstractInfoboxImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.slcommands.impl; - -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxUpdateRequestType; -import at.gv.egiz.bku.slcommands.InfoboxReadResult; -import at.gv.egiz.bku.slcommands.InfoboxUpdateResult; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; - -/** - * An abstract base class for {@link Infobox} implementations. - * - * @author mcentner - */ -public abstract class AbstractInfoboxImpl implements Infobox { - - @Override - public InfoboxReadResult read(InfoboxReadRequestType request, - SLCommandContext cmdCtx) throws SLCommandException { - throw new SLCommandException(4011); - } - - @Override - public InfoboxUpdateResult update(InfoboxUpdateRequestType request, - SLCommandContext cmdCtx) throws SLCommandException { - throw new SLCommandException(4011); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AssocArrayInfobox.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AssocArrayInfobox.java deleted file mode 100644 index 908d95da..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/AssocArrayInfobox.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.slcommands.impl; - -/** - * An {@link Infobox} of type associative array as defined in Security Layer - * 1.2. - * - * @author mcentner - */ -public interface AssocArrayInfobox extends Infobox { - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/BinaryFileInfobox.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/BinaryFileInfobox.java deleted file mode 100644 index c27f9446..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/BinaryFileInfobox.java +++ /dev/null @@ -1,27 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -/** - * An {@link Infobox} of type binary file as defined in Security Layer - * 1.2. - * - * @author mcentner - */ -public interface BinaryFileInfobox extends Infobox { - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CardChannelInfoboxImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CardChannelInfoboxImpl.java deleted file mode 100644 index 19b84ac7..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CardChannelInfoboxImpl.java +++ /dev/null @@ -1,235 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.UnsupportedEncodingException; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.WeakHashMap; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.buergerkarte.namespaces.cardchannel.ATRType; -import at.buergerkarte.namespaces.cardchannel.CommandAPDUType; -import at.buergerkarte.namespaces.cardchannel.ObjectFactory; -import at.buergerkarte.namespaces.cardchannel.ResetType; -import at.buergerkarte.namespaces.cardchannel.ResponseAPDUType; -import at.buergerkarte.namespaces.cardchannel.ResponseType; -import at.buergerkarte.namespaces.cardchannel.ScriptType; -import at.buergerkarte.namespaces.cardchannel.VerifyAPDUType; -import at.buergerkarte.namespaces.securitylayer._1.Base64XMLContentType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxUpdateRequestType; -import at.buergerkarte.namespaces.securitylayer._1.XMLContentType; -import at.gv.egiz.bku.slcommands.InfoboxReadResult; -import at.gv.egiz.bku.slcommands.InfoboxUpdateResult; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.ext.APDUScriptRequest; -import at.gv.egiz.stal.ext.APDUScriptResponse; -import at.gv.egiz.stal.ext.APDUScriptRequest.RequestScriptElement; -import at.gv.egiz.stal.ext.APDUScriptResponse.ResponseScriptElement; - -public class CardChannelInfoboxImpl extends AbstractBinaryFileInfobox { - - private static Log log = LogFactory.getLog(CardChannelInfoboxImpl.class); - - private static WeakHashMap<STAL, JAXBElement<ResponseType>> scriptResults = new WeakHashMap<STAL, JAXBElement<ResponseType>>(); - - private static JAXBContext jaxbContext; - - static { - try { - jaxbContext = JAXBContext.newInstance(ObjectFactory.class.getPackage().getName()); - } catch (JAXBException e) { - throw new SLRuntimeException("Failed to initalize CardChannel infobox.", e); - } - } - - public CardChannelInfoboxImpl() { - isXMLEntity = true; - } - - @Override - public String getIdentifier() { - return "CardChannel"; - } - - @Override - public InfoboxReadResult read(InfoboxReadRequestType request, - SLCommandContext cmdCtx) throws SLCommandException { - - at.buergerkarte.namespaces.securitylayer._1.ObjectFactory objectFactory - = new at.buergerkarte.namespaces.securitylayer._1.ObjectFactory(); - - Base64XMLContentType content = objectFactory.createBase64XMLContentType(); - XMLContentType xmlContent = objectFactory.createXMLContentType(); - content.setXMLContent(xmlContent); - - JAXBElement<ResponseType> response = scriptResults.get(cmdCtx.getSTAL()); - if (response != null) { - xmlContent.getContent().add(response); - } - - return new InfoboxReadResultImpl(content); - - } - - @SuppressWarnings("unchecked") - @Override - public InfoboxUpdateResult update(InfoboxUpdateRequestType request, - SLCommandContext cmdCtx) throws SLCommandException { - - Base64XMLContentType binaryFileParameters = request.getBinaryFileParameters(); - - if (binaryFileParameters.getBase64Content() != null) { - log.info("Got Base64Content but ContentIsXMLEntity is true."); - throw new SLCommandException(4010); - } - - XMLContentType content = binaryFileParameters.getXMLContent(); - if (content instanceof at.gv.egiz.slbinding.impl.XMLContentType) { - - ByteArrayOutputStream redirectedStream = ((at.gv.egiz.slbinding.impl.XMLContentType) content).getRedirectedStream(); - if (redirectedStream != null) { - - if (log.isDebugEnabled()) { - - StringBuilder sb = new StringBuilder(); - sb.append("CardChannel script:\n"); - try { - sb.append(new String(redirectedStream.toByteArray(), "UTF-8")); - } catch (UnsupportedEncodingException e) { - sb.append(e.getMessage()); - } - log.debug(sb.toString()); - } - - Object object; - try { - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - object = unmarshaller.unmarshal(new ByteArrayInputStream(redirectedStream.toByteArray())); - } catch (JAXBException e) { - log.info("Failed to parse CardChannel script.", e); - throw new SLCommandException(4011); - } - - if (object instanceof JAXBElement) { - executeCardChannelScript(((JAXBElement<ScriptType>) object).getValue(), cmdCtx); - return new InfoboxUpdateResultImpl(); - } - - } - - - } - log.info("Infobox identifier is '" + getIdentifier() + "' but XMLContent does not contain 'Script'."); - throw new SLCommandException(4010); - - } - - protected void executeCardChannelScript(ScriptType script, - SLCommandContext cmdCtx) throws SLCommandException { - - List<Object> resetOrCommandAPDUOrVerifyAPDU = script.getResetOrCommandAPDUOrVerifyAPDU(); - List<RequestScriptElement> requestScript = new ArrayList<RequestScriptElement>(); - - for (Object element : resetOrCommandAPDUOrVerifyAPDU) { - - if (element instanceof ResetType) { - - requestScript.add(new APDUScriptRequest.Reset()); - - } else if (element instanceof CommandAPDUType) { - - CommandAPDUType commandAPDU = (CommandAPDUType) element; - int sequence = (commandAPDU.getSequence() != null) - ? commandAPDU.getSequence().intValue() - : 0; - - requestScript.add( - new APDUScriptRequest.Command( - sequence, - commandAPDU.getValue(), - commandAPDU.getExpectedSW())); - - } else if (element instanceof VerifyAPDUType) { - log.warn("CardChannel script command 'VerifyAPDU' not implemented."); - throw new SLCommandException(4011); - } - } - - APDUScriptRequest scriptRequest = new APDUScriptRequest(requestScript); - - STAL stal = cmdCtx.getSTAL(); - STALHelper helper = new STALHelper(stal); - - helper.transmitSTALRequest(Collections.singletonList(scriptRequest)); - - List<ResponseScriptElement> responseScript = ((APDUScriptResponse) helper - .nextResponse(APDUScriptResponse.class)).getScript(); - - ObjectFactory objectFactory = new ObjectFactory(); - - ResponseType responseType = objectFactory.createResponseType(); - - - for (ResponseScriptElement element : responseScript) { - - if (element instanceof APDUScriptResponse.ATR) { - - byte[] atr = ((APDUScriptResponse.ATR) element).getAtr(); - - ATRType atrType = objectFactory.createATRType(); - atrType.setValue(atr); - atrType.setRc(BigInteger.ZERO); - responseType.getATROrResponseAPDU().add(atrType); - - } else if (element instanceof APDUScriptResponse.Response) { - - APDUScriptResponse.Response response = (APDUScriptResponse.Response) element; - - ResponseAPDUType responseAPDUType = objectFactory.createResponseAPDUType(); - responseAPDUType.setSequence(BigInteger.valueOf(response.getSequence())); -// if (response.getRc() != 0) { - responseAPDUType.setRc(BigInteger.valueOf(response.getRc())); -// } - responseAPDUType.setSw(response.getSw()); - responseAPDUType.setValue(response.getApdu()); - - responseType.getATROrResponseAPDU().add(responseAPDUType); - } - - } - - scriptResults.put(stal, objectFactory.createResponse(responseType)); - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CertificatesInfoboxImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CertificatesInfoboxImpl.java deleted file mode 100644 index 0208f137..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CertificatesInfoboxImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.stal.InfoboxReadRequest; -import at.gv.egiz.stal.STALRequest; - -/** - * An implementation of the {@link Infobox} <em>Certificates</em> as - * specified in Security Layer 1.2. - * - * @author mcentner - */ -public class CertificatesInfoboxImpl extends AbstractAssocArrayInfobox { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(CertificatesInfoboxImpl.class); - - /** - * The valid keys. - */ - public static final String[] CERTIFICATES_KEYS = new String[] { - "SecureSignatureKeypair", - "CertifiedKeypair" }; - - @Override - public String getIdentifier() { - return "Certificates"; - } - - @Override - public String[] getKeys() { - return CERTIFICATES_KEYS; - } - - @Override - public boolean isValuesAreXMLEntities() { - return false; - } - - @Override - public Map<String, Object> getValues(List<String> certificates, SLCommandContext cmdCtx) throws SLCommandException { - - STALHelper stalHelper = new STALHelper(cmdCtx.getSTAL()); - - if (certificates != null && !certificates.isEmpty()) { - - List<STALRequest> stalRequests = new ArrayList<STALRequest>(); - - // get certificates - InfoboxReadRequest infoboxReadRequest; - for (int i = 0; i < certificates.size(); i++) { - infoboxReadRequest = new InfoboxReadRequest(); - infoboxReadRequest.setInfoboxIdentifier(certificates.get(i)); - stalRequests.add(infoboxReadRequest); - } - - stalHelper.transmitSTALRequest(stalRequests); - - List<X509Certificate> x509Certs = stalHelper.getCertificatesFromResponses(); - - Map<String, Object> values = new HashMap<String, Object>(); - - for (int i = 0; i < certificates.size(); i++) { - try { - values.put(certificates.get(i), x509Certs.get(i).getEncoded()); - } catch (CertificateEncodingException e) { - log.error("Failed to encode certificate.", e); - throw new SLCommandException(4000); - } - } - - return values; - - } else { - - return new HashMap<String, Object>(); - - } - - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java deleted file mode 100644 index 01686641..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.slcommands.impl; - -import java.security.NoSuchAlgorithmException; -import java.security.cert.X509Certificate; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -import javax.xml.crypto.MarshalException; -import javax.xml.crypto.URIReferenceException; -import javax.xml.crypto.dsig.XMLSignatureException; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.w3c.dom.ls.DOMImplementationLS; -import org.w3c.dom.ls.LSSerializer; - -import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureRequestType; -import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; -import at.gv.egiz.bku.slcommands.CreateXMLSignatureCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory; -import at.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactoryImpl; -import at.gv.egiz.bku.slcommands.impl.xsect.IdValueFactory; -import at.gv.egiz.bku.slcommands.impl.xsect.IdValueFactoryImpl; -import at.gv.egiz.bku.slcommands.impl.xsect.Signature; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLViewerException; -import at.gv.egiz.dom.DOMUtils; -import at.gv.egiz.stal.InfoboxReadRequest; -import at.gv.egiz.stal.STALRequest; - -/** - * This class implements the security layer command - * <code>CreateXMLSignatureRequest</code>. - * - * @author mcentner - */ -public class CreateXMLSignatureCommandImpl extends - SLCommandImpl<CreateXMLSignatureRequestType> implements - CreateXMLSignatureCommand { - - /** - * Logging facility. - */ - protected static Log log = LogFactory - .getLog(CreateXMLSignatureCommandImpl.class); - - /** - * The signing certificate. - */ - protected X509Certificate signingCertificate; - - /** - * The keybox identifier of the key used for signing. - */ - protected String keyboxIdentifier; - - /** - * The to-be signed signature. - */ - protected Signature signature; - - @Override - public void init(SLCommandContext ctx, Object unmarshalledRequest) - throws SLCommandException { - super.init(ctx, unmarshalledRequest); - } - - @Override - public void prepareXMLSignature() throws SLCommandException, - SLRequestException { - - CreateXMLSignatureRequestType request = getRequestValue(); - - // TODO: make configurable?
- IdValueFactory idValueFactory = new IdValueFactoryImpl(); - - // TODO: make configurable?
- AlgorithmMethodFactory algorithmMethodFactory; - try { - algorithmMethodFactory = new AlgorithmMethodFactoryImpl( - signingCertificate); - } catch (NoSuchAlgorithmException e) { - log.error("Failed to get DigestMethod.", e); - throw new SLCommandException(4006); - } - - signature = new Signature(getCmdCtx().getURLDereferencerContext(), - idValueFactory, algorithmMethodFactory); - - // SigningTime
- signature.setSigningTime(new Date()); - - // SigningCertificate
- signature.setSignerCeritifcate(signingCertificate); - - // SignatureInfo
- if (request.getSignatureInfo() != null) { - signature.setSignatureInfo(request.getSignatureInfo()); - } - - // DataObjects
- for (DataObjectInfoType dataObjectInfo : request.getDataObjectInfo()) { - signature.addDataObject(dataObjectInfo); - } - - signature.buildXMLSignature(); - - } - - /** - * Gets the signing certificate from STAL. - * - * @throws SLCommandException - * if getting the singing certificate fails - */ - private void getSigningCertificate() throws SLCommandException { - - CreateXMLSignatureRequestType request = getRequestValue(); - keyboxIdentifier = request.getKeyboxIdentifier(); - - InfoboxReadRequest stalRequest = new InfoboxReadRequest(); - stalRequest.setInfoboxIdentifier(keyboxIdentifier); - - stalHelper.transmitSTALRequest(Collections.singletonList((STALRequest) stalRequest)); - List<X509Certificate> certificates = stalHelper.getCertificatesFromResponses(); - if (certificates == null || certificates.size() != 1) { - log.info("Got an unexpected number of certificates from STAL."); - throw new SLCommandException(4000); - } - signingCertificate = certificates.get(0); - - } - - /** - * Signs the signature. - * - * @throws SLCommandException - * if signing the signature fails - * @throws SLViewerException - */ - private void signXMLSignature() throws SLCommandException, SLViewerException { - - try { - signature.sign(getCmdCtx().getSTAL(), keyboxIdentifier); - } catch (MarshalException e) { - log.error("Failed to marshall XMLSignature.", e); - throw new SLCommandException(4000); - } catch (XMLSignatureException e) { - if (e.getCause() instanceof URIReferenceException) { - URIReferenceException uriReferenceException = (URIReferenceException) e - .getCause(); - if (uriReferenceException.getCause() instanceof SLCommandException) { - throw (SLCommandException) uriReferenceException.getCause(); - } - } - log.error("Failed to sign XMLSignature.", e); - throw new SLCommandException(4000); - } - - } - - @Override - public SLResult execute() { - try { - - // get certificate in order to select appropriate algorithms for hashing - // and signing
- getSigningCertificate(); - - // prepare the XMLSignature for signing
- prepareXMLSignature(); - - // sign the XMLSignature
- signXMLSignature(); - - if (log.isTraceEnabled()) { - - DOMImplementationLS domImplLS = DOMUtils.getDOMImplementationLS(); - LSSerializer serializer = domImplLS.createLSSerializer(); - String debugString = serializer.writeToString(signature.getDocument()); - - log.trace(debugString); - - } - - return new CreateXMLSignatureResultImpl(signature.getDocument()); - - } catch (SLException e) { - return new ErrorResultImpl(e, cmdCtx.getLocale()); - } - } - - @Override - public String getName() { - return "CreateXMLSignatureRequest"; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureResultImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureResultImpl.java deleted file mode 100644 index 19df4334..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureResultImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.transform.Result; -import javax.xml.transform.Templates; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentFragment; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureResponseType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.gv.egiz.bku.slcommands.SLMarshallerFactory; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; - -/** - * This calls implements the result of the security layer command <code>CreateXMLSignature</code>. - * - * @author mcentner - */ -public class CreateXMLSignatureResultImpl extends SLResultImpl { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(CreateXMLSignatureResultImpl.class); - - /** - * The document containing the XMLSignature. - */ - protected Document doc; - - /** - * Creates a new instance of this CreateXMLSignatureResultImpl with the given - * signature <code>document</code>. - * - * @param document the signature document - * - * @throws NullPointerException if <code>document</code> is <code>null</code> - */ - public CreateXMLSignatureResultImpl(Document document) { - super(); - - if (document == null) { - throw new NullPointerException("Argument 'document' must not be null."); - } - - this.doc = document; - - marshallCreateXMLSignatureResponse(); - } - - /** - * Marshalls the <code>CreateXMLSignatureResponse</code>. - */ - private void marshallCreateXMLSignatureResponse() { - - ObjectFactory factory = new ObjectFactory(); - - CreateXMLSignatureResponseType createCreateXMLSignatureResponseType = factory.createCreateXMLSignatureResponseType(); - JAXBElement<CreateXMLSignatureResponseType> createCreateXMLSignatureResponse = factory.createCreateXMLSignatureResponse(createCreateXMLSignatureResponseType); - - DocumentFragment fragment = doc.createDocumentFragment(); - - Marshaller marshaller = SLMarshallerFactory.getInstance().createMarshaller(false); - try { - marshaller.marshal(createCreateXMLSignatureResponse, fragment); - } catch (JAXBException e) { - log.error("Failed to marshall 'CreateXMLSignatureResponse'", e); - throw new SLRuntimeException(e); - } - - Node child = fragment.getFirstChild(); - if (child instanceof Element) { - Node node = doc.replaceChild(child, doc.getDocumentElement()); - child.appendChild(node); - } - - } - - @Override - public void writeTo(Result result, Templates templates, boolean fragment) { - writeTo(doc, result, templates, fragment); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/DataObjectHashDataInput.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/DataObjectHashDataInput.java deleted file mode 100644 index 57358ba0..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/DataObjectHashDataInput.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package at.gv.egiz.bku.slcommands.impl; - -import at.gv.egiz.bku.binding.HttpUtil; -import at.gv.egiz.bku.slcommands.impl.xsect.DataObject; -import at.gv.egiz.stal.HashDataInput; -import java.io.InputStream; - -/** - * DataObject-backed HashDataInput - * If <a href="XMLSignContext.html#Supported Properties">reference caching</a> is enabled, - * the hashdata input stream can be obtained repeatedly. - * @author clemens - */ -public class DataObjectHashDataInput implements HashDataInput { - - protected DataObject dataObject; - - public DataObjectHashDataInput(DataObject dataObject) { - if (dataObject.getReference() == null) - throw new NullPointerException("DataObject reference must not be null"); - this.dataObject = dataObject; - } - - @Override - public String getReferenceId() { - return dataObject.getReference().getId(); - } - - @Override - public String getMimeType() { - String contentType = dataObject.getMimeType(); - return contentType.split(";")[0].trim(); - } - - /** - * may be called repeatedly - * @return the pre-digested input stream if reference caching is enabled, null otherwise - */ - @Override - public InputStream getHashDataInput() { - return dataObject.getReference().getDigestInputStream(); - } - - @Override - public String getEncoding() { - return HttpUtil.getCharset(dataObject.getMimeType(), false); - } - - @Override - public String getFilename() { - //TODO obtain filename from dataObject, if not set return null or get filename (extension!) from mimetype - return dataObject.getFilename(); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java deleted file mode 100644 index aedde238..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl;
-
-import java.util.Locale; - -import javax.xml.transform.Result; -import javax.xml.transform.Templates; - -import at.gv.egiz.bku.slcommands.ErrorResult; -import at.gv.egiz.bku.slexceptions.SLException; -
-/**
- * This class implements the security layer result <code>ErrorResponse</code>.
- *
- * @author mcentner
- */
-public class ErrorResultImpl extends SLResultImpl implements ErrorResult {
-
- /**
- * The exception containing information provided in the <code>ErrorResponse</code>.
- */
- protected SLException slException; - - /** - * The locale to be used for rendering an <code>ErrorResponse</code>. - */ - protected Locale locale; - - /** - * Creates a new instance of this ErrorResultImpl with the given - * <code>slException</code> containing information provided in the - * <code>ErrorResponse</code> and the <code>locale</code> for rendering - * the <code>ErrorResponse</code>. - * - * @param slException the exception - * @param locale the locale - */ - public ErrorResultImpl(SLException slException, Locale locale) { - this.slException = slException; - this.locale = locale; - } - - @Override - public void writeTo(Result result, Templates templates, boolean fragment) { - if (locale == null) { - writeErrorTo(slException, result, templates, fragment); - } else { - writeErrorTo(slException, result, templates, locale, fragment); - } - } -
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/GetStatusCommandImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/GetStatusCommandImpl.java deleted file mode 100644 index 0c2b96f9..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/GetStatusCommandImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package at.gv.egiz.bku.slcommands.impl; - -import at.buergerkarte.namespaces.securitylayer._1.GetStatusRequestType; -import at.gv.egiz.bku.slcommands.GetStatusCommand; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.stal.ErrorResponse; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.STALResponse; -import at.gv.egiz.stal.StatusRequest; -import at.gv.egiz.stal.StatusResponse; -import java.util.Collections; -import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public class GetStatusCommandImpl extends SLCommandImpl<GetStatusRequestType> implements GetStatusCommand { - - protected static Log log = LogFactory.getLog(GetStatusCommandImpl.class); - - @Override - public String getName() { - return "GetStatusRequest"; - } - - @Override - public SLResult execute() { - - //ignore maxDelay and TokenStatus -// GetStatusRequestType req = getRequestValue(); - - log.debug("execute GetStatusRequest"); - - StatusRequest stalRequest = new StatusRequest(); - - STAL stal = cmdCtx.getSTAL(); - - List<STALResponse> responses = stal.handleRequest(Collections.singletonList(stalRequest)); - - if (responses != null && responses.size() == 1) { - STALResponse stalResponse = responses.get(0); - if (stalResponse instanceof StatusResponse) { - boolean ready = ((StatusResponse) stalResponse).isCardReady(); - log.trace("received status response cardReady: " + ready); - return new GetStatusResultImpl(ready); - } else if (stalResponse instanceof ErrorResponse) { - log.debug("received error response"); - SLCommandException ex = new SLCommandException(((ErrorResponse) stalResponse).getErrorCode()); - return new ErrorResultImpl(ex, cmdCtx.getLocale()); - } - } - log.error("received unexpected responses"); - return new ErrorResultImpl(new SLCommandException(4000), cmdCtx.getLocale()); - - } -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/GetStatusResultImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/GetStatusResultImpl.java deleted file mode 100644 index fb1f627f..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/GetStatusResultImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.slcommands.impl; - -import at.buergerkarte.namespaces.securitylayer._1.GetStatusResponseType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.buergerkarte.namespaces.securitylayer._1.TokenStatusType; -import at.gv.egiz.bku.slcommands.GetStatusResult; -import javax.xml.bind.JAXBElement; -import javax.xml.transform.Result; -import javax.xml.transform.Templates; - -/** - * - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public class GetStatusResultImpl extends SLResultImpl implements GetStatusResult { - - protected ObjectFactory of; - protected GetStatusResponseType responseType; - - public GetStatusResultImpl(boolean ready) { - of = new ObjectFactory(); - responseType = of.createGetStatusResponseType(); - if (ready) { - responseType.setTokenStatus(TokenStatusType.READY); - } else { - responseType.setTokenStatus(TokenStatusType.REMOVED); - } - - } - - @Override - public void writeTo(Result result, Templates templates, boolean fragment) { - JAXBElement<GetStatusResponseType> response = of.createGetStatusResponse(responseType); - writeTo(response, result, templates, fragment); - } -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/IdentityLinkInfoboxImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/IdentityLinkInfoboxImpl.java deleted file mode 100644 index 160e9589..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/IdentityLinkInfoboxImpl.java +++ /dev/null @@ -1,290 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Result; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -import at.buergerkarte.namespaces.personenbindung._20020506_.CompressedIdentityLinkType; -import at.buergerkarte.namespaces.securitylayer._1.AnyChildrenType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; -import at.gv.egiz.bku.slcommands.InfoboxReadResult; -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLExceptionMessages; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.idlink.CompressedIdentityLinkFactory; -import at.gv.egiz.idlink.IdentityLinkTransformer; -import at.gv.egiz.idlink.ans1.IdentityLink; -import at.gv.egiz.stal.InfoboxReadRequest; -import at.gv.egiz.stal.STALRequest; - -/** - * An implementation of the {@link Infobox} <em>IdentityLink</em> as - * specified in Security Layer 1.2 - * - * @author mcentner - */ -public class IdentityLinkInfoboxImpl extends AbstractBinaryFileInfobox { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(IdentityLinkInfoboxImpl.class); - - /** - * The box specific parameter <code>IdentityLinkDomainIdentifier</code>. - */ - public static final String BOX_SPECIFIC_PARAMETER_IDENTITY_LINK_DOMAIN_IDENTIFIER = "IdentityLinkDomainIdentifier"; - - /** - * The value of the box specific parameter <code>IdentityLinkDomainIdentifier</code>. - */ - private String domainIdentifier; - - @Override - public String getIdentifier() { - return "IdentityLink"; - } - - /** - * @return the value of the box specific parameter <code>IdentityLinkDomainIdentifier</code> - */ - public String getDomainIdentifier() { - return domainIdentifier; - } - - @Override - public InfoboxReadResult read(InfoboxReadRequestType req, SLCommandContext cmdCtx) throws SLCommandException { - - AnyChildrenType boxSpecificParameters = req.getBoxSpecificParameters(); - - if (boxSpecificParameters != null) { - // check BoxSpecificParameters - List<Object> parameter = boxSpecificParameters.getAny(); - JAXBElement<?> element; - if (parameter != null - && parameter.size() == 1 - && parameter.get(0) instanceof JAXBElement<?> - && SLCommand.NAMESPACE_URI.equals((element = (JAXBElement<?>) parameter.get(0)).getName().getNamespaceURI()) - && BOX_SPECIFIC_PARAMETER_IDENTITY_LINK_DOMAIN_IDENTIFIER.equals(element.getName().getLocalPart()) - && element.getValue() instanceof String) { - domainIdentifier = (String) element.getValue(); - log.debug("Got sl:IdentityLinkDomainIdentifier: " + domainIdentifier); - } else { - log.info("Got invalid BoxSpecificParameters."); - throw new SLCommandException(4010); - } - } - - setIsXMLEntity(req); - - STALHelper stalHelper = new STALHelper(cmdCtx.getSTAL()); - - List<STALRequest> stalRequests = new ArrayList<STALRequest>(); - - InfoboxReadRequest infoboxReadRequest; - // get raw identity link - infoboxReadRequest = new InfoboxReadRequest(); - infoboxReadRequest.setInfoboxIdentifier(getIdentifier()); - infoboxReadRequest.setDomainIdentifier(domainIdentifier); - stalRequests.add(infoboxReadRequest); - - // get certificates - infoboxReadRequest = new InfoboxReadRequest(); - infoboxReadRequest.setInfoboxIdentifier("SecureSignatureKeypair"); - stalRequests.add(infoboxReadRequest); - infoboxReadRequest = new InfoboxReadRequest(); - infoboxReadRequest.setInfoboxIdentifier("CertifiedKeypair"); - stalRequests.add(infoboxReadRequest); - - stalHelper.transmitSTALRequest(stalRequests); - log.trace("Got STAL response"); - - IdentityLink identityLink = stalHelper.getIdentityLinkFromResponses(); - List<X509Certificate> certificates = stalHelper.getCertificatesFromResponses(); - - - CompressedIdentityLinkFactory idLinkFactory = CompressedIdentityLinkFactory.getInstance(); - JAXBElement<CompressedIdentityLinkType> compressedIdentityLink = idLinkFactory - .createCompressedIdentityLink(identityLink, certificates, getDomainIdentifier()); - - IdentityLinkTransformer identityLinkTransformer = IdentityLinkTransformer.getInstance(); - String issuerTemplate = identityLink.getIssuerTemplate(); - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - DocumentBuilder db; - try { - db = dbf.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - log.error("Failed to create XML document.", e); - throw new SLRuntimeException(e); - } - - Document document = db.newDocument(); - try { - idLinkFactory.marshallCompressedIdentityLink(compressedIdentityLink, document, null, true); - } catch (JAXBException e) { - log.info("Failed to marshall CompressedIdentityLink.", e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_INFOBOX_INVALID, - new Object[] { getIdentifier() }); - } - - InfoboxReadResultFileImpl result = new InfoboxReadResultFileImpl(); - ByteArrayOutputStream resultBytes = null; - Result xmlResult; - if (isXMLEntity()) { - // we will return the result as XML entity - xmlResult = result.getXmlResult(true); - } else { - // we will return the result as binary data - if (getDomainIdentifier() != null) { - // we need an XML result to be able to replace the domain identifier below - Document doc; - try { - doc = dbf.newDocumentBuilder().newDocument(); - } catch (ParserConfigurationException e) { - // it should always be possible to create a new Document - log.error("Failed to create XML document.", e); - throw new SLRuntimeException(e); - } - xmlResult = new DOMResult(doc); - } else { - resultBytes = new ByteArrayOutputStream(); - xmlResult = new StreamResult(resultBytes); - } - } - - try { - log.trace("Trying to transform identitylink"); - identityLinkTransformer.transformIdLink(issuerTemplate, new DOMSource(document), xmlResult); - } catch (MalformedURLException e) { - log.warn("Malformed issuer template URL '" + issuerTemplate + "'."); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } catch (IOException e) { - log.warn("Failed to dereferene issuer template URL '" + issuerTemplate + "'." ,e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } catch (TransformerConfigurationException e) { - log.warn("Failed to create transformation template from issuer template URL '" + issuerTemplate + "'", e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } catch (TransformerException e) { - log.info("Faild to transform CompressedIdentityLink.", e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } - - // TODO: Report BUG in IssuerTemplates - // Some IssuerTemplate stylesheets do not consider the pr:Type-Element of the CompressedIdentityLink ... - if (getDomainIdentifier() != null) { - if (xmlResult instanceof DOMResult) { - Node node = ((DOMResult) xmlResult).getNode(); - Node nextSibling = ((DOMResult) xmlResult).getNextSibling(); - Node idLinkNode; - if (nextSibling != null) { - idLinkNode = nextSibling.getPreviousSibling(); - } else if (node != null) { - idLinkNode = node.getFirstChild(); - } else { - log - .error("An IdentityLinkDomainIdentifier of '" - + getDomainIdentifier() - + "' has been given. However, it cannot be set, as the transformation result does not contain a node."); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } - IdentityLinkTransformer.setDomainIdentifier(idLinkNode, getDomainIdentifier()); - } else { - log - .error("An IdentityLinkDomainIdentifier of '" - + getDomainIdentifier() - + "' has been given. However, it cannot be set, as the transformation result is not of type DOM."); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } - } - - if (!isXMLEntity()) { - if (resultBytes == null) { - resultBytes = new ByteArrayOutputStream(); - if (xmlResult instanceof DOMResult) { - Node node = ((DOMResult) xmlResult).getNode(); - DOMSource xmlSource = new DOMSource(node); - TransformerFactory transformerFactory = TransformerFactory.newInstance(); - try { - Transformer transformer = transformerFactory.newTransformer(); - transformer.transform(xmlSource, new StreamResult(resultBytes)); - } catch (TransformerConfigurationException e) { - log.error(e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } catch (TransformerException e) { - log.error(e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } - } else { - log.error("ContentIsXMLEntity is set to 'false'. However, an XMLResult has already been set."); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED, - new Object[] { issuerTemplate }); - } - } - result.setResultBytes(resultBytes.toByteArray()); - } - - return result; - - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/Infobox.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/Infobox.java deleted file mode 100644 index 99d62721..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/Infobox.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.slcommands.impl; - -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxUpdateRequestType; -import at.gv.egiz.bku.slcommands.InfoboxReadResult; -import at.gv.egiz.bku.slcommands.InfoboxUpdateResult; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; - -/** - * An implementation of this interface represents a infobox as defined in - * Security-Layer 1.2. - * - * @author mcentner - */ -public interface Infobox { - - /** - * @return the identifier of this infobox - */ - public String getIdentifier(); - - /** - * Read data from this infobox. - * - * @param request - * the InfoboxReadRequest - * @param cmdCtx - * the command context - * - * @return the data read from this infobox as InfoboxReadResult - * - * @throws SLCommandException - * - * if reading from this infobox fails - */ - public InfoboxReadResult read(InfoboxReadRequestType request, - SLCommandContext cmdCtx) throws SLCommandException; - - /** - * Update data in this infobox. - * - * @param request - * the InfoboxUpdateRequest - * @param cmdCtx - * the command context - * @return a corresponding InfoboxUpdateResult - * @throws SLCommandException - * if updating this infobox fails - */ - public InfoboxUpdateResult update(InfoboxUpdateRequestType request, - SLCommandContext cmdCtx) throws SLCommandException; - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxFactory.java deleted file mode 100644 index fdf94297..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxFactory.java +++ /dev/null @@ -1,90 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import java.util.HashMap; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLExceptionMessages; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; - -/** - * A factory for creating {@link Infobox}es. - * - * @author mcentner - */ -public class InfoboxFactory { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(InfoboxFactory.class); - - /** - * The mapping of Infobox name to concrete Infobox factory. - */ - private HashMap<String, AbstractInfoboxFactory> infoboxFactories = new HashMap<String, AbstractInfoboxFactory>(); - - /** - * @param infoboxFactories the infoboxFactories to set - */ - public void setInfoboxFactories( - HashMap<String, AbstractInfoboxFactory> factories) { - if (log.isDebugEnabled()) { - StringBuilder sb = new StringBuilder(); - sb.append("Registered infobox factories for"); - for (String name : factories.keySet()) { - sb.append("\n " + name + " : " + factories.get(name).getClass()); - } - log.debug(sb); - } - this.infoboxFactories = factories; - } - - /** - * Create a new {@link Infobox} instance for the given - * <code>infoboxIdentifier</code>. - * - * @param infoboxIdentifier - * the infobox identifier - * - * @return an {@link Infobox} implementation for the given infobox identifier - * - * @throws SLCommandException - * if there is no implementation for the given infobox identifier - * @throws SLRuntimeException - * if creating an {@link Infobox} instance fails - */ - public Infobox createInfobox(String infoboxIdentifier) throws SLCommandException, SLRuntimeException { - - AbstractInfoboxFactory factory = infoboxFactories.get(infoboxIdentifier); - if (factory == null) { - log.info("Unsupported infobox '" + infoboxIdentifier + "."); - throw new SLCommandException(4002, - SLExceptionMessages.EC4002_INFOBOX_UNKNOWN, - new Object[] { infoboxIdentifier }); - } - - return factory.createInfobox(); - - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java deleted file mode 100644 index 693f444f..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadCommandImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl;
-
-import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadRequestType; -import at.gv.egiz.bku.slcommands.InfoboxReadCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slexceptions.SLCommandException; -
-/**
- * This class implements the security layer command
- * <code>InfoboxReadRequest</code>.
- * <p>
- * <b>NOTE:</b> Currently the only supported infobox identifier is '
- * <code>IdentityLink</code>'.
- * </p>
- *
- * @author mcentner
- */
-public class InfoboxReadCommandImpl extends AbstractInfoboxCommandImpl<InfoboxReadRequestType> implements
- InfoboxReadCommand {
-
- /**
- * Logging facility.
- */
- protected static Log log = LogFactory.getLog(InfoboxReadCommandImpl.class); - - @Override
- public String getName() {
- return "InfoboxReadRequest";
- }
-
- @Override - protected String getInfoboxIdentifier(InfoboxReadRequestType request) { - return request.getInfoboxIdentifier(); - } - - @Override
- public void init(SLCommandContext ctx, Object request) throws SLCommandException {
- super.init(ctx, request);
-
- InfoboxReadRequestType req = getRequestValue();
- - if (req.getAssocArrayParameters() != null && - !(infobox instanceof AssocArrayInfobox)) { - log.info("Got AssocArrayParameters but Infobox type is not AssocArray."); - throw new SLCommandException(4010); - } - - if (req.getBinaryFileParameters() != null && - !(infobox instanceof BinaryFileInfobox)) { - log.info("Got BinaryFileParameters but Infobox type is not BinaryFile."); - throw new SLCommandException(4010); - } -
- }
-
- @Override
- public SLResult execute() { - - try { - return infobox.read(getRequestValue(), getCmdCtx()); - } catch (SLCommandException e) { - return new ErrorResultImpl(e, getCmdCtx().getLocale()); - } - - }
-
- @Override - public String getIdentityLinkDomainId() { - if (infobox instanceof IdentityLinkInfoboxImpl) { - return ((IdentityLinkInfoboxImpl) infobox).getDomainIdentifier(); - } else { - return null; - } - } - -}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java deleted file mode 100644 index 422b424f..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Result; -import javax.xml.transform.Templates; -import javax.xml.transform.dom.DOMResult; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -import at.buergerkarte.namespaces.securitylayer._1.Base64XMLContentType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadResponseType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.buergerkarte.namespaces.securitylayer._1.XMLContentType; -import at.gv.egiz.bku.slcommands.InfoboxReadResult; -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLMarshallerFactory; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; - -/** - * This class implements the result of the security layer command <code>InfoboxReadRequest</code>. - * - * @author mcentner - */ -public class InfoboxReadResultFileImpl extends SLResultImpl implements - InfoboxReadResult { - - /** - * Logging facility. - */ - protected static Log log = LogFactory.getLog(InfoboxReadResultFileImpl.class); - - /** - * The XML document containing the infobox content. - */ - protected Document xmlDocument; - - /** - * Creates the response document from the given <code>binaryContent</code>. - * - * @param binaryContent the infobox content - * @param preserveSpace the value of the <code>preserveSpace</code> parameter - * - * @return the created response document - */ - private Document createResponseDocument(byte[] binaryContent, boolean preserveSpace) { - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - Document doc; - try { - doc = dbf.newDocumentBuilder().newDocument(); - } catch (ParserConfigurationException e) { - // it should always be possible to create a new Document - log.error("Failed to create XML document.", e); - throw new SLRuntimeException(e); - } - - ObjectFactory factory = new ObjectFactory(); - - Base64XMLContentType base64XMLContentType = factory.createBase64XMLContentType(); - if (binaryContent == null) { - XMLContentType xmlContentType = factory.createXMLContentType(); - if (preserveSpace) { - xmlContentType.setSpace("preserve"); - } - base64XMLContentType.setXMLContent(xmlContentType); - } else { - base64XMLContentType.setBase64Content(binaryContent); - } - InfoboxReadResponseType infoboxReadResponseType = factory.createInfoboxReadResponseType(); - infoboxReadResponseType.setBinaryFileData(base64XMLContentType); - - JAXBElement<InfoboxReadResponseType> infoboxReadResponse = factory.createInfoboxReadResponse(infoboxReadResponseType); - - Marshaller marshaller = SLMarshallerFactory.getInstance().createMarshaller(false); - try { - marshaller.marshal(infoboxReadResponse, doc); - } catch (JAXBException e) { - log.error("Failed to marshal 'InfoboxReadResponse' document.", e); - throw new SLRuntimeException(e); - } - - return doc; - - } - - - /** - * @return an XMLResult for marshalling the infobox to - */ - public Result getXmlResult(boolean preserveSpace) { - - xmlDocument = createResponseDocument(null, preserveSpace); - - NodeList nodeList = xmlDocument.getElementsByTagNameNS(SLCommand.NAMESPACE_URI, "XMLContent"); - return new DOMResult(nodeList.item(0)); - - } - - /** - * Creates a new <code>InfoboxReadResponse</code> document and appends - * the given <code>node</code> as child node of the <code>XMLContent</code> element. - * - * @param node the node to be appended as child node of the <code>XMLContnet</code> element - * @param preserveSpace if <code>true</code> the value of the <code>XMLContent</code>'s <code>space</code> - * attribute is set to <code>preserve</code>. - */ - public void setResultXMLContent(Node node, boolean preserveSpace) { - - xmlDocument = createResponseDocument(null, preserveSpace); - - NodeList nodeList = xmlDocument.getElementsByTagNameNS(SLCommand.NAMESPACE_URI, "XMLContent"); - if (node.getOwnerDocument() != xmlDocument) { - node = xmlDocument.importNode(node, true); - } - nodeList.item(0).appendChild(node); - - } - - /** - * Creates a new result document for this <code>InfoboxReadResult</code> - * and sets the given <code>resultBytes</code> as content. - * - * @param resultBytes - */ - public void setResultBytes(byte[] resultBytes) { - - xmlDocument = createResponseDocument(resultBytes, false); - - } - - @Override - public void writeTo(Result result, Templates templates, boolean fragment) { - writeTo(xmlDocument, result, templates, fragment); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultImpl.java deleted file mode 100644 index 271ec955..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import javax.xml.bind.JAXBElement; -import javax.xml.transform.Result; -import javax.xml.transform.Templates; - -import at.buergerkarte.namespaces.securitylayer._1.Base64XMLContentType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadDataAssocArrayType; -import at.buergerkarte.namespaces.securitylayer._1.InfoboxReadResponseType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.gv.egiz.bku.slcommands.InfoboxReadResult; - -public class InfoboxReadResultImpl extends SLResultImpl implements InfoboxReadResult { - - /** - * The <code>InfoboxReadResponse</code> - */ - protected InfoboxReadResponseType infoboxReadResponse; - - public InfoboxReadResultImpl(InfoboxReadDataAssocArrayType assocArray) { - - ObjectFactory objectFactory = new ObjectFactory(); - InfoboxReadResponseType infoboxReadResponseType = objectFactory.createInfoboxReadResponseType(); - - infoboxReadResponseType.setAssocArrayData(assocArray); - - this.infoboxReadResponse = infoboxReadResponseType; - } - - public InfoboxReadResultImpl(Base64XMLContentType value) { - - ObjectFactory objectFactory = new ObjectFactory(); - InfoboxReadResponseType infoboxReadResponseType = objectFactory.createInfoboxReadResponseType(); - - infoboxReadResponseType.setBinaryFileData(value); - - this.infoboxReadResponse = infoboxReadResponseType; - - } - - @Override - public void writeTo(Result result, Templates templates, boolean fragment) { - ObjectFactory objectFactory = new ObjectFactory(); - JAXBElement<InfoboxReadResponseType> response = objectFactory.createInfoboxReadResponse(infoboxReadResponse); - writeTo(response, result, templates, fragment); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxUpdateCommandImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxUpdateCommandImpl.java deleted file mode 100644 index 1cdeda94..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxUpdateCommandImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.buergerkarte.namespaces.securitylayer._1.InfoboxUpdateRequestType; -import at.gv.egiz.bku.slcommands.InfoboxUpdateCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slexceptions.SLCommandException; - -public class InfoboxUpdateCommandImpl extends - AbstractInfoboxCommandImpl<InfoboxUpdateRequestType> implements InfoboxUpdateCommand { - - private static Log log = LogFactory.getLog(InfoboxUpdateCommandImpl.class); - - @Override - public String getName() { - return "InfoboxUpdateRequest"; - } - - @Override - protected String getInfoboxIdentifier(InfoboxUpdateRequestType request) { - return request.getInfoboxIdentifier(); - } - - @Override - public void init(SLCommandContext ctx, Object request) throws SLCommandException { - super.init(ctx, request); - - InfoboxUpdateRequestType req = getRequestValue(); - - if (req.getAssocArrayParameters() != null && - !(infobox instanceof AssocArrayInfobox)) { - log.info("Got AssocArrayParameters but Infobox type is not AssocArray."); - throw new SLCommandException(4010); - } - - if (req.getBinaryFileParameters() != null && - !(infobox instanceof BinaryFileInfobox)) { - log.info("Got BinaryFileParameters but Infobox type is not BinaryFile."); - throw new SLCommandException(4010); - } - - } - - @Override - public SLResult execute() { - - try { - return infobox.update(getRequestValue(), getCmdCtx()); - } catch (SLCommandException e) { - return new ErrorResultImpl(e, getCmdCtx().getLocale()); - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxUpdateResultImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxUpdateResultImpl.java deleted file mode 100644 index e12536ba..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxUpdateResultImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import javax.xml.bind.JAXBElement; -import javax.xml.transform.Result; -import javax.xml.transform.Templates; - -import at.buergerkarte.namespaces.securitylayer._1.InfoboxUpdateResponseType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.gv.egiz.bku.slcommands.InfoboxUpdateResult; - -public class InfoboxUpdateResultImpl extends SLResultImpl implements - InfoboxUpdateResult { - - protected static JAXBElement<InfoboxUpdateResponseType> RESPONSE; - - static { - ObjectFactory factory = new ObjectFactory(); - InfoboxUpdateResponseType type = factory.createInfoboxUpdateResponseType(); - RESPONSE = factory.createInfoboxUpdateResponse(type); - } - - @Override - public void writeTo(Result result, Templates templates, boolean fragment) { - writeTo(RESPONSE, result, templates, fragment); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationCommandImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationCommandImpl.java deleted file mode 100644 index 1b6fb237..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationCommandImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import at.buergerkarte.namespaces.securitylayer._1.NullOperationRequestType; -import at.gv.egiz.bku.slcommands.NullOperationCommand; -import at.gv.egiz.bku.slcommands.NullOperationResult; -import at.gv.egiz.bku.slcommands.SLResult; - -/** - * This class implements the security layer command <code>NullOperation</code>. - * - * @author mcentner - */ -public class NullOperationCommandImpl extends SLCommandImpl<NullOperationRequestType> implements NullOperationCommand { - - protected static NullOperationResult RESULT = new NullOperationResultImpl(); - - @Override - public SLResult execute() { - return RESULT; - } - - @Override - public String getName() { - return "NullOperationRequest"; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImpl.java deleted file mode 100644 index 87733e39..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import javax.xml.bind.JAXBElement; -import javax.xml.transform.Result; -import javax.xml.transform.Templates; - -import at.buergerkarte.namespaces.securitylayer._1.NullOperationResponseType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.gv.egiz.bku.slcommands.NullOperationResult; - -/** - * This class represents the result of the security layer command - * <code>NullOperation</code>. - * - * @author mcentner - */ -public class NullOperationResultImpl extends SLResultImpl implements NullOperationResult { - - protected static JAXBElement<NullOperationResponseType> RESPONSE; - - static { - ObjectFactory factory = new ObjectFactory(); - NullOperationResponseType type = factory.createNullOperationResponseType(); - RESPONSE = factory.createNullOperationResponse(type); - } - - @Override - public void writeTo(Result result, Templates templates, boolean fragment) { - super.writeTo(RESPONSE, result, templates, fragment); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLCommandImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLCommandImpl.java deleted file mode 100644 index ed055b69..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLCommandImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl;
-
-import javax.xml.bind.JAXBElement; - -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; -
-/**
- * This class serves as abstract base class for the implementation of a security
- * layer command.
- *
- * @author mcentner
- *
- * @param <T>
- * the type of the corresponding request value
- */
-public abstract class SLCommandImpl<T> implements SLCommand {
-
- /**
- * The <code>SLCommandContext</code> for this <code>SLCommand</code>.
- */
- protected SLCommandContext cmdCtx; - - /** - * The STAL helper. - */ - protected STALHelper stalHelper;
-
- /**
- * The request element of this command.
- */
- protected JAXBElement<T> request;
-
- @SuppressWarnings("unchecked")
- @Override
- public void init(SLCommandContext ctx, Object request)
- throws SLCommandException {
-
- this.request = (JAXBElement<T>) request;
-
- this.cmdCtx = ctx; - stalHelper = new STALHelper(cmdCtx.getSTAL());
-
- }
-
- /**
- * Returns the request value.
- *
- * It is a convenience method for <code>request.getValue()</code>.
- *
- * @see JAXBElement#getValue()
- * @return the request value
- */
- protected T getRequestValue() {
- return request.getValue();
- }
-
- /**
- * @return the corresponding <code>SLCommandContext</code>
- */
- protected SLCommandContext getCmdCtx() {
- return cmdCtx;
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLResultImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLResultImpl.java deleted file mode 100644 index 0077b7b2..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SLResultImpl.java +++ /dev/null @@ -1,297 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import java.io.UnsupportedEncodingException; -import java.math.BigInteger; -import java.util.Locale; - -import javax.xml.XMLConstants; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Result; -import javax.xml.transform.Templates; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.TransformerFactoryConfigurationError; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.sax.TransformerHandler; -import javax.xml.transform.stream.StreamResult; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.w3c.dom.Node; - -import at.buergerkarte.namespaces.securitylayer._1.ErrorResponseType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.gv.egiz.bku.slcommands.SLMarshallerFactory; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slexceptions.SLBindingException; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.slexceptions.SLVersionException; -import at.gv.egiz.bku.utils.DebugOutputStream; -import at.gv.egiz.bku.utils.DebugWriter; - -/** - * This class serves as an abstract base class for the implementation of a - * security layer result. - * - * @author mcentner - */ -public abstract class SLResultImpl implements SLResult { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(SLResult.class); - - /** - * The security layer result type (default = XML). - */ - protected SLResultType resultType = SLResultType.XML; - - /** - * The security layer result MIME-type (default = <code>text/xml</code>). - */ - protected String resultingMimeType = "text/xml"; - - /* (non-Javadoc) - * @see at.gv.egiz.bku.slcommands.SLResult#getResultType() - */ - public SLResultType getResultType() { - return resultType; - } - - /* (non-Javadoc) - * @see at.gv.egiz.bku.slcommands.SLResult#getMimeType() - */ - public String getMimeType() { - return resultingMimeType; - } - - @Override - public void writeTo(Result result, boolean fragment) { - writeTo(result, null, false); - } - - @Override - public abstract void writeTo(Result result, Templates templates, boolean fragment); - - private TransformerHandler getTransformerHandler(Templates templates, Result result) throws SLException { - try { - SAXTransformerFactory transformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); - transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); - TransformerHandler transformerHandler = transformerFactory.newTransformerHandler(templates); - transformerHandler.setResult(result); - return transformerHandler; - } catch (TransformerFactoryConfigurationError e) { - log.error("Failed to create an instance of SAXTransformerFactory.", e); - throw new SLBindingException(2000); - } catch (IllegalArgumentException e) { - log.error("Failed to set result for transformation.", e); - throw new SLBindingException(2000); - } catch (TransformerConfigurationException e) { - log.info("Failed to create an instance of SAXTransformerFactory.", e); - throw new SLBindingException(2008); - } - } - - /** - * Writes the given <code>response</code> to the SAX <code>result</code> using - * the given transform <code>templates</code>. - * - * @param response - * @param result - * @param templates - */ - protected void writeTo(JAXBElement<?> response, Result result, Templates templates, boolean fragment) { - - DebugWriter dw = null; - DebugOutputStream ds = null; - if (log.isTraceEnabled() && result instanceof StreamResult) { - StreamResult streamResult = (StreamResult) result; - if (streamResult.getOutputStream() != null) { - ds = new DebugOutputStream(streamResult.getOutputStream()); - streamResult.setOutputStream(ds); - } - if (streamResult.getWriter() != null) { - dw = new DebugWriter(streamResult.getWriter()); - streamResult.setWriter(dw); - } - } - - TransformerHandler transformerHandler = null; - if (templates != null) { - try { - transformerHandler = getTransformerHandler(templates, result); - } catch (SLException e) { - writeErrorTo(e, result, templates, fragment); - } - } - - Marshaller marshaller = SLMarshallerFactory.getInstance().createMarshaller(true); - try { - if (transformerHandler != null) { - marshaller.marshal(response, transformerHandler); - } else { - marshaller.marshal(response, result); - } - } catch (JAXBException e) { - log.info("Failed to marshall " + response.getName() + " result." , e); - SLCommandException commandException = new SLCommandException(4000); - writeErrorTo(commandException, result, templates, fragment); - } - - if (ds != null) { - try { - log.trace("Marshalled result:\n" + new String(ds.getBufferedBytes(), "UTF-8")); - } catch (UnsupportedEncodingException e) { - log.trace(e.getMessage()); - } - } - - if (dw != null) { - log.trace("Marshalled result:\n" + dw.getBufferedString()); - } - - } - - protected void writeTo(Node node, Result result, Templates templates, boolean fragment) { - - DebugWriter dw = null; - DebugOutputStream ds = null; - if (log.isTraceEnabled() && result instanceof StreamResult) { - StreamResult streamResult = (StreamResult) result; - if (streamResult.getOutputStream() != null) { - ds = new DebugOutputStream(streamResult.getOutputStream()); - streamResult.setOutputStream(ds); - } - if (streamResult.getWriter() != null) { - dw = new DebugWriter(streamResult.getWriter()); - streamResult.setWriter(dw); - } - } - - if (templates == null) { - try { - TransformerFactory transformerFactory = TransformerFactory.newInstance(); - Transformer transformer = transformerFactory.newTransformer(); - if (fragment) { - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - } - transformer.transform(new DOMSource(node), result); - } catch (TransformerConfigurationException e) { - log.error("Failed to create Transformer.", e); - writeErrorTo(new SLException(4000), result, null, fragment); - } catch (TransformerException e) { - log.error("Failed to transform result.", e); - writeErrorTo(new SLException(4000), result, null, fragment); - } - } else { - try { - Transformer transformer = templates.newTransformer(); - if (fragment) { - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - } - transformer.transform(new DOMSource(node), result); - } catch (TransformerConfigurationException e) { - log.info("Failed to create transformer.", e); - writeErrorTo(new SLException(2008), result, templates, fragment); - } catch (TransformerException e) { - log.error("Failed to transform result.", e); - writeErrorTo(new SLException(2008), result, templates, fragment); - } - } - - if (ds != null) { - try { - log.trace("Marshalled result:\n" + new String(ds.getBufferedBytes(), "UTF-8")); - } catch (UnsupportedEncodingException e) { - log.trace(e.getMessage()); - } - } - - if (dw != null) { - log.trace("Marshalled result:\n" + dw.getBufferedString()); - } - - } - - protected void writeErrorTo(SLException slException, Result result, Templates templates, boolean fragment) { - writeErrorTo(slException, result, templates, Locale.getDefault(), fragment); - } - - protected void writeErrorTo(SLException slException, Result result, Templates templates, Locale locale, boolean fragment) { - - TransformerHandler transformerHandler = null; - if (templates != null) { - try { - transformerHandler = getTransformerHandler(templates, result); - } catch (SLException e) { - // write the exception thrown instead of the given one - slException = e; - } - } - - Object response; - - Marshaller marshaller; - if (slException instanceof SLVersionException - && ("http://www.buergerkarte.at/namespaces/securitylayer/20020225#" - .equals(((SLVersionException) slException).getNamespaceURI()) || - "http://www.buergerkarte.at/namespaces/securitylayer/20020831#" - .equals(((SLVersionException) slException).getNamespaceURI()))) { - // issue ErrorResponse in the legacy namespace - at.buergerkarte.namespaces.securitylayer._20020225_.ObjectFactory factory - = new at.buergerkarte.namespaces.securitylayer._20020225_.ObjectFactory(); - at.buergerkarte.namespaces.securitylayer._20020225_.ErrorResponseType errorResponseType = factory - .createErrorResponseType(); - errorResponseType.setErrorCode(BigInteger.valueOf(slException - .getErrorCode())); - errorResponseType.setInfo(slException.getLocalizedMessage(locale)); - response = factory.createErrorResponse(errorResponseType); - marshaller = SLMarshallerFactory.getInstance().createLegacyMarshaller(true, fragment); - } else { - ObjectFactory factory = new ObjectFactory(); - ErrorResponseType responseType = factory.createErrorResponseType(); - responseType.setErrorCode(slException.getErrorCode()); - responseType.setInfo(slException.getLocalizedMessage(locale)); - response = factory.createErrorResponse(responseType); - marshaller = SLMarshallerFactory.getInstance().createMarshaller(true, fragment); - } - - try { - if (transformerHandler != null) { - marshaller.marshal(response, transformerHandler); - } else { - marshaller.marshal(response, result); - } - } catch (JAXBException e) { - log.fatal("Failed to marshall error result." , e); - throw new SLRuntimeException("Failed to marshall error result."); - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/STALHelper.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/STALHelper.java deleted file mode 100644 index e903c608..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/STALHelper.java +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import iaik.asn1.CodingException; -import iaik.asn1.DerCoder; -import iaik.utils.Base64OutputStream; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLExceptionMessages; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.idlink.ans1.IdentityLink; -import at.gv.egiz.stal.ErrorResponse; -import at.gv.egiz.stal.InfoboxReadResponse; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.STALRequest; -import at.gv.egiz.stal.STALResponse; - -/** - * A helper class for transmitting {@link STALRequest}s and obtaining their - * respective {@link STALResponse}s. - * - * @author mcentner - */ -public class STALHelper { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(STALHelper.class); - - /** - * The STAL implementation. - */ - private STAL stal; - - /** - * An iterator over the <code>STALResponse</code>s received in - * {@link SLCommandImpl#transmitSTALRequest(List)}. - */ - protected Iterator<STALResponse> stalResponses; - - /** - * Creates a new instance of this STALHelper with the given - * <code>stal</code>. - * - * @param stal the STAL to be used - */ - public STALHelper(STAL stal) { - if (stal == null) { - throw new NullPointerException("Argument 'stal' must not be null."); - } - this.stal = stal; - } - - /** - * Calls {@link STAL#handleRequest(List)} with the given - * <code>stalRequests</code>. - * - * @param stalRequests - * @throws SLCommandException - */ - public void transmitSTALRequest(List<? extends STALRequest> stalRequests) throws SLCommandException { - List<STALResponse> responses = stal.handleRequest(stalRequests); - if (responses == null) { - Log log = LogFactory.getLog(this.getClass()); - log.info("Received no responses from STAL."); - throw new SLCommandException(4000); - } else if (responses.size() != stalRequests.size()) { - Log log = LogFactory.getLog(this.getClass()); - log.info("Received invalid count of responses from STAL. Expected " - + stalRequests.size() + ", but got " + responses.size() + "."); - // throw new SLCommandException(4000); - } - stalResponses = responses.iterator(); - } - - /** - * @return <code>true</code> if there are more {@link STALResponse}s to be - * fetched with {@link #nextResponse(Class)}, or <code>false</code> - * otherwise. - */ - public boolean hasNextResponse() { - return (stalResponses != null) ? stalResponses.hasNext() : false; - } - - /** - * Returns the next response of type <code>responseClass</code> that has been - * received by {@link #transmitSTALRequest(List)}. - * - * @param responseClass - * the response must be an instance of - * @return the next response of type <code>responseClass</code> - * - * @throws NoSuchElementException - * if there is no more response - * @throws SLCommandException - * if the next response is of type {@link ErrorResponse} or not of - * type <code>responseClass</code> - */ - public STALResponse nextResponse( - Class<? extends STALResponse> responseClass) throws SLCommandException { - - if (stalResponses == null) { - throw new NoSuchElementException(); - } - - STALResponse response = stalResponses.next(); - - if (response instanceof ErrorResponse) { - throw new SLCommandException(((ErrorResponse) response).getErrorCode()); - } - - if (!(responseClass.isAssignableFrom(response.getClass()))) { - Log log = LogFactory.getLog(this.getClass()); - log.info("Received " + response.getClass() + " from STAL but expected " - + responseClass); - throw new SLCommandException(4000); - } - - return response; - - } - - /** - * Gets the list of certificates from the next STAL responses. - * - * @return the list of certificates - * - * @throws SLCommandException if getting the list of certificates fails - */ - public List<X509Certificate> getCertificatesFromResponses() throws SLCommandException { - - List<X509Certificate> certificates = new ArrayList<X509Certificate>(); - - CertificateFactory certFactory; - try { - certFactory = CertificateFactory.getInstance("X509"); - } catch (CertificateException e) { - // we should always be able to get an X509 certificate factory - log.error("CertificateFactory.getInstance(\"X509\") failed.", e); - throw new SLRuntimeException(e); - } - - InfoboxReadResponse response; - while(hasNextResponse()) { - response = (InfoboxReadResponse) nextResponse(InfoboxReadResponse.class); - byte[] cert = response.getInfoboxValue(); - try { - certificates.add((X509Certificate) certFactory.generateCertificate(new ByteArrayInputStream(cert))); - } catch (CertificateException e) { - if (log.isDebugEnabled()) { - ByteArrayOutputStream certDump = new ByteArrayOutputStream(); - OutputStreamWriter writer = new OutputStreamWriter(certDump); - try { - writer.write("-----BEGIN CERTIFICATE-----\n"); - writer.flush(); - Base64OutputStream b64os = new Base64OutputStream(certDump); - b64os.write(cert); - b64os.flush(); - writer.write("\n-----END CERTIFICATE-----"); - writer.flush(); - } catch (IOException e1) { - log.info("Failed to decode certificate.", e); - } - log.debug("Failed to decode certificate.\n" + certDump.toString(), e); - } else { - log.info("Failed to decode certificate.", e); - } - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_INFOBOX_INVALID, - new Object[] { "Certificates" }); - } - } - - return certificates; - - } - - /** - * Gets the IdentitiyLink form the next STAL response. - * - * @return the IdentityLink - * - * @throws SLCommandException if getting the IdentitiyLink fails - */ - public IdentityLink getIdentityLinkFromResponses() throws SLCommandException { - - // IdentityLink - InfoboxReadResponse response; - if (hasNextResponse()) { - response = (InfoboxReadResponse) nextResponse(InfoboxReadResponse.class); - byte[] idLink = response.getInfoboxValue(); - try { - return new IdentityLink(DerCoder.decode(idLink)); - } catch (CodingException e) { - log.info("Failed to decode infobox 'IdentityLink'.", e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_INFOBOX_INVALID, - new Object[] { "IdentityLink" }); - } - } else { - log.info("No infobox 'IdentityLink' returned from STAL."); - throw new SLCommandException(4000); - } - - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SVPersonendatenInfoboxImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SVPersonendatenInfoboxImpl.java deleted file mode 100644 index 7e204632..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/SVPersonendatenInfoboxImpl.java +++ /dev/null @@ -1,323 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import iaik.asn1.ASN; -import iaik.asn1.ASN1Object; -import iaik.asn1.CodingException; -import iaik.asn1.DerCoder; -import iaik.asn1.NumericString; -import iaik.asn1.OCTET_STRING; -import iaik.asn1.ObjectID; -import iaik.asn1.SEQUENCE; -import iaik.asn1.SET; -import iaik.asn1.UNKNOWN; -import iaik.asn1.structures.ChoiceOfTime; - -import java.io.IOException; -import java.math.BigInteger; -import java.nio.charset.Charset; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.TimeZone; - -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.XMLGregorianCalendar; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.buergerkarte.namespaces.cardchannel.AttributeList; -import at.buergerkarte.namespaces.cardchannel.AttributeType; -import at.buergerkarte.namespaces.cardchannel.ObjectFactory; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLExceptionMessages; -import at.gv.egiz.stal.InfoboxReadRequest; -import at.gv.egiz.stal.InfoboxReadResponse; -import at.gv.egiz.stal.STALRequest; - -/** - * An implementation of the {@link Infobox} <em>Certificates</em> as - * specified in Security Layer 1.2. - * - * @author mcentner - */ -public class SVPersonendatenInfoboxImpl extends AbstractAssocArrayInfobox { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(SVPersonendatenInfoboxImpl.class); - - public static final String EHIC = "EHIC"; - - public static final String GRUNDDATEN = "Grunddaten"; - - public static final String STATUS = "Status"; - - public static final String SV_PERSONENBINDUNG = "SV-Personenbindung"; - - /** - * The valid keys. - */ - public static final String[] KEYS = new String[] { - GRUNDDATEN, EHIC, STATUS, SV_PERSONENBINDUNG - }; - - @Override - public String getIdentifier() { - return "SV-Personendaten"; - } - - @Override - public String[] getKeys() { - return KEYS; - } - - @Override - public boolean isValuesAreXMLEntities() { - return true; - } - - @Override - public Map<String, Object> getValues(List<String> keys, SLCommandContext cmdCtx) throws SLCommandException { - - STALHelper stalHelper = new STALHelper(cmdCtx.getSTAL()); - - if (keys != null && !keys.isEmpty()) { - - List<STALRequest> stalRequests = new ArrayList<STALRequest>(); - - // get values - InfoboxReadRequest infoboxReadRequest; - for (int i = 0; i < keys.size(); i++) { - infoboxReadRequest = new InfoboxReadRequest(); - infoboxReadRequest.setInfoboxIdentifier(keys.get(i)); - stalRequests.add(infoboxReadRequest); - } - - stalHelper.transmitSTALRequest(stalRequests); - - Map<String, Object> values = new HashMap<String, Object>(); - - try { - for (int i = 0; i < keys.size(); i++) { - - String key = keys.get(i); - InfoboxReadResponse nextResponse = (InfoboxReadResponse) stalHelper.nextResponse(InfoboxReadResponse.class); - - - ObjectFactory objectFactory = new ObjectFactory(); - - if (EHIC.equals(key)) { - AttributeList attributeList = createAttributeList(nextResponse.getInfoboxValue()); - values.put(key, objectFactory.createEHIC(attributeList)); - } else if (GRUNDDATEN.equals(key)) { - AttributeList attributeList = createAttributeList(nextResponse.getInfoboxValue()); - values.put(key, objectFactory.createGrunddaten(attributeList)); - } else if (SV_PERSONENBINDUNG.equals(key)) { - values.put(key, objectFactory.createSVPersonenbindung(nextResponse.getInfoboxValue())); - } else if (STATUS.equals(key)) { - AttributeList attributeList = createAttributeListFromRecords(nextResponse.getInfoboxValue()); - values.put(key, objectFactory.createStatus(attributeList)); - } - - } - } catch (CodingException e) { - log.info("Failed to decode '" + getIdentifier() + "' infobox.", e); - throw new SLCommandException(4000, - SLExceptionMessages.EC4000_UNCLASSIFIED_INFOBOX_INVALID, - new Object[] { "IdentityLink" }); - - } - - return values; - - } else { - - return new HashMap<String, Object>(); - - } - - - } - - public static AttributeList createAttributeList(byte[] infoboxValue) throws CodingException { - - ObjectFactory objectFactory = new ObjectFactory(); - - ASN1Object asn1 = DerCoder.decode(infoboxValue); - - AttributeList attributeList = objectFactory.createAttributeList(); - List<AttributeType> attributes = attributeList.getAttribute(); - - if (asn1.isA(ASN.SEQUENCE)) { - for (int i = 0; i < ((SEQUENCE) asn1).countComponents(); i++) { - - AttributeType attributeType = objectFactory.createAttributeType(); - - if (asn1.getComponentAt(i).isA(ASN.SEQUENCE)) { - SEQUENCE attribute = (SEQUENCE) asn1.getComponentAt(i); - if (attribute.getComponentAt(0).isA(ASN.ObjectID)) { - ObjectID objectId = (ObjectID) attribute.getComponentAt(0); - attributeType.setOid("urn:oid:" + objectId.getID()); - } - if (attribute.getComponentAt(1).isA(ASN.SET)) { - SET values = (SET) attribute.getComponentAt(1); - for (int j = 0; j < values.countComponents(); j++) { - setAttributeValue(attributeType, values.getComponentAt(j)); - } - } - } - - attributes.add(attributeType); - - } - - } - - return attributeList; - - } - - public static AttributeList createAttributeListFromRecords(byte[] infoboxValue) throws CodingException { - - ObjectFactory objectFactory = new ObjectFactory(); - - AttributeList attributeList = objectFactory.createAttributeList(); - List<AttributeType> attributes = attributeList.getAttribute(); - - byte[] records = infoboxValue; - - while (records != null && records.length > 0) { - - int length; - - if (records[0] != 0x00) { - - ASN1Object asn1 = DerCoder.decode(records); - - AttributeType attributeType = objectFactory.createAttributeType(); - - if (asn1.isA(ASN.SEQUENCE)) { - SEQUENCE attribute = (SEQUENCE) asn1; - if (attribute.getComponentAt(0).isA(ASN.ObjectID)) { - ObjectID objectId = (ObjectID) attribute.getComponentAt(0); - attributeType.setOid("urn:oid:" + objectId.getID()); - } - if (attribute.getComponentAt(1).isA(ASN.SET)) { - SET values = (SET) attribute.getComponentAt(1); - for (int j = 0; j < values.countComponents(); j++) { - setAttributeValue(attributeType, values.getComponentAt(j)); - } - } - } - - attributes.add(attributeType); - - length = DerCoder.encode(asn1).length; - - } else { - length = 1; - } - - if (length < records.length) { - records = Arrays.copyOfRange(records, length + 1, records.length); - } else { - records = null; - } - - } - - return attributeList; - - } - - private static void setAttributeValue(AttributeType attributeType, ASN1Object value) { - - if (value.isA(ASN.OCTET_STRING)) { - - try { - byte[] octets = ((OCTET_STRING) value).getWholeValue(); - attributeType.setLatin1String(new String(octets, Charset.forName("ISO-8859-1"))); - } catch (IOException e) { - log.info("Failed to set Latin1String.", e); - } - - } else if (value.isA(ASN.NumericString)) { - - attributeType.setNumericString((String) ((NumericString) value).getValue()); - - } else if (value.isA(ASN.GeneralizedTime)) { - - try { - ChoiceOfTime choiceOfTime = new ChoiceOfTime(value); - - GregorianCalendar gregorianCalendar = new GregorianCalendar(); - gregorianCalendar.setTimeZone(TimeZone.getTimeZone("UTC")); - gregorianCalendar.setTime(choiceOfTime.getDate()); - - DatatypeFactory datatypeFactory = DatatypeFactory.newInstance(); - XMLGregorianCalendar xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(gregorianCalendar); - xmlGregorianCalendar.setTimezone(0); - - attributeType.setGeneralizedTime(xmlGregorianCalendar); - } catch (Exception e) { - log.info("Failed to set GeneralizedTime.", e); - } - - } else if (value.isA(ASN.INTEGER)) { - - attributeType.setInteger((BigInteger) value.getValue()); - - } else if (value.isA(ASN.UTF8String)) { - - attributeType.setUTF8String((String) value.getValue()); - - } else if (value.isA(ASN.PrintableString)) { - - attributeType.setPrintableString((String) value.getValue()); - - } else if (value.isA(ASN.UNKNOWN)) { - - byte[] bytes = (byte[]) ((UNKNOWN) value).getValue(); - - try { - BigInteger bigInteger = new BigInteger(bytes); - String string = bigInteger.toString(16); - - Date date = new SimpleDateFormat("yyyyMMdd").parse(string); - attributeType.setDate(new SimpleDateFormat("yyyy-MM-dd").format(date)); - } catch (Exception e) { - log.info("Failed to set Date.", e); - } - } - - } - - - - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactory.java deleted file mode 100644 index d6cbaefa..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactory.java +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import java.security.InvalidAlgorithmParameterException;
-import java.security.NoSuchAlgorithmException;
-
-import javax.xml.crypto.AlgorithmMethod;
-import javax.xml.crypto.dsig.CanonicalizationMethod;
-import javax.xml.crypto.dsig.DigestMethod;
-import javax.xml.crypto.dsig.SignatureMethod;
-
-/**
- * A factory for creating {@link AlgorithmMethod}s.
- *
- * @author mcentner
- */
-public interface AlgorithmMethodFactory {
-
- /**
- * Creates a new DigestMethod for the given <code>signatureContext</code>.
- *
- * @param signatureContext
- * the signature context
- *
- * @return a DigestMethod for the given <code>signatureContext</code>
- *
- * @throws NoSuchAlgorithmException
- * @throws InvalidAlgorithmParameterException
- */
- public DigestMethod createDigestMethod(SignatureContext signatureContext)
- throws NoSuchAlgorithmException, InvalidAlgorithmParameterException;
-
- /**
- * Creates a new SignatureMethod for the given <code>signatureContext</code>.
- *
- * @param signatureContext
- * the signature context
- *
- * @return a SignatureMethod for the given <code>signatureContext</code>
- *
- * @throws NoSuchAlgorithmException
- * @throws InvalidAlgorithmParameterException
- */
- public SignatureMethod createSignatureMethod(SignatureContext signatureContext)
- throws NoSuchAlgorithmException, InvalidAlgorithmParameterException;
-
- /**
- * Creates a new CanonicalizationMethod for the given
- * <code>signatureContext</code>.
- *
- * @param signatureContext
- * the signature context
- *
- * @return a CanonicalizationMethod for the given
- * <code>signatureContext</code>
- *
- * @throws NoSuchAlgorithmException
- * @throws InvalidAlgorithmParameterException
- */
- public CanonicalizationMethod createCanonicalizationMethod(
- SignatureContext signatureContext) throws NoSuchAlgorithmException,
- InvalidAlgorithmParameterException;
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactoryImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactoryImpl.java deleted file mode 100644 index 8391e450..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/AlgorithmMethodFactoryImpl.java +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import iaik.security.ecc.interfaces.ECDSAParams; -import iaik.xml.crypto.XmldsigMore; - -import java.security.InvalidAlgorithmParameterException; -import java.security.NoSuchAlgorithmException; -import java.security.PublicKey; -import java.security.cert.X509Certificate; -import java.security.interfaces.ECPublicKey; -import java.security.interfaces.RSAPublicKey; -import java.security.spec.ECParameterSpec; - -import javax.xml.crypto.dsig.CanonicalizationMethod; -import javax.xml.crypto.dsig.DigestMethod; -import javax.xml.crypto.dsig.SignatureMethod; -import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; -import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec; -import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec; -
-/**
- * An implementation of the AlgorithmMethod factory that uses the signing
- * certificate to choose appropriate algorithms.
- *
- * @author mcentner
- */
-public class AlgorithmMethodFactoryImpl implements AlgorithmMethodFactory {
- - /** - * Use SHA-2? - */ - private static boolean SHA2 = false; -
- /**
- * The signature algorithm URI.
- */
- private String signatureAlgorithmURI; - - /** - * the digest algorithm URI. - */ - private String digestAlgorithmURI = DigestMethod.SHA1;
-
- /**
- * The algorithm parameters for the signature algorithm.
- */
- private SignatureMethodParameterSpec signatureMethodParameterSpec;
-
- /**
- * Creates a new AlgrithmMethodFactory with the given
- * <code>signingCertificate</code>.
- *
- * @param signingCertificate
- *
- * @throws NoSuchAlgorithmException
- * if the public key algorithm of the given
- * <code>signingCertificate</code> is not supported
- */
- public AlgorithmMethodFactoryImpl(X509Certificate signingCertificate)
- throws NoSuchAlgorithmException {
- - PublicKey publicKey = signingCertificate.getPublicKey();
- String algorithm = publicKey.getAlgorithm(); -
- if ("DSA".equals(algorithm)) {
- signatureAlgorithmURI = SignatureMethod.DSA_SHA1;
- } else if ("RSA".equals(algorithm)) { - - int keyLength = 0; - if (publicKey instanceof RSAPublicKey) { - keyLength = ((RSAPublicKey) publicKey).getModulus().bitLength(); - } - - if (SHA2 && keyLength >= 2048) { - signatureAlgorithmURI = XmldsigMore.SIGNATURE_RSA_SHA256; - digestAlgorithmURI = DigestMethod.SHA256; - } else { - signatureAlgorithmURI = SignatureMethod.RSA_SHA1; - } -
- } else if (("EC".equals(algorithm)) || ("ECDSA".equals(algorithm))) { - - int fieldSize = 0; - if (publicKey instanceof iaik.security.ecc.ecdsa.ECPublicKey) { - ECDSAParams params = ((iaik.security.ecc.ecdsa.ECPublicKey) publicKey).getParameter(); - fieldSize = params.getG().getCurve().getField().getSize().bitLength(); - } else if (publicKey instanceof ECPublicKey) { - ECParameterSpec params = ((ECPublicKey) publicKey).getParams(); - fieldSize = params.getCurve().getField().getFieldSize(); - } - - if (SHA2 && fieldSize >= 512) { - signatureAlgorithmURI = XmldsigMore.SIGNATURE_ECDSA_SHA512; - digestAlgorithmURI = DigestMethod.SHA512; - } else if (SHA2 && fieldSize >= 256) { - signatureAlgorithmURI = XmldsigMore.SIGNATURE_ECDSA_SHA256; - digestAlgorithmURI = DigestMethod.SHA256; - } else { - signatureAlgorithmURI = XmldsigMore.SIGNATURE_ECDSA_SHA1; - } -
- } else {
- throw new NoSuchAlgorithmException("Public key algorithm '" + algorithm
- + "' not supported.");
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeat.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory#
- * createCanonicalizationMethod
- * (at.gv.egiz.bku.slcommands.impl.xsect.SignatureContext)
- */
- @Override
- public CanonicalizationMethod createCanonicalizationMethod(
- SignatureContext signatureContext) throws NoSuchAlgorithmException,
- InvalidAlgorithmParameterException {
-
- return signatureContext.getSignatureFactory().newCanonicalizationMethod(
- CanonicalizationMethod.EXCLUSIVE, (C14NMethodParameterSpec) null);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory#createDigestMethod
- * (at.gv.egiz.bku.slcommands.impl.xsect.SignatureContext)
- */
- @Override
- public DigestMethod createDigestMethod(SignatureContext signatureContext)
- throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
-
- return signatureContext.getSignatureFactory().newDigestMethod(
- digestAlgorithmURI, (DigestMethodParameterSpec) null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeat.gv.egiz.bku.slcommands.impl.xsect.AlgorithmMethodFactory#
- * createSignatureMethod
- * (at.gv.egiz.bku.slcommands.impl.xsect.SignatureContext)
- */
- @Override
- public SignatureMethod createSignatureMethod(SignatureContext signatureContext)
- throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
-
- return signatureContext.getSignatureFactory().newSignatureMethod(
- signatureAlgorithmURI, signatureMethodParameterSpec);
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/ByteArrayDereferencer.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/ByteArrayDereferencer.java deleted file mode 100644 index a6473a05..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/ByteArrayDereferencer.java +++ /dev/null @@ -1,65 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import java.io.ByteArrayInputStream;
-
-import javax.xml.crypto.Data;
-import javax.xml.crypto.OctetStreamData;
-import javax.xml.crypto.URIDereferencer;
-import javax.xml.crypto.URIReference;
-import javax.xml.crypto.URIReferenceException;
-import javax.xml.crypto.XMLCryptoContext;
-
-/**
- * An URIDereferencer implementation that dereferences the given
- * byte array.
- *
- * @author mcentner
- */
-public class ByteArrayDereferencer implements URIDereferencer {
-
- /**
- * The dereferenced data.
- */
- protected byte[] dereferencedData;
-
- /**
- * Creates a new instance of this ByteArrayDereferencer with
- * the given <code>dereferencedData</code>.
- *
- * @param dereferencedData the octets to be returned by {@link #dereference(URIReference, XMLCryptoContext)}
- *
- * @throws NullPointerException if <code>dereferencedData</code> is <code>null</code>
- */
- public ByteArrayDereferencer(byte[] dereferencedData) {
- if (dereferencedData == null) {
- throw new NullPointerException("Parameter 'dereferencedData' must not be null.");
- }
- this.dereferencedData = dereferencedData;
- }
-
- /* (non-Javadoc)
- * @see javax.xml.crypto.URIDereferencer#dereference(javax.xml.crypto.URIReference, javax.xml.crypto.XMLCryptoContext)
- */
- @Override
- public Data dereference(URIReference uriReference, XMLCryptoContext context)
- throws URIReferenceException {
- return new OctetStreamData(new ByteArrayInputStream(dereferencedData));
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/DataObject.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/DataObject.java deleted file mode 100644 index a57a11dd..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/DataObject.java +++ /dev/null @@ -1,1289 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect; - -import iaik.xml.crypto.dom.DOMCryptoContext; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.SequenceInputStream; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.net.URISyntaxException; -import java.nio.charset.Charset; -import java.security.InvalidAlgorithmParameterException; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.crypto.MarshalException; -import javax.xml.crypto.dom.DOMStructure; -import javax.xml.crypto.dsig.CanonicalizationMethod; -import javax.xml.crypto.dsig.DigestMethod; -import javax.xml.crypto.dsig.Reference; -import javax.xml.crypto.dsig.Transform; -import javax.xml.crypto.dsig.XMLObject; -import javax.xml.crypto.dsig.spec.TransformParameterSpec; -import javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec; -import javax.xml.crypto.dsig.spec.XPathType; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.w3c.dom.DOMConfiguration; -import org.w3c.dom.DOMException; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentFragment; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.Text; -import org.w3c.dom.bootstrap.DOMImplementationRegistry; -import org.w3c.dom.ls.DOMImplementationLS; -import org.w3c.dom.ls.LSException; -import org.w3c.dom.ls.LSInput; -import org.w3c.dom.ls.LSOutput; -import org.w3c.dom.ls.LSParser; -import org.w3c.dom.ls.LSSerializer; - -import at.buergerkarte.namespaces.securitylayer._1.Base64XMLLocRefOptRefContentType; -import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; -import at.buergerkarte.namespaces.securitylayer._1.MetaInfoType; -import at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType; -import at.gv.egiz.bku.binding.HttpUtil; -import at.gv.egiz.bku.gui.viewer.MimeTypes; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.slexceptions.SLViewerException; -import at.gv.egiz.bku.utils.urldereferencer.StreamData; -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; -import at.gv.egiz.bku.viewer.ValidationException; -import at.gv.egiz.bku.viewer.Validator; -import at.gv.egiz.bku.viewer.ValidatorFactory; -import at.gv.egiz.dom.DOMUtils; -import at.gv.egiz.slbinding.impl.XMLContentType; -import java.io.File; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URL; - -/** - * This class represents a <code>DataObject</code> of an XML-Signature - * created by the security layer command <code>CreateXMLSignature</code>. - * - * @author mcentner - */ -public class DataObject { - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(DataObject.class); - - /** - * DOM Implementation. - */ - private static final String DOM_LS_3_0 = "LS 3.0"; - - /** - * The array of the default preferred MIME type order. - */ - private static final String[] DEFAULT_PREFFERED_MIME_TYPES = - new String[] { - "text/plain", - "application/xhtml+xml" - }; - - /** - * Validate hash input. - */ - private static boolean validate = false; - - /** - * Enable validation of hash data input. - * - * @param validate - * <code>true</code> if validation should be enabled, or - * <code>false</code> otherwise. - */ - public static void enableHashDataInputValidation(boolean validate) { - DataObject.validate = validate; - } - - /** - * @return <code>true</code> if hash data input validation is enabled, - * or <code>false</code> otherwise. - */ - public static boolean isHashDataInputValidationEnabled() { - return validate; - } - - /** - * Valid MIME types. - */ - private static String[] validMimeTypes = DEFAULT_PREFFERED_MIME_TYPES; - - /** - * Sets the list of valid hash data input media types. - * <p>The array is also used for transformation path selection. - * The transformation path with a final type, that appears in the - * given array in the earliest position is used selected.</p> - * - * @param mediaTypes an array of MIME media types. - */ - public static void setValidHashDataInputMediaTypes(String[] mediaTypes) { - validMimeTypes = mediaTypes; - } - - /** - * The DOM implementation used. - */ - private DOMImplementationLS domImplLS; - - /** - * The signature context. - */ - private SignatureContext ctx; - - /** - * The Reference for this DataObject. - */ - private XSECTReference reference; - - /** - * The XMLObject for this DataObject. - */ - private XMLObject xmlObject; - - /** - * The MIME-Type of the digest input. - */ - private String mimeType; - - /** - * An optional description of the digest input. - */ - private String description; - - private String filename; - - /** - * Creates a new instance. - * - * @param document the document of the target signature - */ - public DataObject(SignatureContext signatureContext) { - this.ctx = signatureContext; - - DOMImplementationRegistry registry; - try { - registry = DOMImplementationRegistry.newInstance(); - } catch (Exception e) { - log.error("Failed to get DOMImplementationRegistry.", e); - throw new SLRuntimeException("Failed to get DOMImplementationRegistry."); - } - - domImplLS = (DOMImplementationLS) registry.getDOMImplementation(DOM_LS_3_0); - if (domImplLS == null) { - log.error("Failed to get DOMImplementation " + DOM_LS_3_0); - throw new SLRuntimeException("Failed to get DOMImplementation " + DOM_LS_3_0); - } - - } - - /** - * @return the reference - */ - public Reference getReference() { - return reference; - } - - /** - * @return the xmlObject - */ - public XMLObject getXmlObject() { - return xmlObject; - } - - /** - * @return the mimeType - */ - public String getMimeType() { - return mimeType; - } - - public String getFilename() { - return filename; - } - - /** - * @return the description - */ - public String getDescription() { - return description; - } - - public void validateHashDataInput() throws SLViewerException { - - if (validate) { - - if (reference == null) { - log.error("Medthod validateHashDataInput() called before reference has been created."); - throw new SLViewerException(5000); - } - - InputStream digestInputStream = reference.getDigestInputStream(); - if (digestInputStream == null) { - log.error("Method validateHashDataInput() called before reference has been generated " + - "or reference caching is not enabled."); - throw new SLViewerException(5000); - } - - if (mimeType == null) { - log.info("FinalDataMetaInfo does not specify MIME type of to be signed data."); - // TODO: add detailed message - throw new SLViewerException(5000); - } - - // get MIME media type - String mediaType = mimeType.split(";")[0].trim(); - // and optional charset - String charset = HttpUtil.getCharset(mimeType, false); - - if (Arrays.asList(validMimeTypes).contains(mediaType)) { - - Validator validator; - try { - validator = ValidatorFactory.newValidator(mediaType); - } catch (IllegalArgumentException e) { - log.error("No validator found for mime type '" + mediaType + "'."); - throw new SLViewerException(5000); - } - - try { - validator.validate(digestInputStream, charset); - } catch (ValidationException e) { - if ("text/plain".equals(mediaType)) { - log.info("Data to be displayed contains unsupported characters.", e); - // TODO: add detailed message - throw new SLViewerException(5003); - } else if ("application/xhtml+xml".equals(mediaType)) { - // TODO: add detailed message - log.info("Standard display format: HTML does not conform to specification.", e); - throw new SLViewerException(5004); - } else { - // TODO: add detailed message - log.info("Data to be displayed is invalid.", e); - throw new SLViewerException(5000); - } - } - - } else { - log.debug("MIME media type '" + mediaType + "' is not a s/valid/SUPPORTED digest input, omitting validation."); - } - } - - } - - /** - * Configures this DataObject with the information provided within the given - * <code>sl:DataObjectInfo</code>. - * - * @param dataObjectInfo - * the <code>sl:DataObjectInfo</code> - * - * @throws SLCommandException - * if configuring this DataObject with the information provided in - * the <code>sl:DataObjectInfo</code> fails. - * @throws SLRequestException - * if the information provided in the <code>sl:DataObjectInfo</code> - * does not conform to the security layer specification. - * @throws NullPointerException - * if <code>dataObjectInfo</code> is <code>null</code> - */ - public void setDataObjectInfo(DataObjectInfoType dataObjectInfo) throws SLCommandException, SLRequestException { - - Base64XMLLocRefOptRefContentType dataObject = dataObjectInfo.getDataObject(); - String structure = dataObjectInfo.getStructure(); - - // select and unmarshal an appropriate transformation path if provided - // and set the final data meta information - XSECTTransforms transforms = createTransformsAndSetFinalDataMetaInfo(dataObjectInfo.getTransformsInfo()); - - if ("enveloping".equals(structure)) { - - // configure this DataObject as an enveloped DataObject - setEnvelopedDataObject(dataObject, transforms); - - } else if ("detached".equals(structure)) { - - // configure this DataObject as an detached DataObject - setDetachedDataObject(dataObject, transforms); - - } - // other values are not allowed by the schema and are therefore ignored - - this.filename = deriveFilename(); - } - - /** - * Extract filename from reference URI - * or propose reference Id with an apropriate (mime-type) file extension - * - * @return if neither reference nor id can be extracted return null (or data.extension?) - */ - private String deriveFilename() { - - String filename = null; - - if (reference != null) { - if (reference.getURI() != null && !"".equals(reference.getURI())) { - try { - log.info("deriving filename from reference URI " + reference.getURI()); - URI refURI = new URI(reference.getURI()); - - if (refURI.isOpaque()) { - // could check scheme component, but also allow other schemes (e.g. testlocal) - log.trace("opaque reference URI, use scheme-specific part as filename"); - filename = refURI.getSchemeSpecificPart(); - if (!hasExtension(filename)) { - filename += MimeTypes.getExtension(mimeType); - } - // else hierarchical URI: - // for shorthand xpointer use fragment as filename, - // for any other xpointer use reference Id and - // for any other hierarchical (absolute or relative) use filename (ignore fragment, see xmldsig section 4.3.3.2: fragments not recommendet) - } else if ("".equals(refURI.getPath()) && - refURI.getFragment() != null && - refURI.getFragment().indexOf('(') < 0) { // exclude (schemebased) xpointer expressions - log.trace("fragment (shorthand xpointer) URI, use fragment as filename"); - filename = refURI.getFragment(); - if(!hasExtension(filename)) { - filename += MimeTypes.getExtension(mimeType); - } - } else if (!"".equals(refURI.getPath())) { - log.trace("hierarchical URI with path component, use path as filename"); - File refFile = new File(refURI.getPath()); - filename = refFile.getName(); - if(!hasExtension(filename)) { - filename += MimeTypes.getExtension(mimeType); - } - } else { - log.debug("failed to derive filename from URI '" + refURI + "', derive filename from reference ID"); - filename = reference.getId() + MimeTypes.getExtension(mimeType); - } - } catch (URISyntaxException ex) { - log.error("failed to derive filename from invalid URI " + ex.getMessage()); - filename = reference.getId() + MimeTypes.getExtension(mimeType); - } - } else { - log.debug("same-document URI, derive filename from reference ID"); - filename = reference.getId() + MimeTypes.getExtension(mimeType); - } - } else { - log.error("failed to derive filename, no reference created"); - } - log.debug("derived filename for reference " + reference.getId() + ": " + filename); - return filename; - } - - private static boolean hasExtension(String filename) { - int extDelimiterInd = filename.lastIndexOf('.'); - return extDelimiterInd >= 0 && extDelimiterInd >= filename.length() - 4; - } - - private byte[] getTransformsBytes(at.gv.egiz.slbinding.impl.TransformsInfoType ti) { - return ti.getRedirectedStream().toByteArray(); -// byte[] transformsBytes = ti.getRedirectedStream().toByteArray(); -// -// if (transformsBytes == null || transformsBytes.length == 0) { -// return null; -// } -// -// String dsigPrefix = ti.getNamespaceContext().getNamespaceURI("http://www.w3.org/2000/09/xmldsig#"); -// byte[] pre, post; -// if (dsigPrefix == null) { -// log.trace("XMLDSig not declared in outside dsig:Transforms"); -// pre = "<AssureDSigNS>".getBytes(); -// post = "</AssureDSigNS>".getBytes(); -// } else { -// log.trace("XMLDSig bound to prefix " + dsigPrefix); -// pre = ("<AssureDSigNS xmlns:" + dsigPrefix + "=\"http://www.w3.org/2000/09/xmldsig#\">").getBytes(); -// post = "</AssureDSigNS>".getBytes(); -// } -// -// byte[] workaround = new byte[pre.length + transformsBytes.length + post.length]; -// System.arraycopy(pre, 0, workaround, 0, pre.length); -// System.arraycopy(transformsBytes, 0, workaround, pre.length, transformsBytes.length); -// System.arraycopy(post, 0, workaround, pre.length + transformsBytes.length, post.length); -// return workaround; - } - - /** - * Configures this DataObject as an enveloped DataObject with the information - * provided within the given <code>sl:DataObject</code>. - * - * @param dataObject - * the <code>sl:DataObject</code> - * @param transforms - * an optional <code>Transforms</code> element (may be - * <code>null</code>) - * - * @throws SLCommandException - * if configuring this DataObject with the information provided in - * the <code>sl:DataObject</code> fails. - * @throws SLRequestException - * if the information provided in the <code>sl:DataObject</code> - * does not conform to the security layer specification. - * @throws NullPointerException - * if <code>dataObject</code> is <code>null</code> - */ - private void setEnvelopedDataObject( - Base64XMLLocRefOptRefContentType dataObject, XSECTTransforms transforms) - throws SLCommandException, SLRequestException { - - String reference = dataObject.getReference(); - if (reference == null) { - // - // case A - // - // The Reference attribute is not used; the content of sl:DataObject represents the data object. - // If the data object is XML-coded (the sl:XMLContent element is used in sl:DataObject), then it - // must be incorporated in the signature structure as parsed XML. - // - - if (dataObject.getBase64Content() != null) { - - log.debug("Adding DataObject (Base64Content) without a reference URI."); - - // create XMLObject - XMLObject xmlObject = createXMLObject(new ByteArrayInputStream(dataObject.getBase64Content())); - - setXMLObjectAndReferenceBase64(xmlObject, transforms); - - } else if (dataObject.getXMLContent() != null) { - - log.debug("Adding DataObject (XMLContent) without a reference URI."); - - // create XMLObject - DocumentFragment content = parseDataObject((XMLContentType) dataObject.getXMLContent()); - XMLObject xmlObject = createXMLObject(content); - - setXMLObjectAndReferenceXML(xmlObject, transforms); - - } else if (dataObject.getLocRefContent() != null) { - - log.debug("Adding DataObject (LocRefContent) without a reference URI."); - - setEnvelopedDataObject(dataObject.getLocRefContent(), transforms); - - } else { - - // not allowed - log.info("XML structure of the command request contains an " + - "invalid combination of optional elements or attributes. " + - "DataObject of structure='enveloped' without a reference must contain content."); - throw new SLRequestException(3003); - - } - - } else { - - if (dataObject.getBase64Content() == null && - dataObject.getXMLContent() == null && - dataObject.getLocRefContent() == null) { - - // - // case B - // - // The Reference attribute contains a URI that must be resolved by the - // Citizen Card Environment to obtain the data object. - // The content of sl:DataObject remains empty - // - - log.debug("Adding DataObject from reference URI '" + reference + "'."); - - setEnvelopedDataObject(reference, transforms); - - } else { - - // not allowed - log.info("XML structure of the command request contains an " + - "invalid combination of optional elements or attributes. " + - "DataObject of structure='enveloped' with reference must not contain content."); - throw new SLRequestException(3003); - - } - - - } - - } - - /** - * Configures this DataObject as an enveloped DataObject with the content to - * be dereferenced from the given <code>reference</code>. - * - * @param reference - * the <code>reference</code> URI - * @param transforms - * an optional <code>Transforms</code> element (may be - * <code>null</code>) - * - * @throws SLCommandException - * if dereferencing the given <code>reference</code> fails, or if - * configuring this DataObject with the data dereferenced from the - * given <code>reference</code> fails. - * @throws NullPointerException - * if <code>reference</code> is <code>null</code> - */ - private void setEnvelopedDataObject(String reference, XSECTTransforms transforms) throws SLCommandException { - - if (reference == null) { - throw new NullPointerException("Argument 'reference' must not be null."); - } - - // dereference URL - URLDereferencer dereferencer = URLDereferencer.getInstance(); - - StreamData streamData; - try { - streamData = dereferencer.dereference(reference, ctx.getDereferencerContext()); - } catch (IOException e) { - log.info("Failed to dereference XMLObject from '" + reference + "'.", e); - throw new SLCommandException(4110); - } - - Node childNode; - - String contentType = streamData.getContentType(); - if (contentType.startsWith("text/xml")) { - - // If content type is text/xml parse content. - String charset = HttpUtil.getCharset(contentType, true); - - Document doc = parseDataObject(streamData.getStream(), charset); - - childNode = doc.getDocumentElement(); - - if (childNode == null) { - log.info("Failed to parse XMLObject from '" + reference + "'."); - throw new SLCommandException(4111); - } - - XMLObject xmlObject = createXMLObject(childNode); - - setXMLObjectAndReferenceXML(xmlObject, transforms); - - } else { - - // Include content Base64 encoded. - XMLObject xmlObject = createXMLObject(streamData.getStream()); - - setXMLObjectAndReferenceBase64(xmlObject, transforms); - - } - - } - - /** - * Configures this DataObject as an detached DataObject with the information - * provided in the given <code>sl:DataObject</code> and optionally - * <code>transforms</code>. - * - * @param dataObject - * the <code>sl:DataObject</code> - * @param transforms - * an optional Transforms object, may be <code>null</code> - * - * @throws SLCommandException - * if configuring this DataObject with the information provided in - * the <code>sl:DataObject</code> fails. - * @throws SLRequestException - * if the information provided in the <code>sl:DataObject</code> - * does not conform to the security layer specification. - * @throws NullPointerException - * if <code>dataObject</code> is <code>null</code> - */ - private void setDetachedDataObject( - Base64XMLLocRefOptRefContentType dataObject, XSECTTransforms transforms) - throws SLCommandException, SLRequestException { - - String referenceURI = dataObject.getReference(); - - if (referenceURI == null) { - - // not allowed - log.info("XML structure of the command request contains an " + - "invalid combination of optional elements or attributes. " + - "DataObject of structure='detached' must contain a reference."); - throw new SLRequestException(3003); - - } else { - - DigestMethod dm; - try { - dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); - } catch (NoSuchAlgorithmException e) { - log.error("Failed to get DigestMethod.", e); - throw new SLCommandException(4006); - } catch (InvalidAlgorithmParameterException e) { - log.error("Failed to get DigestMethod.", e); - throw new SLCommandException(4006); - } - - String idValue = ctx.getIdValueFactory().createIdValue("Reference"); - - reference = new XSECTReference(referenceURI, dm, transforms, null, idValue); - - // case D: - // - // The Reference attribute contains a URI that is used by the Citizen Card - // Environment to code the reference to the data object as part of the XML - // signature (attribute URI in the dsig:Reference) element. The content of - // sl:DataObject represents the data object. - - if (dataObject.getLocRefContent() != null) { - String locRef = dataObject.getLocRefContent(); - try { - this.reference.setDereferencer(new LocRefDereferencer(ctx.getDereferencerContext(), locRef)); - } catch (URISyntaxException e) { - log.info("Invalid URI '" + locRef + "' in DataObject.", e); - throw new SLCommandException(4003); - } catch (IllegalArgumentException e) { - log.info("LocRef URI of '" + locRef + "' not supported in DataObject. ", e); - throw new SLCommandException(4003); - } - } else if (dataObject.getBase64Content() != null) { - byte[] base64Content = dataObject.getBase64Content(); - this.reference.setDereferencer(new ByteArrayDereferencer(base64Content)); - } else if (dataObject.getXMLContent() != null) { - XMLContentType xmlContent = (XMLContentType) dataObject.getXMLContent(); - byte[] bytes = xmlContent.getRedirectedStream().toByteArray(); - this.reference.setDereferencer(new ByteArrayDereferencer(bytes)); - } else { - - // case C: - // - // The Reference attribute contains a URI that must be resolved by the - // Citizen Card Environment to obtain the data object. The Reference - // attribute contains a URI that is used by the Citizen Card Environment - // to code the reference to the data object as part of the XML signature - // (attribute URI in the dsig:Reference) element. The content of - // sl:DataObject remains empty. - - } - - } - } - - /** - * Returns the preferred <code>sl:TransformInfo</code> from the given list of - * <code>transformInfos</code>, or <code>null</code> if none of the given - * <code>transformInfos</code> is preferred over the others. - * - * @param transformsInfos - * a list of <code>sl:TransformInfo</code>s - * - * @return the selected <code>sl:TransformInfo</code> or <code>null</code>, if - * none is preferred over the others - */ - private TransformsInfoType selectPreferredTransformsInfo(List<TransformsInfoType> transformsInfos) { - - Map<String, TransformsInfoType> mimeTypes = new HashMap<String, TransformsInfoType>(); - - StringBuilder debugString = null; - if (log.isDebugEnabled()) { - debugString = new StringBuilder(); - debugString.append("Got " + transformsInfos.size() + " TransformsInfo(s):"); - } - - for (TransformsInfoType transformsInfoType : transformsInfos) { - MetaInfoType finalDataMetaInfo = transformsInfoType.getFinalDataMetaInfo(); - String mimeType = finalDataMetaInfo.getMimeType(); - String description = finalDataMetaInfo.getDescription(); - mimeTypes.put(mimeType, transformsInfoType); - if (debugString != null) { - debugString.append("\n FinalDataMetaInfo: MIME-Type="); - debugString.append(mimeType); - if (description != null) { - debugString.append(" "); - debugString.append(description); - } - } - } - - if (debugString != null) { - log.debug(debugString); - } - - // look for preferred transform - for (String mimeType : DEFAULT_PREFFERED_MIME_TYPES) { - if (mimeTypes.containsKey(mimeType)) { - return mimeTypes.get(mimeType); - } - } - - // no preferred transform - return null; - - } - - /** - * Create an instance of <code>ds:Transforms</code> from the given - * <code>sl:TransformsInfo</code>. - * - * @param transformsInfo - * the <code>sl:TransformsInfo</code> - * - * @return a corresponding unmarshalled <code>ds:Transforms</code>, or - * <code>null</code> if the given <code>sl:TransformsInfo</code> does - * not contain a <code>dsig:Transforms</code> element - * - * @throws SLRequestException - * if the <code>ds:Transforms</code> in the given - * <code>transformsInfo</code> are not valid or cannot be parsed. - * - * @throws MarshalException - * if the <code>ds:Transforms</code> in the given - * <code>transformsInfo</code> cannot be unmarshalled. - */ - private XSECTTransforms createTransforms(TransformsInfoType transformsInfo) throws SLRequestException, MarshalException { - - byte[] transforms = getTransformsBytes((at.gv.egiz.slbinding.impl.TransformsInfoType) transformsInfo); - - if (transforms != null && transforms.length > 0) { - // debug - if (log.isTraceEnabled()) { - StringBuilder sb = new StringBuilder(); - sb.append("Trying to parse transforms:\n"); - sb.append(new String(transforms, Charset.forName("UTF-8"))); - log.trace(sb); - } - - DOMImplementationLS domImplLS = DOMUtils.getDOMImplementationLS(); - LSInput input = domImplLS.createLSInput(); - input.setByteStream(new ByteArrayInputStream(transforms)); - - LSParser parser = domImplLS.createLSParser( - DOMImplementationLS.MODE_SYNCHRONOUS, null); - DOMConfiguration domConfig = parser.getDomConfig(); - SimpleDOMErrorHandler errorHandler = new SimpleDOMErrorHandler(); - domConfig.setParameter("error-handler", errorHandler); - domConfig.setParameter("validate", Boolean.FALSE); - - Document document; - try { - document = parser.parse(input); - } catch (DOMException e) { - log.info("Failed to parse dsig:Transforms.", e); - throw new SLRequestException(3002); - } catch (LSException e) { - log.info("Failed to parse dsig:Transforms.", e); - throw new SLRequestException(3002); - } - - // adopt ds:Transforms - Element transformsElt = document.getDocumentElement(); - Node adoptedTransforms = ctx.getDocument().adoptNode(transformsElt); - - DOMCryptoContext context = new DOMCryptoContext(); - - // unmarshall ds:Transforms - return new XSECTTransforms(context, adoptedTransforms); - - } else { - return null; - } - - -// TransformsType transformsType = transformsInfo.getTransforms(); -// if (transformsType == null) { -// return null; -// } -// List<TransformType> transformList = transformsType.getTransform(); -// -// DOMImplementationLS domImplLS = DOMUtils.getDOMImplementationLS(); -//// Document transformsDoc = ((DOMImplementation) domImplLS).createDocument("http://www.w3.org/2000/09/xmldsig#", "Transforms", null); -//// Element transforms = transformsDoc.getDocumentElement(); -// Document transformsDoc = DOMUtils.createDocument(); -// Element transforms = transformsDoc.createElementNS( -// "http://www.w3.org/2000/09/xmldsig#", -// Signature.XMLDSIG_PREFIX + ":Transforms"); -// transformsDoc.appendChild(transforms); -// -// for (TransformType transformType : transformList) { -// log.trace("found " + transformType.getClass().getName()); -// Element transform = transformsDoc.createElementNS( -// "http://www.w3.org/2000/09/xmldsig#", -// Signature.XMLDSIG_PREFIX + ":Transform"); -// String algorithm = transformType.getAlgorithm(); -// if (algorithm != null) { -// log.trace("found algorithm " + algorithm); -// transform.setAttribute("Algorithm", algorithm); -// } -// -// at.gv.egiz.slbinding.impl.TransformType t = (at.gv.egiz.slbinding.impl.TransformType) transformType; -// byte[] redirectedBytes = t.getRedirectedStream().toByteArray(); -// if (redirectedBytes != null && redirectedBytes.length > 0) { -// if (log.isTraceEnabled()) { -// StringBuilder sb = new StringBuilder(); -// sb.append("Trying to parse dsig:Transform:\n"); -// sb.append(new String(redirectedBytes, Charset.forName("UTF-8"))); -// log.trace(sb); -// } -// LSInput input = domImplLS.createLSInput(); -// input.setByteStream(new ByteArrayInputStream(redirectedBytes)); -// -// LSParser parser = domImplLS.createLSParser( -// DOMImplementationLS.MODE_SYNCHRONOUS, null); -// DOMConfiguration domConfig = parser.getDomConfig(); -// SimpleDOMErrorHandler errorHandler = new SimpleDOMErrorHandler(); -// domConfig.setParameter("error-handler", errorHandler); -// domConfig.setParameter("validate", Boolean.FALSE); -// -// try { -// Document redirectedDoc = parser.parse(input); -// Node redirected = transformsDoc.adoptNode(redirectedDoc.getDocumentElement()); -// transform.appendChild(redirected); -// -// //not supported by Xerces2.9.1 -//// Node redirected = parser.parseWithContext(input, transform, LSParser.ACTION_APPEND_AS_CHILDREN); -// -// } catch (DOMException e) { -// log.info("Failed to parse dsig:Transform.", e); -// throw new SLRequestException(3002); -// } catch (LSException e) { -// log.info("Failed to parse dsig:Transform.", e); -// throw new SLRequestException(3002); -// } -// } -// transforms.appendChild(transform); -// } -// -// //adopt ds:Transforms -// Node adoptedTransforms = ctx.getDocument().adoptNode(transforms); -// DOMCryptoContext context = new DOMCryptoContext(); -// -// // unmarshall ds:Transforms -// return new XSECTTransforms(context, adoptedTransforms); - - } - - /** - * Sets the <code>mimeType</code> and the <code>description</code> value - * for this DataObject. - * - * @param metaInfoType the <code>sl:FinalMetaDataInfo</code> - * - * @throws NullPointerException if <code>metaInfoType</code> is <code>null</code> - */ - private void setFinalDataMetaInfo(MetaInfoType metaInfoType) { - - this.mimeType = metaInfoType.getMimeType(); - this.description = metaInfoType.getDescription(); - - } - - /** - * Selects an appropriate transformation path (if present) from the given list - * of <code>sl:TransformInfos</code>, sets the corresponding final data meta info and - * returns the corresponding unmarshalled <code>ds:Transforms</code>. - * - * @param transformsInfos the <code>sl:TransformInfos</code> - * - * @return the unmarshalled <code>ds:Transforms</code>, or <code>null</code> if - * no transformation path has been selected. - * - * @throws SLRequestException if the given list <code>ds:TransformsInfo</code> contains - * an invalid <code>ds:Transforms</code> element, or no suitable transformation path - * can be found. - */ - private XSECTTransforms createTransformsAndSetFinalDataMetaInfo( - List<TransformsInfoType> transformsInfos) throws SLRequestException { - - TransformsInfoType preferredTransformsInfo = selectPreferredTransformsInfo(transformsInfos); - // try preferred transform - if (preferredTransformsInfo != null) { - - try { - XSECTTransforms transforms = createTransforms(preferredTransformsInfo); - setFinalDataMetaInfo(preferredTransformsInfo.getFinalDataMetaInfo()); - return transforms; - } catch (MarshalException e) { - - String mimeType = preferredTransformsInfo.getFinalDataMetaInfo().getMimeType(); - log.info("Failed to unmarshal preferred transformation path (MIME-Type=" - + mimeType + ").", e); - - } - - } - - // look for another suitable transformation path - for (TransformsInfoType transformsInfoType : transformsInfos) { - - try { - XSECTTransforms transforms = createTransforms(transformsInfoType); - setFinalDataMetaInfo(transformsInfoType.getFinalDataMetaInfo()); - return transforms; - } catch (MarshalException e) { - - String mimeType = transformsInfoType.getFinalDataMetaInfo().getMimeType(); - log.info("Failed to unmarshal transformation path (MIME-Type=" - + mimeType + ").", e); - } - - } - - // no suitable transformation path found - throw new SLRequestException(3003); - - } - - /** - * Create an XMLObject with the Base64 encoding of the given - * <code>content</code>. - * - * @param content - * the to-be Base64 encoded content - * @return an XMLObject with the Base64 encoded <code>content</code> - */ - private XMLObject createXMLObject(InputStream content) { - - Text textNode; - try { - textNode = at.gv.egiz.dom.DOMUtils.createBase64Text(content, ctx.getDocument()); - } catch (IOException e) { - log.error(e); - throw new SLRuntimeException(e); - } - - DOMStructure structure = new DOMStructure(textNode); - - String idValue = ctx.getIdValueFactory().createIdValue("Object"); - - return ctx.getSignatureFactory().newXMLObject(Collections.singletonList(structure), idValue, null, null); - - } - - /** - * Create an XMLObject with the given <code>content</code> node. - * - * @param content the content node - * - * @return an XMLObject with the given <code>content</code> - */ - private XMLObject createXMLObject(Node content) { - - String idValue = ctx.getIdValueFactory().createIdValue("Object"); - - List<DOMStructure> structures = Collections.singletonList(new DOMStructure(content)); - - return ctx.getSignatureFactory().newXMLObject(structures, idValue, null, null); - - } - - /** - * Sets the given <code>xmlObject</code> and creates and sets a corresponding - * <code>Reference</code>. - * <p> - * A transform to Base64-decode the xmlObject's content is inserted at the top - * of to the optional <code>transforms</code> if given, or to a newly created - * <code>Transforms</code> element if <code>transforms</code> is - * <code>null</code>. - * - * @param xmlObject - * the XMLObject - * @param transforms - * an optional <code>Transforms</code> element (may be - * <code>null</code>) - * - * @throws SLCommandException - * if creating the Reference fails - * @throws NullPointerException - * if <code>xmlObject</code> is <code>null</code> - */ - private void setXMLObjectAndReferenceBase64(XMLObject xmlObject, XSECTTransforms transforms) throws SLCommandException { - - // create reference URI - // - // NOTE: the ds:Object can be referenced directly, as the Base64 transform - // operates on the text() of the input nodelist. - // - String referenceURI = "#" + xmlObject.getId(); - - // create Base64 Transform - Transform transform; - try { - transform = ctx.getSignatureFactory().newTransform(Transform.BASE64, (TransformParameterSpec) null); - } catch (NoSuchAlgorithmException e) { - // algorithm must be present - throw new SLRuntimeException(e); - } catch (InvalidAlgorithmParameterException e) { - // algorithm does not take parameters - throw new SLRuntimeException(e); - } - - if (transforms == null) { - transforms = new XSECTTransforms(Collections.singletonList(transform)); - } else { - transforms.insertTransform(transform); - } - - DigestMethod dm; - try { - dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); - } catch (NoSuchAlgorithmException e) { - log.error("Failed to get DigestMethod.", e); - throw new SLCommandException(4006); - } catch (InvalidAlgorithmParameterException e) { - log.error("Failed to get DigestMethod.", e); - throw new SLCommandException(4006); - } - String id = ctx.getIdValueFactory().createIdValue("Reference"); - - this.xmlObject = xmlObject; - this.reference = new XSECTReference(referenceURI, dm, transforms, null, id); - - } - - /** - * Sets the given <code>xmlObject</code> and creates and sets a corresponding - * <code>Reference</code>. - * <p> - * A transform to select the xmlObject's content is inserted at the top of to - * the optional <code>transforms</code> if given, or to a newly created - * <code>Transforms</code> element if <code>transforms</code> is - * <code>null</code>. - * </p> - * - * @param xmlObject - * the XMLObject - * @param transforms - * an optional <code>Transforms</code> element (may be - * <code>null</code>) - * - * @throws SLCommandException - * if creating the Reference fails - * @throws NullPointerException - * if <code>xmlObject</code> is <code>null</code> - */ - private void setXMLObjectAndReferenceXML(XMLObject xmlObject, XSECTTransforms transforms) throws SLCommandException { - - // create reference URI - String referenceURI = "#" + xmlObject.getId(); - - // create Transform to select ds:Object's children - Transform xpathTransform; - Transform c14nTransform; - try { - - XPathType xpath = new XPathType("id(\"" + xmlObject.getId() + "\")/node()", XPathType.Filter.INTERSECT); - List<XPathType> xpaths = Collections.singletonList(xpath); - XPathFilter2ParameterSpec params = new XPathFilter2ParameterSpec(xpaths); - - xpathTransform = ctx.getSignatureFactory().newTransform(Transform.XPATH2, params); - - // add exclusive canonicalization to avoid signing the namespace context of the ds:Object - c14nTransform = ctx.getSignatureFactory().newTransform(CanonicalizationMethod.EXCLUSIVE, (TransformParameterSpec) null); - - } catch (NoSuchAlgorithmException e) { - // algorithm must be present - throw new SLRuntimeException(e); - } catch (InvalidAlgorithmParameterException e) { - // params must be appropriate - throw new SLRuntimeException(e); - } - - if (transforms == null) { - List<Transform> newTransfroms = new ArrayList<Transform>(); - newTransfroms.add(xpathTransform); - newTransfroms.add(c14nTransform); - transforms = new XSECTTransforms(newTransfroms); - } else { - transforms.insertTransform(xpathTransform); - } - - DigestMethod dm; - try { - dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); - } catch (NoSuchAlgorithmException e) { - log.error("Failed to get DigestMethod.", e); - throw new SLCommandException(4006); - } catch (InvalidAlgorithmParameterException e) { - log.error("Failed to get DigestMethod.", e); - throw new SLCommandException(4006); - } - String id = ctx.getIdValueFactory().createIdValue("Reference"); - - this.xmlObject = xmlObject; - this.reference = new XSECTReference(referenceURI, dm, transforms, null, id); - - } - - /** - * Parses the given <code>xmlContent</code> and returns a corresponding - * document fragment. - * - * <p> - * The to-be parsed content is surrounded by <dummy> ... </dummy> elements to - * allow for mixed (e.g. Text and Element) content in XMLContent. - * </p> - * - * @param xmlContent - * the XMLContent to-be parsed - * - * @return a document fragment containing the parsed nodes - * - * @throws SLCommandException - * if parsing the given <code>xmlContent</code> fails - * - * @throws NullPointerException - * if <code>xmlContent</code> is <code>null</code> - */ - private DocumentFragment parseDataObject(XMLContentType xmlContent) throws SLCommandException { - - ByteArrayOutputStream redirectedStream = xmlContent.getRedirectedStream(); - - // Note: We can assume a fixed character encoding of UTF-8 for the - // content of the redirect stream as the content has already been parsed - // and serialized again to the redirect stream. - - List<InputStream> inputStreams = new ArrayList<InputStream>(); - try { - // dummy start element - inputStreams.add(new ByteArrayInputStream("<dummy>".getBytes("UTF-8"))); - - // content - inputStreams.add(new ByteArrayInputStream(redirectedStream.toByteArray())); - - // dummy end element - inputStreams.add(new ByteArrayInputStream("</dummy>".getBytes("UTF-8"))); - } catch (UnsupportedEncodingException e) { - throw new SLRuntimeException(e); - } - - SequenceInputStream inputStream = new SequenceInputStream(Collections.enumeration(inputStreams)); - - // parse DataObject - Document doc = parseDataObject(inputStream, "UTF-8"); - - Element documentElement = doc.getDocumentElement(); - - if (documentElement == null || - !"dummy".equals(documentElement.getLocalName())) { - log.info("Failed to parse DataObject XMLContent."); - throw new SLCommandException(4111); - } - - DocumentFragment fragment = doc.createDocumentFragment(); - while (documentElement.getFirstChild() != null) { - fragment.appendChild(documentElement.getFirstChild()); - } - - // log parsed document - if (log.isTraceEnabled()) { - - StringWriter writer = new StringWriter(); - - writer.write("DataObject:\n"); - - LSOutput output = domImplLS.createLSOutput(); - output.setCharacterStream(writer); - output.setEncoding("UTF-8"); - LSSerializer serializer = domImplLS.createLSSerializer(); - serializer.getDomConfig().setParameter("xml-declaration", Boolean.FALSE); - serializer.write(fragment, output); - - log.trace(writer.toString()); - } - - return fragment; - - } - - /** - * Parses the given <code>inputStream</code> using the given - * <code>encoding</code> and returns the parsed document. - * - * @param inputStream - * the to-be parsed input - * - * @param encoding - * the encoding to be used for parsing the given - * <code>inputStream</code> - * - * @return the parsed document - * - * @throws SLCommandException - * if parsing the <code>inputStream</code> fails. - * - * @throws NullPointerException - * if <code>inputStram</code> is <code>null</code> - */ - private Document parseDataObject(InputStream inputStream, String encoding) throws SLCommandException { - - LSInput input = domImplLS.createLSInput(); - input.setByteStream(inputStream); - - if (encoding != null) { - input.setEncoding(encoding); - } - - LSParser parser = domImplLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); - DOMConfiguration domConfig = parser.getDomConfig(); - SimpleDOMErrorHandler errorHandler = new SimpleDOMErrorHandler(); - domConfig.setParameter("error-handler", errorHandler); - domConfig.setParameter("validate", Boolean.FALSE); - - Document doc; - try { - doc = parser.parse(input); - } catch (DOMException e) { - log.info("Existing XML document cannot be parsed.", e); - throw new SLCommandException(4111); - } catch (LSException e) { - log.info("Existing XML document cannot be parsed. ", e); - throw new SLCommandException(4111); - } - - if (errorHandler.hasErrors()) { - // log errors - if (log.isInfoEnabled()) { - List<String> errorMessages = errorHandler.getErrorMessages(); - StringBuffer sb = new StringBuffer(); - for (String errorMessage : errorMessages) { - sb.append(" "); - sb.append(errorMessage); - } - log.info("Existing XML document cannot be parsed. " + sb.toString()); - } - throw new SLCommandException(4111); - } - - return doc; - - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactory.java deleted file mode 100644 index df42bd11..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-/**
- * A factory for creating <code>xsd:Id</code>-attribute values.
- *
- * @author mcentner
- */
-public interface IdValueFactory {
-
- /**
- * Creates a new <code>xsd:Id</code>-attribute value for an Element of the
- * given <code>elementName</code>.
- *
- * @param elementName
- * the local name of the element to create the value for
- *
- * @return a <code>xsd:Id</code>-attribute value
- */
- public String createIdValue(String elementName);
-
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactoryImpl.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactoryImpl.java deleted file mode 100644 index b9824655..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/IdValueFactoryImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-/**
- * An implementation of the IdValueFactory.
- * <p>
- * This IdValueFactory creates <code>xsd:Id</code>-attribute values of the form
- * '<code><elementName>-<random>-<sequenceNumber></code>',
- * where
- * <ul>
- * <li><code><elementName></code> is the name provided at
- * {@link #createIdValue(String)},</li>
- * <li><code><random></code> is a random generated fixed value for an
- * instance of this IdValueFactory and</li>
- * <li><code><sequenceNumber></code> is the sequence number of the value
- * generated for a given <code>elementName</code> by an instance of this
- * IdValueFactory.</li>
- * </ul>
- * </p>
- *
- * @author mcentner
- */
-public class IdValueFactoryImpl implements IdValueFactory {
-
- /**
- * A generator for <code>xsd:Id</code>-attribute values.
- *
- * @author mcentner
- */
- private class IdGenerator {
-
- /**
- * The salt.
- */
- private String salt;
-
- /**
- * The element name.
- */
- private String elementName;
-
- /**
- * The sequence number.
- */
- private int i = 0;
-
- /**
- * Creates a new instance of this IdGenerator with the given
- * <code>elementName</code> and <code>salt</code> value.
- *
- * @param elementName the element name
- * @param salt the salt valeu
- */
- private IdGenerator(String elementName, String salt) {
- super();
- this.elementName = elementName;
- this.salt = salt;
- }
-
- /**
- * @return returns the next <code>xsd:Id</code>-attribute value.
- */
- public String getNextId() {
- return elementName + "-" + salt + "-" + Integer.toString(++i);
- }
-
- }
-
- /**
- * A map of element names to <code>xsd:Id</code>-value generators.
- */
- private Map<String, IdGenerator> generators = new HashMap<String, IdGenerator>();
-
- /**
- * The seed value.
- */
- private String seed;
-
- /**
- * Creates a new instance of this IdValueFactory.
- */
- public IdValueFactoryImpl() {
-
- Random random = new Random();
- int rand = random.nextInt();
- seed = Integer.toHexString(rand);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egiz.bku.slcommands.impl.IdValueFactory#createIdValue(java.lang.String
- * )
- */
- public String createIdValue(String elementName) {
-
- IdGenerator generator = generators.get(elementName);
- if (generator == null) {
- generator = new IdGenerator(elementName, seed);
- generators.put(elementName, generator);
- }
- return generator.getNextId();
-
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/LocRefDereferencer.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/LocRefDereferencer.java deleted file mode 100644 index f5394157..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/LocRefDereferencer.java +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.xml.crypto.Data;
-import javax.xml.crypto.OctetStreamData;
-import javax.xml.crypto.URIDereferencer;
-import javax.xml.crypto.URIReference;
-import javax.xml.crypto.URIReferenceException;
-import javax.xml.crypto.XMLCryptoContext;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.bku.utils.urldereferencer.StreamData;
-import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer;
-import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext;
-
-/**
- * An URIDereferencer implementation that dereferences <code>LocRef</code>
- * references.
- *
- * @author mcentner
- */
-public class LocRefDereferencer implements URIDereferencer {
-
- /**
- * Logging facility.
- */
- private static Log log = LogFactory.getLog(LocRefDereferencer.class);
-
- /**
- * The <code>LocRef</code>-reference to be dereferenced by
- * {@link #dereference(URIReference, XMLCryptoContext)}.
- */
- protected String locRef;
-
- /**
- * The context to be used for dereferencing.
- */
- protected URLDereferencerContext dereferencerContext;
-
- /**
- * Creates a new instance of this LocRefDereferencer with the given
- * <code>dereferencerContext</code> and <code>locRef</code> reference.
- *
- * @param dereferencerContext
- * the context to be used for dereferencing
- * @param locRef
- * the <code>LocRef</code>-reference (must be an absolute URI)
- *
- * @throws URISyntaxException
- * if <code>LocRef</code> is not an absolute URI
- */
- public LocRefDereferencer(URLDereferencerContext dereferencerContext,
- String locRef) throws URISyntaxException {
-
- this.dereferencerContext = dereferencerContext;
-
- URI locRefUri = new URI(locRef);
- if (locRefUri.isAbsolute()) {
- this.locRef = locRef;
- } else {
- throw new IllegalArgumentException(
- "Parameter 'locRef' must be an absolut URI.");
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * javax.xml.crypto.URIDereferencer#dereference(javax.xml.crypto.URIReference,
- * javax.xml.crypto.XMLCryptoContext)
- */
- @Override
- public Data dereference(URIReference uriReference, XMLCryptoContext context)
- throws URIReferenceException {
-
- URLDereferencer dereferencer = URLDereferencer.getInstance();
- StreamData streamData;
- try {
- streamData = dereferencer.dereference(locRef, dereferencerContext);
- } catch (IOException e) {
- log.info("Failed to dereference URI'" + locRef + "'. " + e.getMessage(),
- e);
- throw new URIReferenceException("Failed to dereference URI '" + locRef
- + "'. " + e.getMessage(), e);
- }
- return new OctetStreamData(streamData.getStream(), locRef, streamData
- .getContentType());
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALPrivateKey.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALPrivateKey.java deleted file mode 100644 index 25e2d4e5..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALPrivateKey.java +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect; - -import at.gv.egiz.stal.HashDataInput; -import java.security.PrivateKey; - -import at.gv.egiz.stal.STAL; -//import at.gv.egiz.stal.HashDataInputCallback; -import java.util.List; - -/** - * This class implements a private key used by the {@link STALSignature} class. - * - * @author mcentner - */ -public class STALPrivateKey implements PrivateKey { - - private static final long serialVersionUID = 1L; - - /** - * The STAL implementation. - */ - private STAL stal; - - /** - * The callback interface for obtaining the hash input data. - */ -// private HashDataInputCallback hashDataInputCallback; - - - private List<DataObject> dataObjects; - - /** - * The keybox identifier. - */ - private String keyboxIdentifier; - - /** - * The signature algorithm. - */ - private String algorithm; - - /** - * Creates a new instance of this <code>STALPrivateKey</code> with the given - * <code>stal</code> implementation, signature <code>algorithm</code>, - * <code>keyboxIdentifier</code> and <code>hashDataInputCallback</code> - * interface. - * - * @param stal - * the STAL implementation - * @param algorithm - * the signature algorithm - * @param keyboxIdentifier - * the keybox identifier - * @param hashDataInputCallback - * the interface for obtaining the has input data - */ - public STALPrivateKey(STAL stal, - String algorithm, String keyboxIdentifier, List<DataObject> dataObjects) { - super(); - this.keyboxIdentifier = keyboxIdentifier; - this.dataObjects = dataObjects; - this.stal = stal; - this.algorithm = algorithm; - } - - /* (non-Javadoc) - * @see java.security.Key#getAlgorithm() - */ - @Override - public String getAlgorithm() { - return algorithm; - } - - /* (non-Javadoc) - * @see java.security.Key#getEncoded() - */ - @Override - public byte[] getEncoded() { - throw new UnsupportedOperationException("STALPrivateKey does not support the getEncoded() method."); - } - - /* (non-Javadoc) - * @see java.security.Key#getFormat() - */ - @Override - public String getFormat() { - return null; - } - - /** - * @return the STAL implementation - */ - public STAL getStal() { - return stal; - } - - /** - * @return the interface for obtaining the hash data input - */ - public List<DataObject> getDataObjects() { - - return dataObjects; - } - - /** - * @return the keybox identifier - */ - public String getKeyboxIdentifier() { - return keyboxIdentifier; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALProvider.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALProvider.java deleted file mode 100644 index 9fb9a3f1..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALProvider.java +++ /dev/null @@ -1,71 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import iaik.xml.crypto.XmldsigMore;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.Provider;
-import java.security.Signature;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.crypto.dsig.SignatureMethod;
-
-/**
- * A security provider implementation that provides {@link Signature} implementations
- * based on STAL.
- *
- * @author mcentner
- */
-public class STALProvider extends Provider {
-
- private static final long serialVersionUID = 1L;
-
- private static String IMPL_PACKAGE_NAME = "at.gv.egiz.bku.slcommands.impl.xsect";
-
- public STALProvider() {
-
- super("STAL", 1.0, "Security Token Abstraction Layer Provider");
-
- final Map<String, String> map = new HashMap<String, String>();
-
- // TODO: register further algorithms
- map.put("Signature." + SignatureMethod.RSA_SHA1,
- IMPL_PACKAGE_NAME + ".STALSignature");
- map.put("Signature." + XmldsigMore.SIGNATURE_ECDSA_SHA1,
- IMPL_PACKAGE_NAME + ".STALSignature"); - map.put("Signature." + XmldsigMore.SIGNATURE_RSA_SHA256, - IMPL_PACKAGE_NAME + ".STALSignature"); - map.put("Signature." + XmldsigMore.SIGNATURE_ECDSA_SHA256, - IMPL_PACKAGE_NAME + ".STALSignature"); - map.put("Signature." + XmldsigMore.SIGNATURE_ECDSA_SHA512, - IMPL_PACKAGE_NAME + ".STALSignature"); - -
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- @Override
- public Void run() {
- putAll(map);
- return null;
- }
- });
-
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignature.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignature.java deleted file mode 100644 index dd7c7d8a..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignature.java +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect; - -import at.gv.egiz.bku.slcommands.impl.DataObjectHashDataInput; -import at.gv.egiz.bku.slexceptions.SLViewerException; - -import java.io.ByteArrayOutputStream; -import java.security.InvalidKeyException; -import java.security.InvalidParameterException; -import java.security.PrivateKey; -import java.security.PublicKey; -import java.security.SignatureException; -import java.security.SignatureSpi; -import java.util.Collections; -import java.util.List; - -import at.gv.egiz.stal.ErrorResponse; -import at.gv.egiz.stal.HashDataInput; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.STALRequest; -import at.gv.egiz.stal.STALResponse; -import at.gv.egiz.stal.SignRequest; -import at.gv.egiz.stal.SignResponse; -//import at.gv.egiz.stal.HashDataInputCallback; -import java.util.ArrayList; - -/** - * A signature service provider implementation that uses STAL to sign. - * - * @author mcentner - */ -public class STALSignature extends SignatureSpi { - -// private static final Log log = LogFactory.getLog(STALSignature.class); - - /** - * The private key. - */ - protected STALPrivateKey privateKey; - - /** - * The to-be signed data. - */ - protected ByteArrayOutputStream data = new ByteArrayOutputStream(); - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineGetParameter(java.lang.String) - */ - @Override - protected Object engineGetParameter(String param) - throws InvalidParameterException { - throw new InvalidParameterException(); - } - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineInitSign(java.security.PrivateKey) - */ - @Override - protected void engineInitSign(PrivateKey privateKey) - throws InvalidKeyException { - - if (!(privateKey instanceof STALPrivateKey)) { - throw new InvalidKeyException("STALSignature supports STALKeys only."); - } - - this.privateKey = (STALPrivateKey) privateKey; - - } - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineInitVerify(java.security.PublicKey) - */ - @Override - protected void engineInitVerify(PublicKey publicKey) - throws InvalidKeyException { - - throw new UnsupportedOperationException("STALSignature does not support signature verification."); - } - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineSetParameter(java.lang.String, java.lang.Object) - */ - @Override - protected void engineSetParameter(String param, Object value) - throws InvalidParameterException { - } - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineSign() - */ - @Override - protected byte[] engineSign() throws SignatureException { - - STAL stal = privateKey.getStal(); - - if (stal == null) { - throw new SignatureException("STALSignature requires the STALPrivateKey " + - "to provide a STAL implementation reference."); - } - - String keyboxIdentifier = privateKey.getKeyboxIdentifier(); - - if (keyboxIdentifier == null) { - throw new SignatureException("STALSignature requires the STALPrivateKey " + - "to provide a KeyboxIdentifier."); - } - - // get hashDataInputs (DigestInputStreams) once slcommands.impl.xsect.Signature::sign() was called - List<DataObject> dataObjects = privateKey.getDataObjects(); -// log.debug("got " + dataObjects.size() + " DataObjects, passing HashDataInputs to STAL SignRequest"); - - List<HashDataInput> hashDataInputs = new ArrayList<HashDataInput>(); - for (DataObject dataObject : dataObjects) { - try { - dataObject.validateHashDataInput(); - } catch (SLViewerException e) { - throw new STALSignatureException(e); - } - hashDataInputs.add(new DataObjectHashDataInput(dataObject)); - } - - SignRequest signRequest = new SignRequest(); - signRequest.setKeyIdentifier(keyboxIdentifier); - signRequest.setSignedInfo(data.toByteArray()); - signRequest.setHashDataInput(hashDataInputs); - - List<STALResponse> responses = stal.handleRequest(Collections.singletonList((STALRequest) signRequest)); - - if (responses == null || responses.size() != 1) { - throw new SignatureException("Failed to access STAL."); - } - - STALResponse response = responses.get(0); - if (response instanceof SignResponse) { - return ((SignResponse) response).getSignatureValue(); - } else if (response instanceof ErrorResponse) { - throw new STALSignatureException(((ErrorResponse) response).getErrorCode()); - } else { - throw new SignatureException("Failed to access STAL."); - } - - } - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineUpdate(byte) - */ - @Override - protected void engineUpdate(byte b) throws SignatureException { - data.write(b); - } - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineUpdate(byte[], int, int) - */ - @Override - protected void engineUpdate(byte[] b, int off, int len) - throws SignatureException { - data.write(b, off, len); - } - - /* (non-Javadoc) - * @see java.security.SignatureSpi#engineVerify(byte[]) - */ - @Override - protected boolean engineVerify(byte[] sigBytes) throws SignatureException { - throw new UnsupportedOperationException("STALSignature des not support signature verification."); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureException.java deleted file mode 100644 index 4e86b07c..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureException.java +++ /dev/null @@ -1,92 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import java.security.SignatureException;
-
-/**
- * A SignatureException thrown by the {@link STALSignature}.
- *
- * @author mcentner
- */
-public class STALSignatureException extends SignatureException {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * The STAL error code.
- */
- private int errorCode;
-
- /**
- * Creates a new instance of this STALSignatureException.
- */
- public STALSignatureException() {
- }
-
- /**
- * Creates a new instance of this STALSigantureException with
- * the given <code>errorCode</code>.
- *
- * @param errorCode the error code
- */
- public STALSignatureException(int errorCode) {
- this.errorCode = errorCode;
- }
-
- /**
- * Creates a new instance of this STALSignatureException with
- * the given error <code>msg</code>.
- *
- * @param msg the error message
- * @see SignatureException#SignatureException(String)
- */
- public STALSignatureException(String msg) {
- super(msg);
- }
-
- /**
- * Creates a new instance of this STALSignatureException with
- * the given root <code>cause</code>.
- *
- * @param cause the cause
- * @see SignatureException#SignatureException(Throwable)
- */
- public STALSignatureException(Throwable cause) {
- super(cause);
- }
-
- /**
- * Creates a new instance of this STALSignautureException with
- * the given error <code>message</code> and root <code>cause</code>.
- *
- * @param message the error message
- * @param cause the cause
- * @see SignatureException#SignatureException(String, Throwable)
- */
- public STALSignatureException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @return the error code
- */
- public int getErrorCode() {
- return errorCode;
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/Signature.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/Signature.java deleted file mode 100644 index 3cebb6a3..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/Signature.java +++ /dev/null @@ -1,995 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.security.InvalidAlgorithmParameterException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.crypto.MarshalException; -import javax.xml.crypto.dom.DOMStructure; -import javax.xml.crypto.dsig.CanonicalizationMethod; -import javax.xml.crypto.dsig.DigestMethod; -import javax.xml.crypto.dsig.Reference; -import javax.xml.crypto.dsig.SignatureMethod; -import javax.xml.crypto.dsig.SignedInfo; -import javax.xml.crypto.dsig.XMLObject; -import javax.xml.crypto.dsig.XMLSignature; -import javax.xml.crypto.dsig.XMLSignatureException; -import javax.xml.crypto.dsig.XMLSignatureFactory; -import javax.xml.crypto.dsig.dom.DOMSignContext; -import javax.xml.crypto.dsig.keyinfo.KeyInfo; -import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory; -import javax.xml.crypto.dsig.keyinfo.X509Data; -import javax.xml.stream.XMLStreamException; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.etsi.uri._01903.v1_1.DataObjectFormatType; -import org.etsi.uri._01903.v1_1.QualifyingPropertiesType; -import org.w3c.dom.DOMConfiguration; -import org.w3c.dom.DOMException; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentFragment; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.ls.DOMImplementationLS; -import org.w3c.dom.ls.LSException; -import org.w3c.dom.ls.LSInput; -import org.w3c.dom.ls.LSOutput; -import org.w3c.dom.ls.LSParser; -import org.w3c.dom.ls.LSResourceResolver; -import org.w3c.dom.ls.LSSerializer; - -import at.buergerkarte.namespaces.securitylayer._1.Base64XMLLocRefReqRefContentType; -import at.buergerkarte.namespaces.securitylayer._1.Base64XMLOptRefContentType; -import at.buergerkarte.namespaces.securitylayer._1.DataObjectAssociationType; -import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; -import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType; -import at.gv.egiz.bku.binding.HttpUtil; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLViewerException; -import at.gv.egiz.bku.utils.HexDump; -import at.gv.egiz.bku.utils.urldereferencer.StreamData; -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; -import at.gv.egiz.dom.DOMUtils; -import at.gv.egiz.slbinding.impl.XMLContentType; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.xades.QualifyingPropertiesException; -import at.gv.egiz.xades.QualifyingPropertiesFactory; - -/** - * This class represents an XML-Signature as to be created by the - * security layer command <code>CreateXMLSignatureRequest</code>. - * - * @author mcentner - */ -public class Signature { - public static final String XMLDSIG_PREFIX = "dsig"; - - /** - * Logging facility. - */ - private static Log log = LogFactory.getLog(Signature.class); - - /** - * The DOM implementation used. - */ - private DOMImplementationLS domImplLS; - - /** - * The SignatureContext for the XMLSignature. - */ - private SignatureContext ctx; - - /** - * The list of {@link DataObject}s for this signature. - */ - private List<DataObject> dataObjects = new ArrayList<DataObject>(); - - /** - * A mapping from the <code>Id</code>-attribute values of this signature's - * <code>ds:Reference</code>s to the corresponding {@link DataObject}s. - */ -// private Map<String, DataObject> dataObjectReferencIds = new HashMap<String, DataObject>(); - - /** - * The SignatureEnvironment for this signature. - */ - private SignatureLocation signatureLocation; - - /** - * The XML signature. - */ - private XMLSignature xmlSignature; - - /** - * A list of attributes of type <code>xsd:ID</code> to be registered in the {@link DOMSignContext}. - */ - private List<IdAttribute> idAttributes = new ArrayList<IdAttribute>(); - - /** - * The signer's X509 certificate. - */ - private X509Certificate signerCertificate; - - /** - * The signing time. - */ - private Date signingTime; - - /** - * Creates a new SLXMLSignature instance. - */ - public Signature(URLDereferencerContext dereferencerContext, - IdValueFactory idValueFactory, - AlgorithmMethodFactory algorithmMethodFactory) { - - domImplLS = DOMUtils.getDOMImplementationLS(); - - ctx = new SignatureContext(); - - ctx.setSignatureFactory(XMLSignatureFactory.getInstance()); - - ctx.setDereferencerContext(dereferencerContext); - ctx.setIdValueFactory(idValueFactory); - ctx.setAlgorithmMethodFactory(algorithmMethodFactory); - - } - - /** - * @return the Document containing this Signature - */ - public Document getDocument() { - return ctx.getDocument(); - } - - /** - * @return the parent Node for this Signature - */ - public Node getParent() { - return (signatureLocation != null) ? signatureLocation.getParent() : null; - } - - /** - * @return the next sibling Node for this Signature - */ - public Node getNextSibling() { - return (signatureLocation != null) ? signatureLocation.getNextSibling() : null; - } - - /** - * @return the XMLSignature - */ - public XMLSignature getXMLSignature() { - return xmlSignature; - } - - /** - * @return the list of {@link Reference}s of this Signature - */ - @SuppressWarnings("unchecked") - public List<Reference> getReferences() { - return (xmlSignature != null) ? xmlSignature.getSignedInfo().getReferences() : null; - } - - /** - * @return the list of {@link XMLObject}s of this Signature - */ - @SuppressWarnings("unchecked") - public List<XMLObject> getXMLObjects() { - return (xmlSignature != null) ? xmlSignature.getObjects() : null; - } - - /** - * Prepares the signature document with the information given by the - * <code>signatureInfo</code> provided. - * - * @param signatureInfo - * the <code>SignatureInfo</code> - * - * @throws SLCommandException - * if processing fails for any reason - * @throws IllegalStateException - * if the <code>parent</code> node has already been set - * @throws NullPointerException - * if <code>signatureInfo</code> is <code>null</code> - */ - public void setSignatureInfo(SignatureInfoCreationType signatureInfo) throws SLCommandException { - - if (signatureLocation != null) { - throw new IllegalStateException("SignatureEnvironment already set."); - } - - Base64XMLOptRefContentType signatureEnvironment = signatureInfo.getSignatureEnvironment(); - - if (signatureEnvironment == null) { - - // no SignatureEnvironment, so we use an empty document and the document as parent - ensureSignatureLocation(); - - } else { - - // parse SignatureEnvrionment and use as document - Document document = parseSignatureEnvironment(signatureEnvironment, signatureInfo.getSupplement()); - ctx.setDocument(document); - - signatureLocation = new SignatureLocation(ctx); - signatureLocation.setSignatureInfo(signatureInfo); - - } - - } - - /** - * Ensures a SignatureLocation for this Signature. - */ - private void ensureSignatureLocation() { - - if (signatureLocation == null) { - Document document = DOMUtils.createDocument(); - ctx.setDocument(document); - - signatureLocation = new SignatureLocation(ctx); - signatureLocation.setParent(document); - } - - } - - /** - * Adds a DataObject with the information given by the - * <code>dataObjectInfo</code> provided to this Signature. - * - * @param dataObjectInfo - * the <code>DataObjectInfo</code> element - * - * @throws SLCommandException - * if adding the DataObject fails - * @throws SLRequestException - * if the information provided by the given - * <code>dataObjectInfo</code> does not conform to the security - * layer specification - * @throws NullPointerException - * if <code>dataObjectInfo</code> is <code>null</code> - */ - public void addDataObject(DataObjectInfoType dataObjectInfo) throws SLCommandException, SLRequestException { - - ensureSignatureLocation(); - - DataObject dataObject = new DataObject(ctx); - dataObject.setDataObjectInfo(dataObjectInfo); - - dataObjects.add(dataObject); - -// dataObjectReferencIds.put(dataObject.getReference().getId(), dataObject); - - } - - /** - * Sets the <code>SigningTime</code> qualifying property of this Signature. - * - * @param signingTime the signing time to set - */ - public void setSigningTime(Date signingTime) { - this.signingTime = signingTime; - } - - /** - * Sets the <code>SignerCertificate</code> qualifying property of this Signature. - * - * @param certificate the signer's certificate - */ - public void setSignerCeritifcate(X509Certificate certificate) { - this.signerCertificate = certificate; - } - - /** - * Builds the XMLSignature data structure of this Signature as configured by - * the various setter methods. - * - * @throws SLCommandException if building this signature fails - */ - public void buildXMLSignature() throws SLCommandException { - - String signatureId = ctx.getIdValueFactory().createIdValue("Signature"); - - List<XMLObject> objects = new ArrayList<XMLObject>(); - List<Reference> references = new ArrayList<Reference>(); - - // add all data objects - for (DataObject dataObject : dataObjects) { - if (dataObject.getXmlObject() != null) { - objects.add(dataObject.getXmlObject()); - } - if (dataObject.getReference() != null) { - references.add(dataObject.getReference()); - } - } - - addXAdESObjectAndReference(objects, references, signatureId); - - XMLSignatureFactory signatureFactory = ctx.getSignatureFactory(); - AlgorithmMethodFactory algorithmMethodFactory = ctx.getAlgorithmMethodFactory(); - - CanonicalizationMethod cm; - SignatureMethod sm; - try { - cm = algorithmMethodFactory.createCanonicalizationMethod(ctx); - sm = algorithmMethodFactory.createSignatureMethod(ctx); - } catch (NoSuchAlgorithmException e) { - log.error("Failed to get Canonicalization or Signature algorithm.", e); - throw new SLCommandException(4006); - } catch (InvalidAlgorithmParameterException e) { - log.error("Failed to get Canonicalization or Signature algorithm.", e); - throw new SLCommandException(4006); - } - - String siId = ctx.getIdValueFactory().createIdValue("SignedInfo"); - - SignedInfo si = signatureFactory.newSignedInfo(cm, sm, references, siId); - - KeyInfo ki = null; - if (signerCertificate != null) { - KeyInfoFactory kif = KeyInfoFactory.getInstance(); - X509Data x509Data = kif.newX509Data(Collections.singletonList(signerCertificate)); - ki = kif.newKeyInfo(Collections.singletonList(x509Data)); - } - - String signatureValueId = ctx.getIdValueFactory().createIdValue("SignatureValue"); - - xmlSignature = signatureFactory.newXMLSignature(si, ki, objects, signatureId, signatureValueId); - - } - - /** - * Sign this Signature using the given <code>signContext</code>. - * <p> - * Call's {@link #buildXMLSignature()} if it has not been called yet. - * </p> - * - * @param signContext - * the signing context - * - * @throws MarshalException - * if marshalling the XMLSignature fails - * @throws XMLSignatureException - * if signing the XMLSignature fails - * @throws SLCommandException - * if building the XMLSignature fails - * @throws SLViewerException - * @throws NullPointerException - * if <code>signContext</code> is <code>null</code> - */ - public void sign(DOMSignContext signContext) throws MarshalException, XMLSignatureException, SLCommandException, SLViewerException { - - if (xmlSignature == null) { - buildXMLSignature(); - } - - for (IdAttribute idAttribute : idAttributes) { - signContext.setIdAttributeNS(idAttribute.element, idAttribute.namespaceURI, idAttribute.localName); - } - - // DO NOT USE: - // signContext.setProperty("iaik.xml.crypto.dsig.sign-over", Boolean.TRUE); - - signContext.setProperty("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE); - - signContext.putNamespacePrefix(XMLSignature.XMLNS,XMLDSIG_PREFIX); - - signContext.setURIDereferencer(new URIDereferncerAdapter(ctx.getDereferencerContext())); - - try { - xmlSignature.sign(signContext); - } catch (XMLSignatureException e) { - Throwable cause = e.getCause(); - while (cause != null) { - if (cause instanceof STALSignatureException) { - if (((STALSignatureException) cause).getCause() instanceof SLViewerException) { - throw (SLViewerException) ((STALSignatureException) cause).getCause(); - } - int errorCode = ((STALSignatureException) cause).getErrorCode(); - SLCommandException commandException = new SLCommandException(errorCode); - log.info("Failed to sign signature.", commandException); - throw commandException; - } else { - cause = cause.getCause(); - } - } - throw e; - } - - // debug - if (log.isTraceEnabled()) { - for (DataObject dataObject : dataObjects) { - Reference reference = dataObject.getReference(); - InputStream digestInputStream = reference.getDigestInputStream(); - if (digestInputStream != null) { - String mimeType = dataObject.getMimeType(); - StringBuilder sb = new StringBuilder(); - sb.append("DigestInput for Reference with id='"); - sb.append(reference.getId()); - sb.append("' (MIME-Type="); - sb.append(dataObject.getMimeType()); - sb.append("):\n"); - try { - if (mimeType != null && ( - mimeType.startsWith("text") || - "application/xhtml+xml".equals(mimeType))) { - byte[] b = new byte[512]; - for (int l; (l = digestInputStream.read(b)) != -1;) { - sb.append(new String(b, 0, l)); - } - } else { - sb.append(HexDump.hexDump(digestInputStream)); - } - } catch (IOException e) { - log.error(e); - } - log.trace(sb.toString()); - } else { - log.trace("Reference caching is not enabled."); - } - } - for (Reference reference : getReferences()) { - if (reference.getType() != null) { - InputStream digestInputStream = reference.getDigestInputStream(); - if (digestInputStream != null) { - StringBuilder sb = new StringBuilder(); - sb.append("DigestInput for Reference with id='"); - sb.append(reference.getId()); - sb.append("'; Type:"); - sb.append(reference.getType()); - sb.append("):\n"); - try { - byte[] b = new byte[512]; - for (int l; (l = digestInputStream.read(b)) != -1;) { - sb.append(new String(b, 0, l)); - } - } catch (IOException e) { - log.error(e); - } - log.trace(sb.toString()); - } else { - log.trace("Reference caching is not enabled."); - } - - } - } - } - - } - - /** - * Sign this Signature using the given <code>stal</code> implementation and - * <code>keyboxIdentifier</code>. - * <p> - * This method configures an appropriate {@link DOMSignContext} and calls - * {@link #sign(DOMSignContext)}. If {@link #buildXMLSignature()} has not been - * called yet, it is called by this method. - * </p> - * - * @param stal - * the STAL implementation to use - * @param keyboxIdentifier - * the KeyboxIdentifier to use - * - * @throws MarshalException - * if marshalling this Signature fails - * @throws XMLSignatureException - * if signing this Signature fails - * @throws SLCommandException - * if building this Signature fails - * @throws SLViewerException - * @throws NullPointerException - * if <code>stal</code> or <code>keyboxIdentifier</code> is - * <code>null</code> - */ - public void sign(STAL stal, String keyboxIdentifier) throws MarshalException, XMLSignatureException, SLCommandException, SLViewerException { - - if (stal == null) { - throw new NullPointerException("Argument 'stal' must not be null."); - } - - if (keyboxIdentifier == null) { - throw new NullPointerException("Argument 'keyboxIdentifier' must not be null."); - } - - if (xmlSignature == null) { - buildXMLSignature(); - } - - SignatureMethod signatureMethod = xmlSignature.getSignedInfo().getSignatureMethod(); - String algorithm = signatureMethod.getAlgorithm(); - - //don't get hashDataInputs (digestInputStreams) now, only once Signature.sign() was called (cf STALSignature.engineSign) - PrivateKey privateKey = new STALPrivateKey(stal, algorithm, keyboxIdentifier, dataObjects); // hashDataInputs); - - DOMSignContext signContext; - if (getNextSibling() == null) { - signContext = new DOMSignContext(privateKey, getParent()); - } else { - signContext = new DOMSignContext(privateKey, getParent(), getNextSibling()); - } - - sign(signContext); - } - -// @Override -// public HashDataInput getHashDataInput(final String referenceId) { -// final DataObject dataObject = dataObjectReferencIds.get(referenceId); -// if (dataObject != null) { -// return new HashDataInput() { -// -// InputStream hashDataInput = dataObject.getReference().getDigestInputStream(); -// -// @Override -// public String getReferenceId() { -// return referenceId; -// } -// -// @Override -// public String getMimeType() { -// return dataObject.getMimeType(); -// } -// -// @Override -// public InputStream getHashDataInput() { -// return hashDataInput; -// } -// }; -// } -// return null; -// } - - /** - * Adds the XAdES <code>QualifyingProperties</code> as an - * <code>ds:Object</code> and a corresponding <code>ds:Reference</code> to - * it's <code>SignedProperties</code> element to this Signature. - * - * @param objects - * the list of <code>ds:Objects</code> to add the created - * <code>ds:Object</code> to - * @param references - * the list of <code>ds:References</code> to add the created - * <code>ds:Reference</code> to - * @param signatureId TODO - * @throws SLCommandException - * if creating and adding the XAdES - * <code>QualifyingProperties</code> fails - * @throws NullPointerException - * if <code>objects</code> or <code>references</code> is - * <code>null</code> - */ - private void addXAdESObjectAndReference(List<XMLObject> objects, List<Reference> references, String signatureId) throws SLCommandException { - - QualifyingPropertiesFactory factory = QualifyingPropertiesFactory.getInstance(); - - String idValue = ctx.getIdValueFactory().createIdValue("SignedProperties"); - - Date date = (signingTime != null) ? signingTime : new Date(); - - List<X509Certificate> signingCertificates; - if (signerCertificate != null) { - signingCertificates = Collections.singletonList(signerCertificate); - } else { - signingCertificates = Collections.emptyList(); - } - - // TODO: report MOA-SP bug - // - // The security layer specification mandates the use of version 1.2.2. of the - // XAdES QualifyingProperties. However MOA-SP supports only version 1.1.1. Therefore, - // the version 1.1.1 is used in order to be compatible with current MOA-SP versions. - - List<DataObjectFormatType> dataObjectFormats = new ArrayList<DataObjectFormatType>(); - for (DataObject dataObject : dataObjects) { - if (dataObject.getMimeType() != null && dataObject.getReference() != null) { - Reference reference = dataObject.getReference(); - if (reference.getId() != null) { - String objectReference = "#" + reference.getId(); - dataObjectFormats.add(factory.createDataObjectFormatType( - objectReference, dataObject.getMimeType(), dataObject - .getDescription())); - } - } - } - - String target = "#" + signatureId; - - DigestMethod dm; - try { - dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); - } catch (NoSuchAlgorithmException e) { - log.error("Failed to get DigestMethod algorithm.", e); - throw new SLCommandException(4006); - } catch (InvalidAlgorithmParameterException e) { - log.error("Failed to get DigestMethod algorithm.", e); - throw new SLCommandException(4006); - } - - JAXBElement<QualifyingPropertiesType> qualifyingProperties; - try { - qualifyingProperties = factory.createQualifyingProperties111(target, date, signingCertificates, idValue, dataObjectFormats, dm); - } catch (QualifyingPropertiesException e) { - log.error("Failed to create QualifyingProperties.", e); - throw new SLCommandException(4000); - } - - DocumentFragment fragment = ctx.getDocument().createDocumentFragment(); - - try { - factory.marshallQualifyingProperties(qualifyingProperties, fragment); - } catch (JAXBException e) { - log.error("Failed to marshal QualifyingProperties.", e); - throw new SLCommandException(4000); - } - - List<DOMStructure> content = Collections.singletonList(new DOMStructure(fragment.getFirstChild())); - - String objectIdValue = ctx.getIdValueFactory().createIdValue("Object"); - - XMLObject object = ctx.getSignatureFactory().newXMLObject(content, objectIdValue, null, null); - - objects.add(object); - - // TODO: Report MOA-SP Bug - // - // Direct referencing of the SignedPorperties Id-attribute is not supported by MOA-SP - // because the QualifyingProperties are parsed without the XAdES schema. Therefore, - // the shorthand XPointer could not be resolved. - // - // The following workaround uses an XPointer to select the SignedProperties in order - // to allow the signature to be verified with MOA-SP. - - String referenceURI = "#xmlns(xades=http://uri.etsi.org/01903/v1.1.1%23)%20xpointer(id('" - + objectIdValue - + "')/child::xades:QualifyingProperties/child::xades:SignedProperties)"; - - String referenceIdValue = ctx.getIdValueFactory().createIdValue("Reference"); - String referenceType = QualifyingPropertiesFactory.SIGNED_PROPERTIES_REFERENCE_TYPE_V1_1_1; - - try { - dm = ctx.getAlgorithmMethodFactory().createDigestMethod(ctx); - } catch (NoSuchAlgorithmException e) { - log.error("Failed to get DigestMethod algorithm.", e); - throw new SLCommandException(4006); - } catch (InvalidAlgorithmParameterException e) { - log.error("Failed to get DigestMethod algorithm.", e); - throw new SLCommandException(4006); - } - - Reference reference = ctx.getSignatureFactory().newReference(referenceURI, dm, null, referenceType, referenceIdValue); - - references.add(reference); - - Node child = fragment.getFirstChild(); - if (child instanceof Element) { - NodeList nodes = ((Element) child).getElementsByTagNameNS(QualifyingPropertiesFactory.NS_URI_V1_1_1, "SignedProperties"); - if (nodes.getLength() > 0) { - IdAttribute idAttribute = new IdAttribute(); - idAttribute.element = (Element) nodes.item(0); - idAttribute.namespaceURI = null; - idAttribute.localName = "Id"; - idAttributes.add(idAttribute); - } - } - - } - - /** - * Parse the SignatureEnvironment. - * - * @param signatureEnvironment - * the <code>SignatureEnvironment</code> element - * @param supplements - * an optional list of <code>Supplements</code> (may be - * <code>null</code>) - * - * @return the parsed SignatureEnvironment document - * - * @throws SLCommandException - * if parsing the SignatureEnvironment fails - * @throws NullPointerException - * if <code>signatureEnvironment</code> is <code>null</code> - */ - private Document parseSignatureEnvironment( - Base64XMLOptRefContentType signatureEnvironment, - List<DataObjectAssociationType> supplements) throws SLCommandException { - - if (signatureEnvironment == null) { - throw new NullPointerException("Argument 'signatureEnvironment' must not be null."); - } - - LSInput input; - try { - if (signatureEnvironment.getReference() != null) { - log.debug("SignatureEnvironment contains Reference " + signatureEnvironment.getReference() + "."); - input = createLSInput(signatureEnvironment.getReference()); - } else if (signatureEnvironment.getBase64Content() != null) { - log.debug("SignatureEnvironment contains Base64Content."); - input = createLSInput(signatureEnvironment.getBase64Content()); - } else if (signatureEnvironment.getXMLContent() != null) { - log.debug("SignatureEnvironment contains XMLContent."); - input = createLSInput((XMLContentType) signatureEnvironment.getXMLContent()); - } else { - // the schema does not allow us to reach this point - throw new SLCommandException(4000); - } - } catch (IOException e) { - log.info("XML document in which the signature is to be integrated cannot be resolved.", e); - throw new SLCommandException(4100); - } catch (XMLStreamException e) { - log.info("XML document in which the signature is to be integrated cannot be resolved.", e); - throw new SLCommandException(4100); - } - - LSParser parser = domImplLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); - DOMConfiguration domConfig = parser.getDomConfig(); - SimpleDOMErrorHandler errorHandler = new SimpleDOMErrorHandler(); - domConfig.setParameter("error-handler", errorHandler); - LSResourceResolverAdapter resourceResolver = new LSResourceResolverAdapter(supplements); - domConfig.setParameter("resource-resolver", resourceResolver); - domConfig.setParameter("validate", Boolean.TRUE); - - Document doc; - try { - doc = parser.parse(input); - } catch (DOMException e) { - log.info("XML document in which the signature is to be integrated cannot be parsed.", e); - throw new SLCommandException(4101); - } catch (LSException e) { - log.info("XML document in which the signature is to be integrated cannot be parsed.", e); - throw new SLCommandException(4101); - } - - if (resourceResolver.getError() != null) { - log.info("Failed to resolve resource while parsing SignatureEnvironment document.", resourceResolver.getError()); - // we don't stop here, as we only _try_ to parse validating - } - - if (errorHandler.hasFatalErrors()) { - // log fatal errors - if (log.isInfoEnabled()) { - List<String> errorMessages = errorHandler.getErrorMessages(); - StringBuffer sb = new StringBuffer(); - for (String errorMessage : errorMessages) { - sb.append(" "); - sb.append(errorMessage); - } - log.info("XML document in which the signature is to be integrated cannot be parsed." + sb.toString()); - } - throw new SLCommandException(4101); - } - - // log parsed document - if (log.isTraceEnabled()) { - - StringWriter writer = new StringWriter(); - - writer.write("SignatureEnvironment:\n"); - - LSOutput output = domImplLS.createLSOutput(); - output.setCharacterStream(writer); - output.setEncoding("UTF-8"); - LSSerializer serializer = domImplLS.createLSSerializer(); - serializer.write(doc, output); - - log.trace(writer.toString()); - } - - return doc; - - } - - /** - * Creates an LSInput from the given <code>reference</code> URI. - * - * @param reference - * the reference URL - * - * @return an LSInput from the given <code>reference</code> URI - * - * @throws IOException - * if dereferencing the given <code>reference</code> fails - */ - private LSInput createLSInput(String reference) throws IOException { - - URLDereferencer urlDereferencer = URLDereferencer.getInstance(); - StreamData streamData = urlDereferencer.dereference(reference, ctx.getDereferencerContext()); - - String contentType = streamData.getContentType(); - String charset = HttpUtil.getCharset(contentType, true); - InputStreamReader streamReader; - try { - streamReader = new InputStreamReader(streamData.getStream(), charset); - } catch (UnsupportedEncodingException e) { - log.info("Charset " + charset + " not supported. Using default."); - streamReader = new InputStreamReader(streamData.getStream()); - } - - LSInput input = domImplLS.createLSInput(); - input = domImplLS.createLSInput(); - input.setCharacterStream(streamReader); - - return input; - - } - - /** - * Creates an LSInput from the given <code>content</code> bytes. - * - * @param content - * the content bytes - * - * @return an LSInput from the givne <code>content</code> bytes - */ - private LSInput createLSInput(byte[] content) { - - ByteArrayInputStream inputStream = new ByteArrayInputStream(content); - LSInput input = domImplLS.createLSInput(); - input.setByteStream(inputStream); - - return input; - - } - - /** - * Creates an LSInput from the given XML <code>content</code>. - * - * @param content - * the XML content - * @return an LSInput from the given XML <code>content</code> - * - * @throws XMLStreamException - * if reading the XMLStream from the given XML content fails - */ - private LSInput createLSInput(XMLContentType content) throws XMLStreamException { - - ByteArrayOutputStream redirectedStream = content.getRedirectedStream(); - if (redirectedStream != null) { - LSInput input = domImplLS.createLSInput(); - input.setByteStream(new ByteArrayInputStream(redirectedStream.toByteArray())); - return input; - } else { - return null; - } - - } - - /** - * Represents an <code>xsd:Id</code>-attribute value. - * - * @author mcentner - */ - private class IdAttribute { - - private Element element; - - private String namespaceURI; - - private String localName; - - } - - /** - * An implementation of the LSResourceResolver that uses a list of supplements - * to resolve resources. - * - * @author mcentner - */ - private class LSResourceResolverAdapter implements LSResourceResolver { - - List<DataObjectAssociationType> supplements; - - private LSResourceResolverAdapter( - List<DataObjectAssociationType> supplements) { - this.supplements = supplements; - } - - private Exception error; - - /** - * @return the error - */ - public Exception getError() { - return error; - } - - @Override - public LSInput resolveResource(String type, String namespaceURI, - String publicId, String systemId, String baseURI) { - - if (log.isTraceEnabled()) { - log.trace("Resolve resource :" + - "\n type=" + type + - "\n namespaceURI=" + namespaceURI + - "\n publicId=" + publicId + - "\n systemId=" + systemId + - "\n baseURI=" + baseURI); - } - - if (systemId != null) { - - log.debug("Resolve resource '" + systemId + "'."); - - for (DataObjectAssociationType supplement : supplements) { - - Base64XMLLocRefReqRefContentType content = supplement.getContent(); - if (content != null) { - - String reference = content.getReference(); - if (systemId.equals(reference)) { - - try { - if (content.getLocRefContent() != null) { - log.trace("Resolved resource '" + reference + "' to supplement with LocRefContent."); - return createLSInput(content.getLocRefContent()); - } else if (content.getBase64Content() != null) { - log.trace("Resolved resource '" + reference + "' to supplement with Base64Content."); - return createLSInput(content.getBase64Content()); - } else if (content.getXMLContent() != null) { - log.trace("Resolved resource '" + reference + "' to supplement with XMLContent."); - return createLSInput((XMLContentType) content.getXMLContent()); - } else { - return null; - } - } catch (IOException e) { - log.info("Failed to resolve resource '" + systemId + "' to supplement.", e); - error = e; - return null; - } catch (XMLStreamException e) { - log.info("Failed to resolve resource '" + systemId + "' to supplement.", e); - error = e; - return null; - } - - } - - } - - } - - log.info("Failed to resolve resource '" + systemId + "' to supplement. No such supplement."); - - } - - return null; - - } - - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureContext.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureContext.java deleted file mode 100644 index 0925f2fd..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureContext.java +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import javax.xml.crypto.dsig.DigestMethod;
-import javax.xml.crypto.dsig.XMLSignatureFactory;
-
-import org.w3c.dom.Document;
-
-import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext;
-
-/**
- * An instance of this class carries context information for a XML-Signature
- * created by the security layer command <code>CreateXMLSignature</code>.
- *
- * @author mcentner
- */
-public class SignatureContext {
-
- /**
- * The document going to contain the XML signature.
- */
- private Document document;
-
- /**
- * The IdValueFactory used to create <code>xsd:ID</code>-attribute values.
- */
- private IdValueFactory idValueFactory;
-
- /**
- * The XMLSignatureFactory to create XML signature objects.
- */
- private XMLSignatureFactory signatureFactory;
-
- /**
- * The URLDereferencerContext for dereferencing URLs.
- */
- private URLDereferencerContext dereferencerContext;
-
- /**
- * The DigestMethodFactory to create {@link DigestMethod} objects.
- */
- private AlgorithmMethodFactory digestMethodFactory;
-
- /**
- * @return the document
- */
- public Document getDocument() {
- return document;
- }
-
- /**
- * @param document the document to set
- */
- public void setDocument(Document document) {
- this.document = document;
- }
-
- /**
- * @return the idValueFactory
- */
- public IdValueFactory getIdValueFactory() {
- return idValueFactory;
- }
-
- /**
- * @param idValueFactory the idValueFactory to set
- */
- public void setIdValueFactory(IdValueFactory idValueFactory) {
- this.idValueFactory = idValueFactory;
- }
-
- /**
- * @return the signatureFactory
- */
- public XMLSignatureFactory getSignatureFactory() {
- return signatureFactory;
- }
-
- /**
- * @param signatureFactory the signatureFactory to set
- */
- public void setSignatureFactory(XMLSignatureFactory signatureFactory) {
- this.signatureFactory = signatureFactory;
- }
-
- /**
- * @return the dereferencerContext
- */
- public URLDereferencerContext getDereferencerContext() {
- return dereferencerContext;
- }
-
- /**
- * @param dereferencerContext the dereferencerContext to set
- */
- public void setDereferencerContext(URLDereferencerContext dereferencerContext) {
- this.dereferencerContext = dereferencerContext;
- }
-
- /**
- * @return the digestMethodFactory
- */
- public AlgorithmMethodFactory getAlgorithmMethodFactory() {
- return digestMethodFactory;
- }
-
- /**
- * @param digestMethodFactory the digestMethodFactory to set
- */
- public void setAlgorithmMethodFactory(AlgorithmMethodFactory digestMethodFactory) {
- this.digestMethodFactory = digestMethodFactory;
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureLocation.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureLocation.java deleted file mode 100644 index 5ec02893..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureLocation.java +++ /dev/null @@ -1,235 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import java.util.Iterator;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType;
-import at.gv.egiz.bku.slexceptions.SLCommandException;
-import at.gv.egiz.slbinding.impl.SignatureLocationType;
-
-/**
- * This class implements the <code>SignatureLocation</code> of an XML-Signature
- * to be created by the security layer command <code>CreateXMLSignature</code>.
- *
- * @author mcentner
- */
-public class SignatureLocation {
-
- /**
- * Logging facility.
- */
- private static Log log = LogFactory.getLog(SignatureLocation.class);
-
- /**
- * The SignatureContext for the XML signature
- */
- private SignatureContext ctx;
-
- /**
- * The parent node for the XML signature.
- */
- private Node parent;
-
- /**
- * The next sibling node for the XML signature.
- */
- private Node nextSibling;
-
- /**
- * Creates a new SignatureLocation with the given <code>signatureContext</code>
- *
- * @param signatureContext the context for the XML signature creation
- */
- public SignatureLocation(SignatureContext signatureContext) {
- this.ctx = signatureContext;
- }
-
- /**
- * @return the parent node for the XML signature
- */
- public Node getParent() {
- return parent;
- }
-
- /**
- * @param parent the parent for the XML signature
- */
- public void setParent(Node parent) {
- this.parent = parent;
- }
-
- /**
- * @return the next sibling node for the XML signature
- */
- public Node getNextSibling() {
- return nextSibling;
- }
-
- /**
- * @param nextSibling the next sibling node for the XML signature
- */
- public void setNextSibling(Node nextSibling) {
- this.nextSibling = nextSibling;
- }
-
- /**
- * Configures this SignatureLocation with the information provided by the
- * given <code>SignatureInfo</code> element.
- *
- * @param signatureInfo
- * the <code>SignatureInfo</code> element
- *
- * @throws SLCommandException
- * if configuring this SignatureLocation with given
- * <code>signatureInfo</code>fails
- */
- public void setSignatureInfo(SignatureInfoCreationType signatureInfo)
- throws SLCommandException {
-
- // evaluate signature location XPath ...
- SignatureLocationType signatureLocation = (SignatureLocationType) signatureInfo
- .getSignatureLocation();
-
- NamespaceContext namespaceContext = new MOAIDWorkaroundNamespaceContext(
- signatureLocation.getNamespaceContext());
-
- parent = evaluateSignatureLocation(signatureInfo.getSignatureLocation()
- .getValue(), namespaceContext, ctx.getDocument().getDocumentElement());
-
- // ... and index
- nextSibling = findNextSibling(parent, signatureInfo.getSignatureLocation()
- .getIndex().intValue());
-
- }
-
- /**
- * Evaluates the given <code>xpath</code> with the document element as context node
- * and returns the resulting node.
- *
- * @param xpath the XPath expression
- * @param nsContext the namespace context of the XPath expression
- * @param contextNode the context node for the XPath evaluation
- *
- * @return the result of evaluating the XPath expression
- *
- * @throws SLCommandException
- */
- private Node evaluateSignatureLocation(String xpath, NamespaceContext nsContext, Node contextNode) throws SLCommandException {
-
- Node node = null;
- try {
- XPathFactory xpathFactory = XPathFactory.newInstance();
- XPath xPath = xpathFactory.newXPath();
- xPath.setNamespaceContext(nsContext);
- XPathExpression xpathExpr = xPath.compile(xpath);
- node = (Node) xpathExpr.evaluate(contextNode, XPathConstants.NODE);
- } catch (XPathExpressionException e) {
- log.info("Failed to evaluate SignatureLocation XPath expression '" + xpath + "' on context node.", e);
- throw new SLCommandException(4102);
- }
-
- if (node == null) {
- log.info("Failed to evaluate SignatureLocation XPath expression '" + xpath + "'. Result is empty.");
- throw new SLCommandException(4102);
- }
-
- return node;
-
- }
-
- /**
- * Finds the next sibling node of the <code>parent</code>'s <code>n</code>-th child node
- * or <code>null</code> if there is no next sibling.
- *
- * @param parent the parent node
- * @param n the index of the child node
- *
- * @return the next sibling node of the node specified by <code>parent</code> and index <code>n</code>,
- * or <code>null</code> if there is no next sibling node.
- *
- * @throws SLCommandException if the <code>n</code>-th child of <code>parent</code> does not exist
- */
- private Node findNextSibling(Node parent, int n) throws SLCommandException {
-
- NodeList childNodes = parent.getChildNodes();
- Node childNode = childNodes.item(n);
- if (childNode == null) {
- log.info("SingatureLocation Index '" + n + "' not found in document.");
- throw new SLCommandException(4102);
- } else {
- return childNode.getNextSibling();
- }
-
- }
-
- /**
- * Workaround for a missing namespace prefix declaration in MOA-ID.
- *
- * @author mcentner
- */
- private class MOAIDWorkaroundNamespaceContext implements NamespaceContext {
-
- private NamespaceContext namespaceContext;
-
- public MOAIDWorkaroundNamespaceContext(NamespaceContext namespaceContext) {
- super();
- this.namespaceContext = namespaceContext;
- }
-
- @Override
- public String getNamespaceURI(String prefix) {
-
- String namespaceURI = namespaceContext.getNamespaceURI(prefix);
-
- if ((namespaceURI == null || XMLConstants.NULL_NS_URI.equals(namespaceURI)) && "saml".equals(prefix)) {
- namespaceURI = "urn:oasis:names:tc:SAML:1.0:assertion";
- log.debug("Namespace prefix '" + prefix + "' resolved to '" + namespaceURI + "' (MOA-ID Workaround).");
- } else {
- log.trace("Namespace prefix '" + prefix + "' resolved to '" + namespaceURI + "'.");
- }
-
- return namespaceURI;
- }
-
- @Override
- public String getPrefix(String namespaceURI) {
- return namespaceContext.getPrefix(namespaceURI);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Iterator getPrefixes(String namespaceURI) {
- return namespaceContext.getPrefixes(namespaceURI);
- }
-
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SimpleDOMErrorHandler.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SimpleDOMErrorHandler.java deleted file mode 100644 index 0d54adce..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/SimpleDOMErrorHandler.java +++ /dev/null @@ -1,98 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.w3c.dom.DOMError;
-import org.w3c.dom.DOMErrorHandler;
-
-/**
- * A simple DOMErrorHandler implementation.
- *
- * @author mcentner
- */
-public class SimpleDOMErrorHandler implements DOMErrorHandler {
-
- /**
- * Have there been errors reported?
- */
- private boolean errors = false;
-
- /**
- * Have there been fatal error reported?
- */
- private boolean fatalErrors = false;
-
- /**
- * The list of error messages of reported errors.
- */
- private List<String> errorMessages = new ArrayList<String>();
-
- /**
- * @return <code>true</code> if errors have been reported, or <code>false</code> otherwise
- */
- public boolean hasErrors() {
- return errors;
- }
-
- /**
- * @return <code>true</code> if fatal errors have been reported, or <code>false</code> otherwise
- */
- public boolean hasFatalErrors() {
- return fatalErrors;
- }
-
- /**
- * @return a list of error messages that have been reported
- */
- public List<String> getErrorMessages() {
- return errorMessages;
- }
-
- /* (non-Javadoc)
- * @see org.w3c.dom.DOMErrorHandler#handleError(org.w3c.dom.DOMError)
- */
- @Override
- public boolean handleError(DOMError error) {
-
- switch (error.getSeverity()) {
-
- case DOMError.SEVERITY_WARNING :
-// log.debug("[warning] " + error.getMessage());
- return true;
-
- case DOMError.SEVERITY_ERROR :
-// log.debug("[error] " + error.getMessage());
- errorMessages.add(error.getMessage());
- errors = true;
- return false;
-
- case DOMError.SEVERITY_FATAL_ERROR :
-// log.debug("[fatal error] " + error.getMessage());
- errorMessages.add(error.getMessage());
- fatalErrors = true;
- return false;
-
- default:
- return false;
- }
-
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/URIDereferncerAdapter.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/URIDereferncerAdapter.java deleted file mode 100644 index c94937be..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/URIDereferncerAdapter.java +++ /dev/null @@ -1,103 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import iaik.xml.crypto.utils.URIDereferencerImpl;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.xml.crypto.Data;
-import javax.xml.crypto.OctetStreamData;
-import javax.xml.crypto.URIDereferencer;
-import javax.xml.crypto.URIReference;
-import javax.xml.crypto.URIReferenceException;
-import javax.xml.crypto.XMLCryptoContext;
-
-import at.gv.egiz.bku.utils.urldereferencer.StreamData;
-import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer;
-import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext;
-
-/**
- * An URIDereferencer implementation that uses an {@link URLDereferencer} to
- * dereference.
- *
- * @author mcentner
- */
-public class URIDereferncerAdapter implements URIDereferencer {
-
- /**
- * The context for dereferencing.
- */
- protected URLDereferencerContext urlDereferencerContext;
-
- /**
- * Creates a new URIDereferencerAdapter instance with the given
- * <code>urlDereferencerContext</code>.
- *
- * @param urlDereferencerContext the context to be used for dereferencing
- */
- public URIDereferncerAdapter(URLDereferencerContext urlDereferencerContext) {
- super();
- this.urlDereferencerContext = urlDereferencerContext;
- }
-
- /* (non-Javadoc)
- * @see javax.xml.crypto.URIDereferencer#dereference(javax.xml.crypto.URIReference, javax.xml.crypto.XMLCryptoContext)
- */
- @Override
- public Data dereference(URIReference uriReference, XMLCryptoContext context)
- throws URIReferenceException {
-
- String uriString = uriReference.getURI();
- if (uriString == null) {
- return null;
- }
-
- URI uri;
- try {
- uri = new URI(uriString);
- } catch (URISyntaxException e) {
- throw new URIReferenceException(e.getMessage(), e);
- }
-
- if (uri.isAbsolute()) {
-
- URLDereferencer dereferencer = URLDereferencer.getInstance();
- StreamData streamData;
- try {
- streamData = dereferencer.dereference(uriString, urlDereferencerContext);
- } catch (IOException e) {
- throw new URIReferenceException(e.getMessage(), e);
- }
- return new OctetStreamData(streamData.getStream(), uriString, streamData.getContentType());
-
- } else {
-
- URIDereferencer uriDereferencer = context.getURIDereferencer();
- if (uriDereferencer == null || uriDereferencer == this) {
- uriDereferencer = new URIDereferencerImpl();
- }
-
- return uriDereferencer.dereference(uriReference, context);
-
- }
-
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTReference.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTReference.java deleted file mode 100644 index 6b388f2a..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTReference.java +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import iaik.xml.crypto.dsig.DigestMethodImpl;
-import iaik.xml.crypto.dsig.DigestValueImpl;
-import iaik.xml.crypto.dsig.ReferenceImpl;
-import iaik.xml.crypto.dsig.TransformImpl;
-import iaik.xml.crypto.dsig.TransformsImpl;
-
-import javax.xml.crypto.Data;
-import javax.xml.crypto.URIDereferencer;
-import javax.xml.crypto.URIReferenceException;
-import javax.xml.crypto.XMLCryptoContext;
-import javax.xml.crypto.dsig.DigestMethod;
-import javax.xml.crypto.dsig.TransformException;
-
-import at.gv.egiz.bku.slexceptions.SLCommandException;
-import at.gv.egiz.bku.slexceptions.SLExceptionMessages;
-
-/**
- * This class extends the XSECT ReferenceImpl to allow for the use
- * of already marshalled <code>ds:Transforms</code> elements for initialization.
- *
- * @author mcentner
- */
-public class XSECTReference extends ReferenceImpl {
-
- /**
- * The URIDereferencer to be used for dereferencing.
- */
- protected URIDereferencer dereferencer;
-
- /**
- * Creates a new instance of this XSECTReference with the given
- * <code>uri</code>, digest method, <code>transforms</code>, <code>type</code>
- * and <code>id</code> value.
- *
- * @param uri
- * the <code>URI</code>-attribute value (may be <code>null</code>)
- * @param dm
- * the digest method
- * @param transforms
- * a TransformsImpl element (may be <code>null</code>)
- * @param type
- * the <code>Type</code>-attribute value (may be <code>null</code>)
- * @param id
- * the <code>Id</code>-attribute value (may be <code>null</code>)
- *
- * @throws NullPointerException
- * if <code>digestMethod</code> is <code>null</code>
- * @throws IllegalArgumentException
- * if <code>uri</code> is not RFC 2396 compliant
- * @throws ClassCastException
- * if any of the <code>transforms</code> is not of type
- * {@link TransformImpl}
- */
- public XSECTReference(String uri, DigestMethod dm, TransformsImpl transforms, String type,
- String id) {
- super(uri, transforms, type, id);
- digestMethod_ = (DigestMethodImpl) dm;
- digestValue_ = new DigestValueImpl();
- }
-
- /* (non-Javadoc)
- * @see iaik.xml.crypto.dsig.ReferenceType#dereference(javax.xml.crypto.XMLCryptoContext)
- */
- @Override
- public Data dereference(XMLCryptoContext context) throws TransformException,
- URIReferenceException {
- if (dereferencer != null) {
- return dereferencer.dereference(this, context);
- } else {
- try {
- return super.dereference(context);
- } catch (URIReferenceException e) {
- SLCommandException commandException = new SLCommandException(4003,
- SLExceptionMessages.EC4003_NOT_RESOLVED, new Object[] { getURI() });
- throw new URIReferenceException("Failed to dereference data to-be signed.", commandException);
- }
- }
- }
-
- /**
- * @return the dereferencer to be used for dereferencing this reference
- */
- public URIDereferencer getDereferencer() {
- return dereferencer;
- }
-
- /**
- * @param dereferencer the dereferencer to be used for dereferencing this reference
- */
- public void setDereferencer(URIDereferencer dereferencer) {
- this.dereferencer = dereferencer;
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTTransforms.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTTransforms.java deleted file mode 100644 index a98e4236..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/XSECTTransforms.java +++ /dev/null @@ -1,124 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect;
-
-import iaik.xml.crypto.dsig.TransformImpl;
-import iaik.xml.crypto.dsig.TransformsImpl;
-
-import java.util.List;
-
-import javax.xml.crypto.MarshalException;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.Transform;
-
-import org.w3c.dom.Node;
-
-/**
- * This class extends the XSECT TransformsImpl to allow for the use of an
- * unmarshalled <code>ds:Transforms</code> element for initalization.
- *
- * @author mcentner
- */
-public class XSECTTransforms extends TransformsImpl {
-
- /**
- * Creates a new XSECTTransforms with the given list of <code>transforms</code>.
- *
- * @param transforms a list of {@link TransformImpl}s
- * @see TransformsImpl#TransformsImpl(List)
- */
- @SuppressWarnings("unchecked")
- public XSECTTransforms(List transforms) {
- super(transforms);
- }
-
- /**
- * Creates a new XSECTTransforms and initializes it from the given
- * <code>ds:Transforms</code> node.
- *
- * @param context the context used for unmarshalling
- * @param node the <code>ds:Transforms</code> node
- *
- * @throws MarshalException if unmarshalling the <code>ds:Transforms</code> fails
- */
- public XSECTTransforms(DOMCryptoContext context, Node node)
- throws MarshalException {
- super(context, node);
- }
-
- /**
- * Inserts the given <code>transform</code> at the top of the
- * transform list.
- *
- * @param transform the <code>ds:Transform</code> to instert
- */
- @SuppressWarnings("unchecked")
- public void insertTransform(Transform transform) {
- if (transform == null) {
- throw new NullPointerException("Parameter 'transform' must not be null.");
- }
- if (!(transform instanceof TransformImpl)) {
- throw new ClassCastException("Transform 'transform' must be of type '" + TransformImpl.class.getName() + "'.");
- }
- transforms_.add(0, transform);
- }
-
- /**
- * @return
- */
- @SuppressWarnings("unchecked")
- private List<TransformImpl> getTransformImpls() {
- return transforms_;
- }
-
- /* (non-Javadoc)
- * @see iaik.xml.crypto.dsig.TransformsType#marshal(javax.xml.crypto.dom.DOMCryptoContext, org.w3c.dom.Node, org.w3c.dom.Node)
- */
- @Override
- public Node marshal(DOMCryptoContext context, Node parent, Node nextSibling)
- throws MarshalException {
-
- if (getNode() != null) {
- // If this TransformsImpl has been unmarshalled from exiting nodes,
- // we don't want to re-marshal ...
- state_ = STATE_MARSHALED;
-
- // ... but append the existing node to the parent ...
- Node transformsNode = parent.insertBefore(getNode(), nextSibling);
-
- // ... and marshal any Transforms not yet marshalled (e.g. that
- // have been added via insertTransform().
- Node transformNextSibling = transformsNode.getFirstChild();
- List<TransformImpl> transforms = getTransformImpls();
- for (int i = 0; i < transforms.size(); i++) {
- TransformImpl transform = transforms.get(i);
- Node transformNode = transform.getNode();
- if (transformNode == null) {
- // marshall TransformImpl
- transformNode = transform.marshal(context, transformsNode, transformNextSibling);
- }
- transformNextSibling = transformNode.getNextSibling();
- }
-
- return transformsNode;
- } else {
- return super.marshal(context, parent, nextSibling);
- }
-
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLBindingException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLBindingException.java deleted file mode 100644 index 3f1732ba..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLBindingException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions;
-
-/**
- * Error in the binding to the transport protocol (2xxx)
- */
-public class SLBindingException extends SLException {
-
- public SLBindingException(int errorCode) {
- super(errorCode);
- }
-
- public SLBindingException(int errorCode, String msg, Object[] args) {
- super(errorCode, msg, args);
- }
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCanceledException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCanceledException.java deleted file mode 100644 index 8136a093..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCanceledException.java +++ /dev/null @@ -1,26 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions;
-
-public class SLCanceledException extends
- at.gv.egiz.bku.slexceptions.SLException {
-
- public SLCanceledException(int errorCode, String msg, Object[] args) {
- super(errorCode, msg, args);
- // TODO Auto-generated constructor stub
- }
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCommandException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCommandException.java deleted file mode 100644 index 73ae3325..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLCommandException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions;
-
-public class SLCommandException extends at.gv.egiz.bku.slexceptions.SLException {
-
- private static final long serialVersionUID = 1L;
-
- public SLCommandException(int errorCode) {
- super(errorCode);
- }
-
- public SLCommandException(int errorCode, String msg, Object[] args) {
- super(errorCode, msg, args);
- }
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLException.java deleted file mode 100644 index 4b541deb..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLException.java +++ /dev/null @@ -1,88 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions;
-
-import java.text.MessageFormat;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class SLException extends Exception {
-
- private static String RESOURCE_BUNDLE_BASE_NAME = "at.gv.egiz.bku.slexceptions.SLExceptionMessages";
-
- private static String MISSING_RESOURCE_PATTERN = "MISSING RESOURCE FOR ERROR MESSAGE: {0} ({1})";
-
- private static String ILLEGAL_ARGUMENT_MESSAGE = "MESSAGE FORMAT FAILED";
-
- private static final long serialVersionUID = 1L;
-
- private int errorCode;
-
- private String message;
-
- private Object[] arguments;
-
- public SLException(int errorCode) {
- this.errorCode = errorCode;
- this.message = SLExceptionMessages.STANDARD_PREFIX + Integer.toString(errorCode);
- }
-
- public SLException(int errorCode, String message, Object[] arguments) {
- this.errorCode = errorCode;
- this.message = message;
- this.arguments = arguments;
- }
-
- public int getErrorCode() {
- return errorCode;
- }
-
- public String getDetailedMsg() {
- return getLocalizedMessage();
- }
-
- @Override
- public String getLocalizedMessage() {
- return getLocalizedMessage(Locale.getDefault());
- }
-
- public String getLocalizedMessage(Locale locale) {
-
- String pattern;
- Object[] arguments = this.arguments;
- try {
- ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE_NAME, locale);
- pattern = bundle.getString(message);
- } catch (MissingResourceException e) {
- pattern = MISSING_RESOURCE_PATTERN;
- arguments = new Object[]{message, e.getMessage()};
- }
-
- String localizedMessage;
- try {
- localizedMessage = MessageFormat.format(pattern, arguments);
- } catch (IllegalArgumentException e) {
- localizedMessage = ILLEGAL_ARGUMENT_MESSAGE + ": " + pattern;
- }
-
- return localizedMessage;
-
- }
-
-
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLExceptionMessages.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLExceptionMessages.java deleted file mode 100644 index 73ac8d1b..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLExceptionMessages.java +++ /dev/null @@ -1,56 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions; - -public final class SLExceptionMessages { - - private SLExceptionMessages() { - } - - public static final String STANDARD_PREFIX = "ec"; - - // - // 3xxx - // - // Error in the XML structure of the command request - - public static final String EC3000_UNCLASSIFIED = "ec3000.unclassified"; - - public static final String EC3002_INVALID = "ec3002.invalid"; - - // - // 4xxx - // - // Error during command execution - - public static final String EC4000_UNCLASSIFIED_INFOBOX_INVALID = "ec4000.infobox.invalid"; - - public static final String EC4000_UNCLASSIFIED_IDLINK_TRANSFORMATION_FAILED = "ec4000.idlink.transfomation.failed"; - - public static final String EC4002_INFOBOX_UNKNOWN = "ec4002.infobox.unknown"; - - public static final String EC4003_NOT_RESOLVED = "ec4003.not.resolved"; - - public static final String EC4011_NOTIMPLEMENTED = "ec4011.notimplemented"; - - // - // Legacy error codes - // - - public static final String LEC2901_NOTIMPLEMENTED = "lec2901.notimplemented"; - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRequestException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRequestException.java deleted file mode 100644 index 548732e6..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRequestException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions;
-
-public class SLRequestException extends SLException {
-
- public SLRequestException(int errorCode) {
- super(errorCode);
- // TODO Auto-generated constructor stub
- }
-
- public SLRequestException(int errorCode, String msg, Object[] args) {
- super(errorCode, msg, args);
- // TODO Auto-generated constructor stub
- }
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRuntimeException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRuntimeException.java deleted file mode 100644 index d09ca418..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLRuntimeException.java +++ /dev/null @@ -1,37 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions;
-
-public class SLRuntimeException extends RuntimeException {
-
- public SLRuntimeException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public SLRuntimeException(String message) {
- super(message);
- }
-
- public SLRuntimeException(Throwable cause) {
- super(cause);
- }
-
- public SLRuntimeException() {
- }
-
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLVersionException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLVersionException.java deleted file mode 100644 index 45501746..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLVersionException.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egiz.bku.slexceptions; - -public class SLVersionException extends SLException { - - private static final long serialVersionUID = 1L; - - protected String namespaceURI; - - public SLVersionException(String namespaceURI) { - super(2901, SLExceptionMessages.LEC2901_NOTIMPLEMENTED, new Object[] {namespaceURI}); - this.namespaceURI = namespaceURI; - } - - public SLVersionException(int errorCode, String namespaceURI) { - super(errorCode); - this.namespaceURI = namespaceURI; - } - - public SLVersionException(int errorCode, String namespaceURI, String message, Object[] arguments) { - super(errorCode, message, arguments); - this.namespaceURI = namespaceURI; - } - - public String getNamespaceURI() { - return namespaceURI; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLViewerException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLViewerException.java deleted file mode 100644 index 853328d5..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/slexceptions/SLViewerException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slexceptions;
-
-public class SLViewerException extends SLException {
- - public SLViewerException(int errorCode) { - super(errorCode); - } - - public SLViewerException(int errorCode, String msg, Object[] args) {
- super(errorCode, msg, args);
- }
-}
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ResourceFontLoader.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ResourceFontLoader.java deleted file mode 100644 index 8cab581d..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ResourceFontLoader.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.viewer; - -import at.gv.egiz.bku.gui.viewer.FontProviderException; -import at.gv.egiz.bku.gui.viewer.FontProvider; -import java.awt.Font; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Loads font(s) as classpath resource. - * Loaded fonts are shared within all instances in this VM (classloader) - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public class ResourceFontLoader implements FontProvider { - - public static final String FONT_RESOURCE = "DejaVuLGCSansMono.ttf"; - - protected final static Log log = LogFactory.getLog(ResourceFontLoader.class); - - /** TextValidator and (local) SecureViewerDialog (see LocalStalFactory) use ResourceFontLoader, load resource only once */ - protected static Font font; - - /** - * - * @return - * @throws FontProviderException encapsulating FontFormatException (if resource doesn't contain the plain format) - * or IOException (if resource cannot be retrieved) - */ - @Override - public Font getFont() throws FontProviderException { - if (font == null) { - try { - if (log.isDebugEnabled()) { - log.debug("loading " + getClass().getClassLoader().getResource(FONT_RESOURCE)); - } - font = Font.createFont(Font.PLAIN, getClass().getClassLoader().getResourceAsStream(FONT_RESOURCE)); - } catch (Exception ex) { - log.error("failed to load font", ex); - throw new FontProviderException("failed to load font", ex); - } - } - log.trace("font resource loaded"); - return font; - } -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidationException.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidationException.java deleted file mode 100644 index fb332a09..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidationException.java +++ /dev/null @@ -1,38 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.viewer; - -public class ValidationException extends Exception { - - private static final long serialVersionUID = 1L; - - public ValidationException() { - } - - public ValidationException(String message) { - super(message); - } - - public ValidationException(Throwable cause) { - super(cause); - } - - public ValidationException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/Validator.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/Validator.java deleted file mode 100644 index 08b21080..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/Validator.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.viewer; - -import java.io.InputStream; - -public interface Validator { - - public void validate(InputStream is, String charset) throws ValidationException; - -} diff --git a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java b/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java deleted file mode 100644 index ad9bf6bb..00000000 --- a/mocca-1.2.11/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.viewer; - -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.net.URL; -import java.util.Collections; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -public class ValidatorFactory { - - /** - * Logging facility. - */ - protected static Log log = LogFactory.getLog(ValidatorFactory.class); - - private static final Class<Validator> VALIDATOR_CLASS = Validator.class; - - private static final String SERVICE_ID = "META-INF/services/" + VALIDATOR_CLASS.getName(); - - /** - * Creates a new Validator for the given <code>mimeType</code>. - * - * @param mimeType - * - * @return - * - * @throws IllegalArgumentException - * if no Validator for the <code>mimeType</code> could be found - */ - public static Validator newValidator(String mimeType) throws IllegalArgumentException { - - ClassLoader classLoader = ValidatorFactory.class.getClassLoader(); - ValidatorFactory factory = new ValidatorFactory(classLoader); - - Validator validator = factory.createValidator(mimeType); - - if (validator == null) { - throw new IllegalArgumentException("Validator for '" + mimeType - + "' could not be found."); - } - - return validator; - - } - - private ClassLoader classLoader; - - /** - * Private constructor. - * - * @param classLoader must not be <code>null</code> - */ - private ValidatorFactory(ClassLoader classLoader) { - - if (classLoader == null) { - throw new NullPointerException("Argument 'classLoader' must no be null."); - } - - this.classLoader = classLoader; - - } - - private Validator createValidator(String mimeType) { - - Iterator<URL> serviceIterator = createServiceIterator(); - while (serviceIterator.hasNext()) { - URL url = serviceIterator.next(); - - Properties properties = new Properties(); - try { - properties.load(url.openStream()); - } catch (IOException e) { - log.error("Failed to load service properties " + url.toExternalForm()); - continue; - } - String className = properties.getProperty(mimeType); - if (className != null) { - try { - return createValidatorInstance(className); - } catch (Exception e) { - continue; - } - } - - } - - return null; - - } - - /** - * - * @throws InvocationTargetException if className's (nullary) constructor throws exception - */ - private Validator createValidatorInstance(String className) - throws ClassNotFoundException, InstantiationException, - IllegalAccessException, NoSuchMethodException, InvocationTargetException { - - try { - Constructor<?> implConstructor = classLoader.loadClass(className).getConstructor((Class[])null); - return (Validator) implConstructor.newInstance((Object[])null); - } catch (InvocationTargetException ex) { - //ex from constructor - log.error("Failed to initialize validator class '" + className + "': " + ex.getCause().getMessage(), ex.getCause()); - throw ex; - } catch (NoSuchMethodException ex) { - log.error("Validator class '" + className + "' has no nullary constructor", ex); - throw ex; - } catch (ClassNotFoundException e) { - log.error("Validator class '" + className + "' not found.", e); - throw e; - } catch (InstantiationException e) { - log.error("Faild to initialize validator class '" + className + "'.", e); - throw e; - } catch (IllegalAccessException e) { - log.error("Faild to initialize validator class '" + className + "'.", e); - throw e; - } catch (ClassCastException e) { - log.error("Class '" + className + "' is not a validator implementation.", e); - throw e; - } - - } - - private Iterator<URL> createServiceIterator() { - - try { - final Enumeration<URL> resources = classLoader.getResources(SERVICE_ID); - return new Iterator<URL> () { - - @Override - public boolean hasNext() { - return resources.hasMoreElements(); - } - - @Override - public URL next() { - return resources.nextElement(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - }; - } catch (IOException e) { - log.error("Failed to enumerate resources " + SERVICE_ID); - List<URL> list = Collections.emptyList(); - return list.iterator(); - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/accesscontrol/config/AccessControl.xsd b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/accesscontrol/config/AccessControl.xsd deleted file mode 100644 index 9031ea78..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/accesscontrol/config/AccessControl.xsd +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ ---> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xs:element name="AccessControl"> - <xs:complexType> - <xs:sequence> - <xs:element ref="Chains"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="Chains"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="Chain"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="Chain"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" ref="Rules"/> - </xs:sequence> - <xs:attribute name="Id" type="xs:ID"/> - </xs:complexType> - </xs:element> - - <xs:element name="Rules"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="Rule"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="Rule"> - <xs:complexType> - <xs:sequence> - <xs:element ref="AuthClass"/> - <xs:choice minOccurs="0"> - <xs:element name="DomainName" type="xs:string"/> - <xs:element name="IPv4Address" type="xs:string"/> - <xs:element name="URL" type="xs:string"/> - </xs:choice> - <xs:element ref="Command" minOccurs="0"/> - <xs:element ref="Action" /> - <xs:element ref="UserInteraction"/> - </xs:sequence> - <xs:attribute name="Id" type="xs:ID" use="optional"/> - </xs:complexType> - </xs:element> - - <xs:element name="AuthClass"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="anonymous"/> - <xs:enumeration value="pseudoanonymous"/> - <xs:enumeration value="certified"/> - <xs:enumeration value="certifiedGovAgency"/> - </xs:restriction> - </xs:simpleType> - </xs:element> - - <xs:element name="Command"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="Param"/> - </xs:sequence> - <xs:attribute name="Name" use="required"/> - </xs:complexType> - </xs:element> - - <xs:element name="Param"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:string"> - <xs:attribute name="Name" use="required" type="xs:NCName"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - - <xs:element name="Action"> - <xs:complexType> - <xs:choice> - <!--xs:element name="ChainRef" type="xs:IDREF"/--> - <xs:element name="ChainRef" type="xs:string"/> - <xs:element name="RuleAction"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="allow"/> - <xs:enumeration value="deny"/> - </xs:restriction> - </xs:simpleType> - </xs:element> - </xs:choice> - </xs:complexType> - </xs:element> - - <xs:element name="UserInteraction"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="none"/> - <xs:enumeration value="info"/> - <xs:enumeration value="confirm"/> - <xs:enumeration value="confirmWithSecret"/> - </xs:restriction> - </xs:simpleType> - </xs:element> -</xs:schema> diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd deleted file mode 100644 index 594e4415..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core-1.2.xsd +++ /dev/null @@ -1,877 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!-- Securitylayer, Schnittstellenspezifikation -->
-<!-- XML-Schema fuer Schnittstellenspezifikation Version 1.2.2 -->
-<!-- 01. 03. 2005, Bundeskanzleramt, Stabsstelle IKT-Strategie, Technik und Standards -->
-<xsd:schema targetNamespace="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2.1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
- <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
- <!--###################################################################### -->
- <!--# Create CMS Signature # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Create CMS Signature Request = -->
- <!--====================================================================== -->
- <xsd:element name="CreateCMSSignatureRequest" type="CreateCMSSignatureRequestType"/>
- <xsd:complexType name="CreateCMSSignatureRequestType">
- <xsd:sequence>
- <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
- <xsd:element name="DataObject" type="CMSDataObjectRequiredMetaType"/>
- </xsd:sequence>
- <xsd:attribute name="Structure" use="required">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="detached"/>
- <xsd:enumeration value="enveloping"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- </xsd:complexType>
- <xsd:complexType name="CMSDataObjectRequiredMetaType">
- <xsd:complexContent>
- <xsd:restriction base="CMSDataObjectOptionalMetaType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType"/>
- <xsd:element name="Content" type="Base64OptRefContentType"/>
- </xsd:sequence>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="CMSDataObjectOptionalMetaType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
- <xsd:element name="Content" type="Base64OptRefContentType"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Create CMS Siganture Response = -->
- <!--====================================================================== -->
- <xsd:element name="CreateCMSSignatureResponse" type="CreateCMSSignatureResponseType"/>
- <xsd:complexType name="CreateCMSSignatureResponseType">
- <xsd:sequence>
- <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Create XML Signature # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Create XML Signature Request = -->
- <!--====================================================================== -->
- <xsd:element name="CreateXMLSignatureRequest" type="CreateXMLSignatureRequestType"/>
- <xsd:complexType name="CreateXMLSignatureRequestType">
- <xsd:sequence>
- <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
- <xsd:element name="DataObjectInfo" type="DataObjectInfoType" maxOccurs="unbounded"/>
- <xsd:element name="SignatureInfo" type="SignatureInfoCreationType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="SignatureInfoCreationType">
- <xsd:sequence>
- <xsd:element name="SignatureEnvironment" type="Base64XMLOptRefContentType"/>
- <xsd:element name="SignatureLocation">
- <xsd:complexType>
- <xsd:simpleContent>
- <xsd:extension base="xsd:token">
- <xsd:attribute name="Index" type="xsd:nonNegativeInteger" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="MetaInfoType">
- <xsd:sequence>
- <xsd:element name="MimeType" type="MimeTypeType"/>
- <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="DataObjectInfoType">
- <xsd:sequence>
- <xsd:element name="DataObject" type="Base64XMLLocRefOptRefContentType"/>
- <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
- <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="Structure" use="required">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="detached"/>
- <xsd:enumeration value="enveloping"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- </xsd:complexType>
- <xsd:complexType name="TransformsInfoType">
- <xsd:sequence>
- <xsd:element ref="dsig:Transforms" minOccurs="0"/>
- <xsd:element name="FinalDataMetaInfo" type="MetaInfoType"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Create XML Signature Response = -->
- <!--====================================================================== -->
- <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
- <xsd:complexType name="CreateXMLSignatureResponseType">
- <xsd:sequence>
- <xsd:any namespace="##any" processContents="lax"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Verify CMS Signature # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Verify CMS Signature Request = -->
- <!--====================================================================== -->
- <xsd:element name="VerifyCMSSignatureRequest" type="VerifyCMSSignatureRequestType"/>
- <xsd:complexType name="VerifyCMSSignatureRequestType">
- <xsd:sequence>
- <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
- <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
- <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
- </xsd:complexType>
- <xsd:simpleType name="SignatoriesType">
- <xsd:union memberTypes="AllSignatoriesType">
- <xsd:simpleType>
- <xsd:list itemType="xsd:positiveInteger"/>
- </xsd:simpleType>
- </xsd:union>
- </xsd:simpleType>
- <xsd:simpleType name="AllSignatoriesType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="all"/>
- </xsd:restriction>
- </xsd:simpleType>
- <!--====================================================================== -->
- <!--= Verify CMS Signature Response = -->
- <!--====================================================================== -->
- <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
- <xsd:complexType name="VerifyCMSSignatureResponseType">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
- <xsd:element name="SignatureCheck" type="CheckResultType"/>
- <xsd:element name="CertificateCheck" type="CheckResultType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="QualifiedCertificate"/>
- <!--###################################################################### -->
- <!--# Verify XML Signature # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Verify XML Signature Request = -->
- <!--====================================================================== -->
- <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
- <xsd:complexType name="VerifyXMLSignatureRequestType">
- <xsd:sequence>
- <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
- <xsd:element name="SignatureInfo" type="SignatureInfoVerificationType"/>
- <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="SignatureInfoVerificationType">
- <xsd:sequence>
- <xsd:element name="SignatureEnvironment" type="Base64XMLOptRefContentType"/>
- <xsd:element name="SignatureLocation" type="xsd:token"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Verify XML Signature Response = -->
- <!--====================================================================== -->
- <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
- <xsd:complexType name="VerifyXMLSignatureResponseType">
- <xsd:sequence>
- <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
- <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
- <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType"/>
- <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="CertificateCheck" type="CheckResultType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="ReferencesCheckResultType">
- <xsd:sequence>
- <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
- <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
- <xsd:sequence>
- <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="ManifestRefsCheckResultType">
- <xsd:sequence>
- <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
- <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
- <xsd:sequence>
- <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
- <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CheckResultType">
- <xsd:sequence>
- <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
- <xsd:element name="Info" type="AnyMixedChildrenType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Encrypt a CMS message # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Encrypt a CMS message: Request = -->
- <!--====================================================================== -->
- <xsd:element name="EncryptCMSRequest" type="EncryptCMSRequestType"/>
- <xsd:complexType name="EncryptCMSRequestType">
- <xsd:sequence>
- <xsd:element name="RecipientPublicKey" type="CMSRecipientPublicKeyType" maxOccurs="unbounded"/>
- <xsd:element name="ToBeEncrypted" type="CMSToBeEncryptedType"/>
- </xsd:sequence>
- <xsd:attribute name="ReturnBinaryResult" type="xsd:boolean" use="optional" default="false"/>
- </xsd:complexType>
- <xsd:complexType name="CMSToBeEncryptedType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType"/>
- <xsd:element name="Content" type="Base64OptRefContentType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CMSRecipientPublicKeyType">
- <xsd:choice>
- <xsd:element name="X509Certificate" type="xsd:base64Binary"/>
- </xsd:choice>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Encrypt a CMS message: Response = -->
- <!--====================================================================== -->
- <xsd:element name="EncryptCMSResponse" type="EncryptCMSResponseType"/>
- <xsd:complexType name="EncryptCMSResponseType">
- <xsd:sequence>
- <xsd:element name="CMSMessage" type="xsd:base64Binary"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Decrypt a CMS message # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Decrypt a CMS message: Request = -->
- <!--====================================================================== -->
- <xsd:element name="DecryptCMSRequest" type="DecryptCMSRequestType"/>
- <xsd:complexType name="DecryptCMSRequestType">
- <xsd:sequence>
- <xsd:element name="CMSMessage" type="xsd:base64Binary"/>
- <xsd:element name="EncryptedContent" type="CMSEncryptedContentType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="ReturnResult" type="ReturnResultType" use="optional" default="xml"/>
- </xsd:complexType>
- <xsd:complexType name="CMSEncryptedContentType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
- <xsd:element name="Content" type="Base64OptRefContentType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="ReturnResultType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="binary"/>
- <xsd:enumeration value="xml"/>
- <xsd:enumeration value="none"/>
- </xsd:restriction>
- </xsd:simpleType>
- <!--====================================================================== -->
- <!--= Decrypt a CMS message: Response = -->
- <!--====================================================================== -->
- <xsd:element name="DecryptCMSResponse" type="DecryptCMSResponseType"/>
- <xsd:complexType name="DecryptCMSResponseType">
- <xsd:sequence>
- <xsd:element name="DecryptedData" type="xsd:base64Binary"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Encrypt an XML document # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Encrypt an XML document: Request = -->
- <!--====================================================================== -->
- <xsd:element name="EncryptXMLRequest">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="EncryptXMLRequestType"/>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:complexType name="EncryptXMLRequestType">
- <xsd:sequence>
- <xsd:element name="RecipientPublicKey" type="XMLRecipientPublicKeyType" maxOccurs="unbounded"/>
- <xsd:element name="ToBeEncrypted" type="ToBeEncryptedType" maxOccurs="unbounded"/>
- <xsd:element name="EncryptionInfo" type="EncryptionInfoType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="ToBeEncryptedType">
- <xsd:choice>
- <xsd:element name="Element">
- <xsd:complexType>
- <xsd:attribute name="Selector" type="xsd:token" use="required"/>
- <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="ElementContent">
- <xsd:complexType>
- <xsd:attribute name="Selector" type="xsd:token" use="required"/>
- <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="New" type="XMLToBeEncryptedNewType"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="XMLToBeEncryptedNewType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType"/>
- <xsd:element name="Content" type="XMLToBeEncryptedNewContentType"/>
- </xsd:sequence>
- <xsd:attribute name="ParentSelector" type="xsd:token" use="required"/>
- <xsd:attribute name="NodeCount" type="xsd:nonNegativeInteger" use="required"/>
- </xsd:complexType>
- <xsd:complexType name="XMLToBeEncryptedNewContentType">
- <xsd:complexContent>
- <xsd:extension base="Base64XMLLocRefContentType">
- <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="XMLRecipientPublicKeyType">
- <xsd:choice>
- <xsd:element ref="dsig:KeyValue"/>
- <xsd:element name="X509Certificate" type="xsd:base64Binary"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="EncryptionInfoType">
- <xsd:sequence>
- <xsd:element name="EncryptionEnvironment" type="Base64XMLOptRefContentType"/>
- <xsd:element name="EncryptedKeyLocation" minOccurs="0">
- <xsd:complexType>
- <xsd:attribute name="ParentSelector" type="xsd:token" use="required"/>
- <xsd:attribute name="NodeCount" type="xsd:nonNegativeInteger" use="required"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Encrypt an XML document: Response = -->
- <!--====================================================================== -->
- <xsd:element name="EncryptXMLResponse" type="EncryptXMLResponseType"/>
- <xsd:complexType name="EncryptXMLResponseType">
- <xsd:sequence>
- <xsd:element name="EncryptionEnvironment">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:any namespace="##any" processContents="lax"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="EncryptedData" type="EncryptedDataType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="EncryptedDataType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:base64Binary">
- <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Decrypt an XML document # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Decrypt an XML document: Request = -->
- <!--====================================================================== -->
- <xsd:element name="DecryptXMLRequest" type="DecryptXMLRequestType"/>
- <xsd:complexType name="DecryptXMLRequestType">
- <xsd:sequence>
- <xsd:element name="EncryptedContent" type="Base64XMLOptRefContentType"/>
- <xsd:element name="EncrElemsSelector" type="xsd:string"/>
- <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="ReturnResult" type="ReturnResultType" use="optional" default="xml"/>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Decrypt an XML document: Response = -->
- <!--====================================================================== -->
- <xsd:element name="DecryptXMLResponse" type="DecryptXMLResponseType"/>
- <xsd:complexType name="DecryptXMLResponseType">
- <xsd:sequence minOccurs="0">
- <xsd:element name="CandidateDocument" type="XMLContentType"/>
- <xsd:element name="DecryptedBinaryData" minOccurs="0" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:simpleContent>
- <xsd:extension base="xsd:base64Binary">
- <xsd:attribute name="EncrElemSelector" type="xsd:string" use="required"/>
- <xsd:attribute name="MimeType" type="xsd:string" use="optional"/>
- <xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Hashing # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Hash Computation Request = -->
- <!--====================================================================== -->
- <xsd:element name="CreateHashRequest" type="CreateHashRequestType"/>
- <xsd:complexType name="CreateHashRequestType">
- <xsd:sequence>
- <xsd:element name="HashInfo" type="CreateHashInfoRequestType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CreateHashInfoRequestType">
- <xsd:sequence>
- <xsd:element name="HashData" type="HashDataType"/>
- <xsd:element name="HashAlgorithm" type="xsd:anyURI"/>
- <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="RespondHashData" type="xsd:boolean" use="required"/>
- </xsd:complexType>
- <xsd:complexType name="HashDataType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType"/>
- <xsd:element name="Content" type="Base64XMLOptRefContentType"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Hash Computation Response = -->
- <!--====================================================================== -->
- <xsd:element name="CreateHashResponse" type="CreateHashResponseType"/>
- <xsd:complexType name="CreateHashResponseType">
- <xsd:sequence>
- <xsd:element name="HashInfo" type="CreateHashInfoResponseType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CreateHashInfoResponseType">
- <xsd:sequence>
- <xsd:element name="HashData" type="HashDataType" minOccurs="0"/>
- <xsd:element name="HashAlgorithm" type="xsd:anyURI"/>
- <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
- <xsd:element name="HashValue" type="xsd:base64Binary"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Hash Verification Request = -->
- <!--====================================================================== -->
- <xsd:element name="VerifyHashRequest" type="VerifyHashRequestType"/>
- <xsd:complexType name="VerifyHashRequestType">
- <xsd:sequence>
- <xsd:element name="HashInfo" type="VerifyHashInfoRequestType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="VerifyHashInfoRequestType">
- <xsd:sequence>
- <xsd:element name="HashData" type="HashDataType"/>
- <xsd:element name="HashAlgorithm" type="xsd:anyURI"/>
- <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
- <xsd:element name="HashValue" type="xsd:base64Binary"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Hash Verification Response = -->
- <!--====================================================================== -->
- <xsd:element name="VerifyHashResponse" type="VerifyHashResponseType"/>
- <xsd:complexType name="VerifyHashResponseType">
- <xsd:sequence>
- <xsd:element name="VerificationResult" type="VerificationResultType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="VerificationResultType">
- <xsd:sequence>
- <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
- <xsd:element name="Result" type="xsd:boolean"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Infobox Commands # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Check Available Infoboxes Request = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxAvailableRequest" type="InfoboxAvailableRequestType"/>
- <xsd:complexType name="InfoboxAvailableRequestType"/>
- <!--====================================================================== -->
- <!--= Check Available Infoboxes Response = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxAvailableResponse" type="InfoboxAvailableResponseType"/>
- <xsd:complexType name="InfoboxAvailableResponseType">
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Create Infobox Request = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxCreateRequest" type="InfoboxCreateRequestType"/>
- <xsd:complexType name="InfoboxCreateRequestType">
- <xsd:sequence>
- <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
- <xsd:element name="InfoboxType" type="InfoboxTypeType"/>
- <xsd:element name="Creator" type="xsd:string"/>
- <xsd:element name="Purpose" type="xsd:string"/>
- <xsd:element name="ReadAccessAuthorization" type="AccessAuthorizationType" minOccurs="0"/>
- <xsd:element name="UpdateAccessAuthorization" type="AccessAuthorizationType" minOccurs="0"/>
- <xsd:element name="ReadUserConfirmation" type="UserConfirmationType" minOccurs="0"/>
- <xsd:element name="UpdateUserConfirmation" type="UserConfirmationType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="InfoboxTypeType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="BinaryFile"/>
- <xsd:enumeration value="AssocArray"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="AccessAuthorizationType">
- <xsd:sequence>
- <xsd:element name="RequesterID" type="RequesterIDType" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="UserMayChange" type="xsd:boolean" use="required"/>
- </xsd:complexType>
- <xsd:simpleType name="RequesterIDSimpleType">
- <xsd:restriction base="xsd:string"/>
- </xsd:simpleType>
- <xsd:complexType name="RequesterIDType">
- <xsd:simpleContent>
- <xsd:extension base="RequesterIDSimpleType">
- <xsd:attribute name="AuthenticationClass" type="AuthenticationClassType" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <xsd:complexType name="UserConfirmationType">
- <xsd:simpleContent>
- <xsd:extension base="UserConfirmationSimpleType">
- <xsd:attribute name="UserMayChange" type="xsd:boolean" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <xsd:simpleType name="UserConfirmationSimpleType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="none"/>
- <xsd:enumeration value="info"/>
- <xsd:enumeration value="confirm"/>
- <xsd:enumeration value="confirmWithSecret"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="AuthenticationClassType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="anonym"/>
- <xsd:enumeration value="pseudoanonym"/>
- <xsd:enumeration value="certified"/>
- <xsd:enumeration value="certifiedGovAgency"/>
- </xsd:restriction>
- </xsd:simpleType>
- <!--====================================================================== -->
- <!--= Create Infobox Response = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxCreateResponse" type="InfoboxCreateResponseType"/>
- <xsd:complexType name="InfoboxCreateResponseType"/>
- <!--====================================================================== -->
- <!--= Delete Infobox Request = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxDeleteRequest" type="InfoboxDeleteRequestType"/>
- <xsd:complexType name="InfoboxDeleteRequestType">
- <xsd:sequence>
- <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Delete Infobox Response = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxDeleteResponse" type="InfoboxDeleteResponseType"/>
- <xsd:complexType name="InfoboxDeleteResponseType"/>
- <!--====================================================================== -->
- <!--= Read Infobox Request = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxReadRequest" type="InfoboxReadRequestType"/>
- <xsd:complexType name="InfoboxReadRequestType">
- <xsd:sequence>
- <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
- <xsd:choice>
- <xsd:element name="BinaryFileParameters" type="InfoboxReadParamsBinaryFileType"/>
- <xsd:element name="AssocArrayParameters" type="InfoboxReadParamsAssocArrayType"/>
- </xsd:choice>
- <xsd:element name="BoxSpecificParameters" type="AnyChildrenType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="InfoboxReadParamsBinaryFileType">
- <xsd:attribute name="ContentIsXMLEntity" type="xsd:boolean" use="optional" default="false"/>
- </xsd:complexType>
- <xsd:complexType name="InfoboxReadParamsAssocArrayType">
- <xsd:choice>
- <xsd:element name="ReadKeys">
- <xsd:complexType>
- <xsd:attribute name="SearchString" type="WildCardSearchStringType" use="required"/>
- <xsd:attribute name="UserMakesUnique" type="xsd:boolean" use="optional" default="false"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="ReadPairs">
- <xsd:complexType>
- <xsd:attribute name="SearchString" type="WildCardSearchStringType" use="required"/>
- <xsd:attribute name="UserMakesUnique" type="xsd:boolean" use="optional" default="false"/>
- <xsd:attribute name="ValuesAreXMLEntities" type="xsd:boolean" use="optional" default="false"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="ReadValue">
- <xsd:complexType>
- <xsd:attribute name="Key" type="BoxIdentifierType" use="required"/>
- <xsd:attribute name="ValueIsXMLEntity" type="xsd:boolean" use="optional" default="false"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- <xsd:element name="IdentityLinkDomainIdentifier" type="xsd:anyURI"/>
- <!--====================================================================== -->
- <!--= Read Infobox Response = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxReadResponse" type="InfoboxReadResponseType"/>
- <xsd:complexType name="InfoboxReadResponseType">
- <xsd:choice>
- <xsd:element name="BinaryFileData" type="Base64XMLContentType"/>
- <xsd:element name="AssocArrayData" type="InfoboxReadDataAssocArrayType"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="InfoboxReadDataAssocArrayType">
- <xsd:choice>
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="Key" type="BoxIdentifierType"/>
- </xsd:sequence>
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="Pair" type="InfoboxAssocArrayPairType"/>
- </xsd:sequence>
- </xsd:choice>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Update Infobox Request = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxUpdateRequest" type="InfoboxUpdateRequestType"/>
- <xsd:complexType name="InfoboxUpdateRequestType">
- <xsd:sequence>
- <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
- <xsd:choice>
- <xsd:element name="BinaryFileParameters" type="Base64XMLContentType"/>
- <xsd:element name="AssocArrayParameters" type="InfoboxUpdateParamsAssocArrayType"/>
- </xsd:choice>
- <xsd:element name="BoxSpecificParameters" type="AnyChildrenType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="InfoboxUpdateParamsAssocArrayType">
- <xsd:choice>
- <xsd:element name="UpdateKey">
- <xsd:complexType>
- <xsd:attribute name="Key" type="xsd:token" use="required"/>
- <xsd:attribute name="NewKey" type="xsd:token" use="required"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="UpdateValue" type="InfoboxAssocArrayPairType"/>
- <xsd:element name="DeletePair">
- <xsd:complexType>
- <xsd:attribute name="Key" type="xsd:token" use="required"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Update Infobox Response = -->
- <!--====================================================================== -->
- <xsd:element name="InfoboxUpdateResponse" type="InfoboxUpdateResponseType"/>
- <xsd:complexType name="InfoboxUpdateResponseType"/>
- <!--###################################################################### -->
- <!--# Null-Operation # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Null-Operation ReQuest = -->
- <!--====================================================================== -->
- <xsd:element name="NullOperationRequest" type="NullOperationRequestType"/>
- <xsd:complexType name="NullOperationRequestType"/>
- <!--====================================================================== -->
- <!--= Null-Operation Response = -->
- <!--====================================================================== -->
- <xsd:element name="NullOperationResponse" type="NullOperationResponseType"/>
- <xsd:complexType name="NullOperationResponseType"/>
- <!--###################################################################### -->
- <!--# Get Properties # -->
- <!--###################################################################### -->
- <xsd:element name="GetPropertiesRequest">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="GetPropertiesRequestType"/>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:complexType name="GetPropertiesRequestType"/>
- <!--====================================================================== -->
- <!--= Get Properties Response = -->
- <!--====================================================================== -->
- <xsd:element name="GetPropertiesResponse" type="GetPropertiesResponseType"/>
- <xsd:complexType name="GetPropertiesResponseType">
- <xsd:sequence>
- <xsd:element name="ViewerMediaType" type="MimeTypeType" maxOccurs="unbounded"/>
- <xsd:element name="XMLSignatureTransform" type="xsd:anyURI" maxOccurs="unbounded"/>
- <xsd:element name="KeyboxIdentifier" type="QualifiedBoxIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="Binding" type="BindingType" maxOccurs="unbounded"/>
- <xsd:element name="ProtocolVersion" type="xsd:token" maxOccurs="unbounded"/>
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="BindingType">
- <xsd:complexContent>
- <xsd:extension base="AnyChildrenType">
- <xsd:attribute name="Identifier" type="xsd:token" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="QualifiedBoxIdentifierType">
- <xsd:simpleContent>
- <xsd:extension base="BoxIdentifierType">
- <xsd:attribute name="Signature" type="xsd:boolean" use="required"/>
- <xsd:attribute name="Encryption" type="xsd:boolean" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <!--###################################################################### -->
- <!--# Get Token Status # -->
- <!--###################################################################### -->
- <!--====================================================================== -->
- <!--= Get Token Status Request = -->
- <!--====================================================================== -->
- <xsd:element name="GetStatusRequest" type="GetStatusRequestType"/>
- <xsd:complexType name="GetStatusRequestType">
- <xsd:sequence minOccurs="0">
- <xsd:element name="TokenStatus" type="TokenStatusType"/>
- <xsd:element name="MaxDelay" type="xsd:nonNegativeInteger"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--====================================================================== -->
- <!--= Get Token Status Response = -->
- <!--====================================================================== -->
- <xsd:element name="GetStatusResponse" type="GetStatusResponseType"/>
- <xsd:complexType name="GetStatusResponseType">
- <xsd:sequence>
- <xsd:element name="TokenStatus" type="TokenStatusType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="TokenStatusType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="ready"/>
- <xsd:enumeration value="removed"/>
- </xsd:restriction>
- </xsd:simpleType>
- <!--###################################################################### -->
- <!--# Error Response # -->
- <!--###################################################################### -->
- <xsd:element name="ErrorResponse" type="ErrorResponseType"/>
- <xsd:complexType name="ErrorResponseType">
- <xsd:sequence>
- <xsd:element name="ErrorCode" type="ErrorCodeType"/>
- <xsd:element name="Info" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="ErrorCodeType">
- <xsd:restriction base="xsd:integer">
- <xsd:minInclusive value="1000"/>
- <xsd:maxInclusive value="99999"/>
- </xsd:restriction>
- </xsd:simpleType>
- <!--###################################################################### -->
- <!--# Auxiliary Types # -->
- <!--###################################################################### -->
- <xsd:simpleType name="BoxIdentifierType">
- <xsd:restriction base="xsd:token"/>
- </xsd:simpleType>
- <xsd:simpleType name="MimeTypeType">
- <xsd:restriction base="xsd:token"/>
- </xsd:simpleType>
- <xsd:simpleType name="WildCardSearchStringType">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[^\*/]*(\*[^\*/]*)?(/[^\*/]*(\*[^\*/]*)?)*"/>
- <xsd:pattern value="\*\*"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="InfoboxAssocArrayPairType">
- <xsd:complexContent>
- <xsd:extension base="Base64XMLContentType">
- <xsd:attribute name="Key" type="xsd:string" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="AnyChildrenType" mixed="false">
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:any namespace="##any" processContents="lax"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AnyMixedChildrenType" mixed="true">
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:any namespace="##any" processContents="lax"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="XMLContentType" mixed="true">
- <xsd:complexContent mixed="true">
- <xsd:extension base="AnyMixedChildrenType">
- <xsd:attribute ref="xml:space" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="Base64XMLLocRefOptRefContentType">
- <xsd:complexContent>
- <xsd:extension base="Base64XMLLocRefContentType">
- <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="Base64XMLLocRefReqRefContentType">
- <xsd:complexContent>
- <xsd:extension base="Base64XMLLocRefContentType">
- <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="Base64XMLOptRefContentType">
- <xsd:complexContent>
- <xsd:extension base="Base64XMLContentType">
- <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="Base64OptRefContentType">
- <xsd:complexContent>
- <xsd:extension base="Base64ContentType">
- <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="Base64ContentType">
- <xsd:choice minOccurs="0">
- <xsd:element name="Base64Content" type="xsd:base64Binary"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="Base64XMLContentType">
- <xsd:choice minOccurs="0">
- <xsd:element name="Base64Content" type="xsd:base64Binary"/>
- <xsd:element name="XMLContent" type="XMLContentType"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="Base64XMLLocRefContentType">
- <xsd:choice minOccurs="0">
- <xsd:element name="Base64Content" type="xsd:base64Binary"/>
- <xsd:element name="XMLContent" type="XMLContentType"/>
- <xsd:element name="LocRefContent" type="xsd:anyURI"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="DataObjectAssociationType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
- <xsd:element name="Content" type="Base64XMLLocRefReqRefContentType"/>
- </xsd:sequence>
- </xsd:complexType>
-</xsd:schema>
diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core.20020225.xsd b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core.20020225.xsd deleted file mode 100644 index 76d1d7cb..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core.20020225.xsd +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.0">
- <xsd:element name="CreateCMSSignatureRequest" type="xsd:anyType"/>
- <xsd:element name="CreateCMSSignatureResponse" type="xsd:anyType"/>
- <xsd:element name="CreateXMLSignatureRequest" type="xsd:anyType"/>
- <xsd:element name="CreateXMLSignatureResponse" type="xsd:anyType"/>
- <xsd:element name="VerifyCMSSignatureRequest" type="xsd:anyType"/>
- <xsd:element name="VerifyCMSSignatureResponse" type="xsd:anyType"/>
- <xsd:element name="VerifyXMLSignatureRequest" type="xsd:anyType"/>
- <xsd:element name="VerifyXMLSignatureResponse" type="xsd:anyType"/>
- <xsd:element name="InfoboxAvailableRequest" type="xsd:anyType"/>
- <xsd:element name="InfoboxAvailableResponse" type="xsd:anyType"/>
- <xsd:element name="InfoboxReadRequest" type="xsd:anyType"/>
- <xsd:element name="InfoboxReadResponse" type="xsd:anyType"/>
- <xsd:element name="InfoboxUpdateRequest" type="xsd:anyType"/>
- <xsd:element name="InfoboxUpdateResponse" type="xsd:anyType"/>
- <xsd:element name="CreateSessionKeyRequest" type="xsd:anyType"/>
- <xsd:element name="CreateSessionKeyResponse" type="xsd:anyType"/>
- <xsd:element name="CreateSymmetricSecretRequest" type="xsd:anyType"/>
- <xsd:element name="CreateSymmetricSecretResponse" type="xsd:anyType"/>
- <xsd:element name="GetPropertiesRequest" type="xsd:anyType"/>
- <xsd:element name="GetPropertiesResponse" type="xsd:anyType"/>
- <xsd:element name="GetStatusRequest" type="xsd:anyType"/>
- <xsd:element name="GetStatusResponse" type="xsd:anyType"/>
- <!--########## Error Response ###-->
- <xsd:element name="ErrorResponse" type="ErrorResponseType"/>
- <xsd:complexType name="ErrorResponseType">
- <xsd:sequence>
- <xsd:element name="ErrorCode" type="xsd:integer"/>
- <xsd:element name="Info" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-</xsd:schema>
diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core.20020831.xsd b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core.20020831.xsd deleted file mode 100644 index 6759d791..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/Core.20020831.xsd +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.buergerkarte.at/namespaces/securitylayer/20020831#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.buergerkarte.at/namespaces/securitylayer/20020831#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.0">
- <xsd:element name="CreateXMLSignatureRequest" type="xsd:anyType"/>
- <xsd:element name="CreateXMLSignatureResponse" type="xsd:anyType"/>
- <xsd:element name="VerifyCMSSignatureRequest" type="xsd:anyType"/>
- <xsd:element name="VerifyCMSSignatureResponse" type="xsd:anyType"/>
- <xsd:element name="VerifyXMLSignatureRequest" type="xsd:anyType"/>
- <xsd:element name="VerifyXMLSignatureResponse" type="xsd:anyType"/>
- <xsd:element name="GetPropertiesResponse" type="xsd:anyType"/>
-</xsd:schema>
diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xml.xsd b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xml.xsd deleted file mode 100644 index eeb9db56..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xml.xsd +++ /dev/null @@ -1,145 +0,0 @@ -<?xml version='1.0'?> -<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en"> - - <xs:annotation> - <xs:documentation> - See http://www.w3.org/XML/1998/namespace.html and - http://www.w3.org/TR/REC-xml for information about this namespace. - - This schema document describes the XML namespace, in a form - suitable for import by other schema documents. - - Note that local names in this namespace are intended to be defined - only by the World Wide Web Consortium or its subgroups. The - following names are currently defined in this namespace and should - not be used with conflicting semantics by any Working Group, - specification, or document instance: - - base (as an attribute name): denotes an attribute whose value - provides a URI to be used as the base for interpreting any - relative URIs in the scope of the element on which it - appears; its value is inherited. This name is reserved - by virtue of its definition in the XML Base specification. - - id (as an attribute name): denotes an attribute whose value - should be interpreted as if declared to be of type ID. - This name is reserved by virtue of its definition in the - xml:id specification. - - lang (as an attribute name): denotes an attribute whose value - is a language code for the natural language of the content of - any element; its value is inherited. This name is reserved - by virtue of its definition in the XML specification. - - space (as an attribute name): denotes an attribute whose - value is a keyword indicating what whitespace processing - discipline is intended for the content of the element; its - value is inherited. This name is reserved by virtue of its - definition in the XML specification. - - Father (in any context at all): denotes Jon Bosak, the chair of - the original XML Working Group. This name is reserved by - the following decision of the W3C XML Plenary and - XML Coordination groups: - - In appreciation for his vision, leadership and dedication - the W3C XML Plenary on this 10th day of February, 2000 - reserves for Jon Bosak in perpetuity the XML name - xml:Father - </xs:documentation> - </xs:annotation> - - <xs:annotation> - <xs:documentation>This schema defines attributes and an attribute group - suitable for use by - schemas wishing to allow xml:base, xml:lang, xml:space or xml:id - attributes on elements they define. - - To enable this, such a schema must import this schema - for the XML namespace, e.g. as follows: - <schema . . .> - . . . - <import namespace="http://www.w3.org/XML/1998/namespace" - schemaLocation="http://www.w3.org/2001/xml.xsd"/> - - Subsequently, qualified reference to any of the attributes - or the group defined below will have the desired effect, e.g. - - <type . . .> - . . . - <attributeGroup ref="xml:specialAttrs"/> - - will define a type which will schema-validate an instance - element with any of those attributes</xs:documentation> - </xs:annotation> - - <xs:annotation> - <xs:documentation>In keeping with the XML Schema WG's standard versioning - policy, this schema document will persist at - http://www.w3.org/2007/08/xml.xsd. - At the date of issue it can also be found at - http://www.w3.org/2001/xml.xsd. - The schema document at that URI may however change in the future, - in order to remain compatible with the latest version of XML Schema - itself, or with the XML namespace itself. In other words, if the XML - Schema or XML namespaces change, the version of this document at - http://www.w3.org/2001/xml.xsd will change - accordingly; the version at - http://www.w3.org/2007/08/xml.xsd will not change. - </xs:documentation> - </xs:annotation> - - <xs:attribute name="lang"> - <xs:annotation> - <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter - codes as the enumerated possible values is probably never - going to be a realistic possibility. See - RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry - at http://www.iana.org/assignments/lang-tag-apps.htm for - further information. - - The union allows for the 'un-declaration' of xml:lang with - the empty string.</xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:union memberTypes="xs:language"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value=""/> - </xs:restriction> - </xs:simpleType> - </xs:union> - </xs:simpleType> - </xs:attribute> - - <xs:attribute name="space"> - <xs:simpleType> - <xs:restriction base="xs:NCName"> - <xs:enumeration value="default"/> - <xs:enumeration value="preserve"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - - <xs:attribute name="base" type="xs:anyURI"> - <xs:annotation> - <xs:documentation>See http://www.w3.org/TR/xmlbase/ for - information about this attribute.</xs:documentation> - </xs:annotation> - </xs:attribute> - - <xs:attribute name="id" type="xs:ID"> - <xs:annotation> - <xs:documentation>See http://www.w3.org/TR/xml-id/ for - information about this attribute.</xs:documentation> - </xs:annotation> - </xs:attribute> - - <xs:attributeGroup name="specialAttrs"> - <xs:attribute ref="xml:base"/> - <xs:attribute ref="xml:lang"/> - <xs:attribute ref="xml:space"/> - <xs:attribute ref="xml:id"/> - </xs:attributeGroup> - -</xs:schema> diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd deleted file mode 100644 index 8422fdfa..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-core-schema.xsd +++ /dev/null @@ -1,308 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Schema for XML Signatures - http://www.w3.org/2000/09/xmldsig# - $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $ - - Copyright 2001 The Internet Society and W3C (Massachusetts Institute - of Technology, Institut National de Recherche en Informatique et en - Automatique, Keio University). All Rights Reserved. - http://www.w3.org/Consortium/Legal/ - - This document is governed by the W3C Software License [1] as described - in the FAQ [2]. - - [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720 - [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD ---> - - -<schema xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:ds="http://www.w3.org/2000/09/xmldsig#" - targetNamespace="http://www.w3.org/2000/09/xmldsig#" - version="0.1" elementFormDefault="qualified"> - -<!-- Basic Types Defined for Signatures --> - -<simpleType name="CryptoBinary"> - <restriction base="base64Binary"> - </restriction> -</simpleType> - -<!-- Start Signature --> - -<element name="Signature" type="ds:SignatureType"/> -<complexType name="SignatureType"> - <sequence> - <element ref="ds:SignedInfo"/> - <element ref="ds:SignatureValue"/> - <element ref="ds:KeyInfo" minOccurs="0"/> - <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> - </sequence> - <attribute name="Id" type="ID" use="optional"/> -</complexType> - - <element name="SignatureValue" type="ds:SignatureValueType"/> - <complexType name="SignatureValueType"> - <simpleContent> - <extension base="base64Binary"> - <attribute name="Id" type="ID" use="optional"/> - </extension> - </simpleContent> - </complexType> - -<!-- Start SignedInfo --> - -<element name="SignedInfo" type="ds:SignedInfoType"/> -<complexType name="SignedInfoType"> - <sequence> - <element ref="ds:CanonicalizationMethod"/> - <element ref="ds:SignatureMethod"/> - <element ref="ds:Reference" maxOccurs="unbounded"/> - </sequence> - <attribute name="Id" type="ID" use="optional"/> -</complexType> - - <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/> - <complexType name="CanonicalizationMethodType" mixed="true"> - <sequence> - <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/> - <!-- (0,unbounded) elements from (1,1) namespace --> - </sequence> - <attribute name="Algorithm" type="anyURI" use="required"/> - </complexType> - - <element name="SignatureMethod" type="ds:SignatureMethodType"/> - <complexType name="SignatureMethodType" mixed="true"> - <sequence> - <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/> - <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> - <!-- (0,unbounded) elements from (1,1) external namespace --> - </sequence> - <attribute name="Algorithm" type="anyURI" use="required"/> - </complexType> - -<!-- Start Reference --> - -<element name="Reference" type="ds:ReferenceType"/> -<complexType name="ReferenceType"> - <sequence> - <element ref="ds:Transforms" minOccurs="0"/> - <element ref="ds:DigestMethod"/> - <element ref="ds:DigestValue"/> - </sequence> - <attribute name="Id" type="ID" use="optional"/> - <attribute name="URI" type="anyURI" use="optional"/> - <attribute name="Type" type="anyURI" use="optional"/> -</complexType> - - <element name="Transforms" type="ds:TransformsType"/> - <complexType name="TransformsType"> - <sequence> - <element ref="ds:Transform" maxOccurs="unbounded"/> - </sequence> - </complexType> - - <element name="Transform" type="ds:TransformType"/> - <complexType name="TransformType" mixed="true"> - <choice minOccurs="0" maxOccurs="unbounded"> - <any namespace="##other" processContents="lax"/> - <!-- (1,1) elements from (0,unbounded) namespaces --> - <element name="XPath" type="string"/> - </choice> - <attribute name="Algorithm" type="anyURI" use="required"/> - </complexType> - -<!-- End Reference --> - -<element name="DigestMethod" type="ds:DigestMethodType"/> -<complexType name="DigestMethodType" mixed="true"> - <sequence> - <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </sequence> - <attribute name="Algorithm" type="anyURI" use="required"/> -</complexType> - -<element name="DigestValue" type="ds:DigestValueType"/> -<simpleType name="DigestValueType"> - <restriction base="base64Binary"/> -</simpleType> - -<!-- End SignedInfo --> - -<!-- Start KeyInfo --> - -<element name="KeyInfo" type="ds:KeyInfoType"/> -<complexType name="KeyInfoType" mixed="true"> - <choice maxOccurs="unbounded"> - <element ref="ds:KeyName"/> - <element ref="ds:KeyValue"/> - <element ref="ds:RetrievalMethod"/> - <element ref="ds:X509Data"/> - <element ref="ds:PGPData"/> - <element ref="ds:SPKIData"/> - <element ref="ds:MgmtData"/> - <any processContents="lax" namespace="##other"/> - <!-- (1,1) elements from (0,unbounded) namespaces --> - </choice> - <attribute name="Id" type="ID" use="optional"/> -</complexType> - - <element name="KeyName" type="string"/> - <element name="MgmtData" type="string"/> - - <element name="KeyValue" type="ds:KeyValueType"/> - <complexType name="KeyValueType" mixed="true"> - <choice> - <element ref="ds:DSAKeyValue"/> - <element ref="ds:RSAKeyValue"/> - <any namespace="##other" processContents="lax"/> - </choice> - </complexType> - - <element name="RetrievalMethod" type="ds:RetrievalMethodType"/> - <complexType name="RetrievalMethodType"> - <sequence> - <element ref="ds:Transforms" minOccurs="0"/> - </sequence> - <attribute name="URI" type="anyURI"/> - <attribute name="Type" type="anyURI" use="optional"/> - </complexType> - -<!-- Start X509Data --> - -<element name="X509Data" type="ds:X509DataType"/> -<complexType name="X509DataType"> - <sequence maxOccurs="unbounded"> - <choice> - <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/> - <element name="X509SKI" type="base64Binary"/> - <element name="X509SubjectName" type="string"/> - <element name="X509Certificate" type="base64Binary"/> - <element name="X509CRL" type="base64Binary"/> - <any namespace="##other" processContents="lax"/> - </choice> - </sequence> -</complexType> - -<complexType name="X509IssuerSerialType"> - <sequence> - <element name="X509IssuerName" type="string"/> - <element name="X509SerialNumber" type="integer"/> - </sequence> -</complexType> - -<!-- End X509Data --> - -<!-- Begin PGPData --> - -<element name="PGPData" type="ds:PGPDataType"/> -<complexType name="PGPDataType"> - <choice> - <sequence> - <element name="PGPKeyID" type="base64Binary"/> - <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> - <any namespace="##other" processContents="lax" minOccurs="0" - maxOccurs="unbounded"/> - </sequence> - <sequence> - <element name="PGPKeyPacket" type="base64Binary"/> - <any namespace="##other" processContents="lax" minOccurs="0" - maxOccurs="unbounded"/> - </sequence> - </choice> -</complexType> - -<!-- End PGPData --> - -<!-- Begin SPKIData --> - -<element name="SPKIData" type="ds:SPKIDataType"/> -<complexType name="SPKIDataType"> - <sequence maxOccurs="unbounded"> - <element name="SPKISexp" type="base64Binary"/> - <any namespace="##other" processContents="lax" minOccurs="0"/> - </sequence> -</complexType> - -<!-- End SPKIData --> - -<!-- End KeyInfo --> - -<!-- Start Object (Manifest, SignatureProperty) --> - -<element name="Object" type="ds:ObjectType"/> -<complexType name="ObjectType" mixed="true"> - <sequence minOccurs="0" maxOccurs="unbounded"> - <any namespace="##any" processContents="lax"/> - </sequence> - <attribute name="Id" type="ID" use="optional"/> - <attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet --> - <attribute name="Encoding" type="anyURI" use="optional"/> -</complexType> - -<element name="Manifest" type="ds:ManifestType"/> -<complexType name="ManifestType"> - <sequence> - <element ref="ds:Reference" maxOccurs="unbounded"/> - </sequence> - <attribute name="Id" type="ID" use="optional"/> -</complexType> - -<element name="SignatureProperties" type="ds:SignaturePropertiesType"/> -<complexType name="SignaturePropertiesType"> - <sequence> - <element ref="ds:SignatureProperty" maxOccurs="unbounded"/> - </sequence> - <attribute name="Id" type="ID" use="optional"/> -</complexType> - - <element name="SignatureProperty" type="ds:SignaturePropertyType"/> - <complexType name="SignaturePropertyType" mixed="true"> - <choice maxOccurs="unbounded"> - <any namespace="##other" processContents="lax"/> - <!-- (1,1) elements from (1,unbounded) namespaces --> - </choice> - <attribute name="Target" type="anyURI" use="required"/> - <attribute name="Id" type="ID" use="optional"/> - </complexType> - -<!-- End Object (Manifest, SignatureProperty) --> - -<!-- Start Algorithm Parameters --> - -<simpleType name="HMACOutputLengthType"> - <restriction base="integer"/> -</simpleType> - -<!-- Start KeyValue Element-types --> - -<element name="DSAKeyValue" type="ds:DSAKeyValueType"/> -<complexType name="DSAKeyValueType"> - <sequence> - <sequence minOccurs="0"> - <element name="P" type="ds:CryptoBinary"/> - <element name="Q" type="ds:CryptoBinary"/> - </sequence> - <element name="G" type="ds:CryptoBinary" minOccurs="0"/> - <element name="Y" type="ds:CryptoBinary"/> - <element name="J" type="ds:CryptoBinary" minOccurs="0"/> - <sequence minOccurs="0"> - <element name="Seed" type="ds:CryptoBinary"/> - <element name="PgenCounter" type="ds:CryptoBinary"/> - </sequence> - </sequence> -</complexType> - -<element name="RSAKeyValue" type="ds:RSAKeyValueType"/> -<complexType name="RSAKeyValueType"> - <sequence> - <element name="Modulus" type="ds:CryptoBinary"/> - <element name="Exponent" type="ds:CryptoBinary"/> - </sequence> -</complexType> - -<!-- End KeyValue Element-types --> - -<!-- End Signature --> - -</schema> diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-transforms.xsd b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-transforms.xsd deleted file mode 100644 index 25fdec88..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slcommands/schema/xmldsig-transforms.xsd +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!-- Schema for XML Signatures
- http://www.w3.org/2000/09/xmldsig#
- $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
-
- Copyright 2001 The Internet Society and W3C (Massachusetts Institute
- of Technology, Institut National de Recherche en Informatique et en
- Automatique, Keio University). All Rights Reserved.
- http://www.w3.org/Consortium/Legal/
-
- This document is governed by the W3C Software License [1] as described
- in the FAQ [2].
-
- [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
- [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
--->
-
-
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
- targetNamespace="http://www.w3.org/2000/09/xmldsig#"
- version="0.1" elementFormDefault="qualified">
-
- <element name="Transforms" type="ds:TransformsType"/>
- <complexType name="TransformsType">
- <sequence>
- <element ref="ds:Transform" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <element name="Transform" type="ds:TransformType"/>
- <complexType name="TransformType" mixed="true">
- <choice minOccurs="0" maxOccurs="unbounded">
- <any namespace="##other" processContents="lax"/>
- <!-- (1,1) elements from (0,unbounded) namespaces -->
- <element name="XPath" type="string"/>
- </choice>
- <attribute name="Algorithm" type="anyURI" use="required"/>
- </complexType>
-
-</schema>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties deleted file mode 100644 index c5bfce18..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2008 Federal Chancellery Austria and -# Graz University of Technology -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -test.noerror=Das ist eine Test-Fehlermeldung. Es ist kein Fehler aufgetreten.
-
-ec1000=Unklassifizierter Fehler.
-ec2000=Unklassifizierter Fehler in der Transportbindung.
-ec2001=HTTP/HTTPS-Bindung: DataURL kann nicht aufgelöst werden.
-ec2002=HTTP/HTTPS-Bindung: StylesheetURL kann nicht aufgelöst werden.
-ec2003=HTTP/HTTPS-Bindung: RedirectURL kann nicht aufgelöst werden.
-ec2004=HTTP/HTTPS-Bindung: Parameter XMLRequest fehlt.
-ec2005=HTTP/HTTPS-Bindung: Unbekannte Kodierung der Parameter.
-ec2006=HTTP/HTTPS-Bindung: Fehlerhafte Kodierung der Parameter.
-ec2007=HTTP/HTTPS-Bindung: DataURL-Server sendet Fehler oder unerwartete Antwort.
-ec2008=HTTP/HTTPS-Bindung: Fehler im Stylesheet, der von der StylesheetURL bezogen wurde.
-ec2009=HTTP/HTTPS-Bindung: HTTP-Anfrage an lokale BKU wurde an unerlaubte URL gerichtet.
-ec2010=HTTPS-Bindung: Fehler beim Aufbau der TLS-Verbindung.
-ec3000=Unklassifizierter Fehler in der XML-Struktur der Befehlsanfrage.
-ec3001=XML-Struktur der Befehlsanfrage ist nicht wohlgeformt.
-ec3002=XML-Struktur der Befehlsanfrage entspricht nicht dem Schema des Security-Layers.
-ec3003=XML-Struktur der Befehlsanfrage enthält eine unerlaubte Kombination aus optionalen Elementen oder Attributen.
-ec3004=XML-Struktur enthält ein Element oder Attribut, dessen Syntax nicht der Spezifikation des Security-Layer entspricht.
-ec3005=Protokollversion des Security-Layer wird nicht unterstützt.
-ec4000=Unklassifizierter Fehler in der Befehlsabarbeitung.
-ec4001=Unbekannter Keyboxbezeichner.
-ec4002=Unbekannter Infoboxbezeichner.
-ec4003=Zu signierendes Datum kann nicht aufgelöst werden.
-ec4004=Ergänzungsobjekt kann nicht aufgelöst werden.
-ec4005=Zu verschlüsselndes Datum kann nicht aufgelöst werden.
-ec4006=Algorithmus (Signatur, Verschlüsselung, Digest, Kanonisierung, Transformation) wird nicht unterstützt.
-ec4007=Fehler bei der Algorithmusausführung (Signatur, Verschlüsselung, Digest, Kanonisierung, Transformation).
-ec4008=Fehler beim Parsen der CMS-Nachricht.
-ec4009=Kein passender Entschlüsselungsschlüssel vorhanden.
-ec4010=Parameter des Infobox-Befehls passen nicht zum Typ der Infobox.
-ec4011=Befehl ist nicht implementiert.
-ec4100=XML-Dokument, in das die Signatur integriert werden soll, kann nicht aufgelöst werden.
-ec4101=XML-Dokument, in das die Signatur integriert werden soll, kann nicht geparst werden.
-ec4102=Signatur kann nicht am spezifizierten Ort in das bestehende XML-Dokument integriert werden.
-ec4103=Signatorzertifikat ist nicht in der CMS-Signatur enthalten.
-ec4104=Signierte Daten sind weder in der CMS-Signatur noch im XML-Request enthalten.
-ec4105=XML-Dokument, das die zu prüfende Signatur enthält, kann nicht aufgelöst werden.
-ec4106=XML-Dokument, das die zu prüfende Signatur enthält, kann nicht geparst werden.
-ec4107=Am spezifizierten Ort innerhalb des XML-Dokuments befindet sich keine XML-Signatur.
-ec4108=Verschlüsseltes Datum kann nicht am spezifizierten Ort in das bestehende XML-Dokument eingefügt werden.
-ec4109=Bestehendes XML-Dokument ist notwendig, aber nicht vorhanden.
-ec4110=Bestehendes XML-Dokument kann nicht aufgelöst werden.
-ec4111=Bestehendes XML-Dokument kann nicht geparst werden.
-ec4112=Verschlüsselte Datenverschlüsselungsschlüssel können nicht am spezifizierten Ort in das bestehende XML-Dokument eingefügt werden.
-ec4113=Zu entschlüsselnde Daten sind weder in der CMS-Nachricht noch im XML-Request enthalten.
-ec4114=Zu entschlüsselndes XML-Dokument kann nicht aufgelöst werden.
-ec4115=Zu entschlüsselndes XML-Dokument kann nicht geparst werden.
-ec4116=Zumindest ein spezifiziertes Verschlüsselungselement kann nicht im zu entschlüsselnden XML-Dokument gefunden werden.
-ec4117=Kein Verschlüsselungselement für Binärantwort vorhanden.
-ec4118=Zu hashendes Datum kann nicht aufgelöst werden.
-ec4119=Datum, für das der Hashwert zu prüfen ist, kann nicht aufgelöst werden.
-ec4120=Gewählter Infoboxbezeichner bereits vergeben.
-ec4121=Infobox mit spezifiziertem Bezeichner existiert nicht.
-ec4122=Inhalt der ausgewählten Infobox kann nicht als XML dargestellt werden.
-ec4123=Assoziatives Array: Zum spezifizierten Schlüssel existiert kein Eintrag. -ec4500=Die Sitzung ist abgelaufen.
-ec5000=Unklassifizierter Fehler in der Anzeigekomponente.
-ec5001=Anzeige von Daten des in der Befehlsanfrage angegebenen Mime-Types wird nicht unterstützt.
-ec5002=Zeichenkodierung der anzuzeigenden Daten ist fehlerhaft oder wird nicht unterstützt.
-ec5003=Anzuzeigende Daten enhalten nicht unterstützte Zeichen.
-ec5004=Standardanzeigeformat: HTML ist nicht spezifikationskonform.
-ec5005=Standardanzeigeformat: CSS ist nicht spezifikationskonform.
-ec5006=Standardanzeigeformat: Format eines eingebundenen Bildes ist nicht spezifikationskonform.
-ec5007=Standardanzeigeformat: Signatur über eingebundene Bilder fehlt oder ist nicht spezifikationskonform.
-ec6000=Unklassifizierter Abbruch durch den Bürger.
-ec6001=Abbruch durch den Bürger über die Benutzerschnittstelle.
-ec6002=Abbruch auf Grund mangelnder Rechte zur Befehlsausführung.
-
-# 3xxx
-#
-
-ec3000.unclassified=Unklassifizierter Fehler in der XML-Struktur der Befehlsanfrage. {0}
-ec3002.invalid=XML-Struktur der Befehlsanfrage entspricht nicht dem Schema des Security-Layers. {0}
-
-# 4xxx
-#
-
-ec4000.infobox.invalid=Die Infobox {0} enthält ungültige Daten.
-ec4000.idlink.transfomation.failed=Die komprimierte Personenbindung konnte mit dem Stylesheet {0} nicht transformiert werden.
-ec4002.infobox.unknown=Unbekannter Infoboxbezeichner {0}.
-ec4003.not.resolved=Zu signierendes Datum kann nicht aufgelöst werden (URI={0}).
-ec4011.notimplemented=Befehl {0} ist nicht implementiert. - -# Legacy error messages -# - -lec2901.notimplemented=Die in der Anfrage verwendete Version des Security-Layer Protokolls ({0}) wird nicht mehr unterstützt.
-
diff --git a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_en.properties b/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_en.properties deleted file mode 100644 index a8bffdc6..00000000 --- a/mocca-1.2.11/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_en.properties +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2008 Federal Chancellery Austria and -# Graz University of Technology -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -test.noerror=This is a test error-message. No error occurred. - -ec1000=Unclassified error. -ec2000=Unclassified error in the transport binding. -ec2001=HTTP/HTTPS binding: DataURL cannot be resolved. -ec2002=HTTP/HTTPS binding: StylesheetURL cannot be resolved. -ec2003=HTTP/HTTPS binding: RedirectURL cannot be resolved. -ec2004=HTTP/HTTPS binding: XMLRequest parameter missing. -ec2005=HTTP/HTTPS binding: Unknown parameter encoding. -ec2006=HTTP/HTTPS binding: Incorrect parameter encoding. -ec2007=HTTP/HTTPS binding: DataURL server transmits error or unexpected response. -ec2008=HTTP/HTTPS binding: Error in stylesheet obtained from the StylesheetURL. -ec2009=HTTP/HTTPS binding: HTTP request to local CCE directed to unauthorised URL. -ec2010=HTTPS binding: Error while establishing the TLS connection. -ec3000=Unclassified error in the XML structure of the command request. -ec3001=XML structure of the command request is not well formed. -ec3002=XML structure of the command request does not comply with the Security Layer schema. -ec3003=XML structure of the command request contains an invalid combination of optional elements or attributes. -ec3004=XML structure contains an element or attribute whose syntax does not match the Security Layer specification. -ec3005=Protocol version of Security Layer not supported. -ec4000=Unclassified error while processing command. -ec4001=Unknown key box identifier. -ec4002=Unknown info box identifier. -ec4003=Date to be signed cannot be resolved. -ec4004=Supplementary object cannot be resolved. -ec4005=Date to be encrypted cannot be resolved. -ec4006=Algorithm (signature, encryption, digest, canonicalisation, transformation) not supported. -ec4007=Error while executing algorithm (signature, encryption, digest, canonicalisation, transformation). -ec4008=Error while parsing CMS message -ec4009=No matching decryption key. -ec4010=Info box command parameters do not match info box type. -ec4011=Command not implemented. -ec4100=XML document in which the signature is to be integrated cannot be resolved. -ec4101=XML document in which the signature is to be integrated cannot be parsed. -ec4102=Signature cannot be integrated in the existing XML document at the specified location. -ec4103=Signature certificate not contained in the CMS signature. -ec4104=Signed data not contained in the CMS signature or XML request. -ec4105=XML document containing the signature to be verified cannot be resolved. -ec4106=XML document containing the signature to be verified cannot be parsed. -ec4107=There is no XML signature at the specified location within the XML document. -ec4108=Encrypted date cannot be inserted in the existing XML document at the specified location. -ec4109=Existing XML document is required but missing. -ec4110=Existing XML document cannot be resolved. -ec4111=Existing XML document cannot be parsed. -ec4112=Encrypted data encryption keys cannot be inserted in the existing XML document at the specified location. -ec4113=Data to be decrypted not contained in either the CMS message or XML request. -ec4114=XML document to be decrypted cannot be resolved. -ec4115=XML document to be decrypted cannot be parsed. -ec4116=At least one specified encryption element cannot be found in the XML document to be decrypted. -ec4117=No encryption element for binary response. -ec4118=Date to be hashed cannot be resolved. -ec4119=Date for which the hash value is to be verified cannot be resolved. -ec4120=Selected info box identifier already allocated. -ec4121=Info box with specified identifier does not exist. -ec4122=Contents of the selected info box cannot be displayed as XML. -ec4123=Associative array: No entry for the specified key. -ec4500=The session expired. -ec5000=Unclassified error in the viewer component. -ec5001=Display of data of the mime type specified in the command request not supported. -ec5002=Character encoding of the data to be displayed is invalid or not supported. -ec5003=Data to be displayed contains unsupported characters. -ec5004=Standard display format: HTML does not conform to specification. -ec5005=Standard display format: CSS does not conform to specification. -ec5006=Standard display format: Format of an embedded image does not conform to specification. -ec5007=Standard display format: Signature for embedded images missing or does not conform to specification. -ec6000=Unclassified cancelling by the citizen. -ec6001=Cancelled by the citizen via the user interface. -ec6002=Cancelled because of insufficient rights to execute command. - -# 3xxx -# - -ec3000.unclassified=Error in the XML structure of the command request. {0} -ec3002.invalid=XML structure of the command request does not comply with the Security Layer schema. {0} - -# 4xxx -# - -ec4000.infobox.invalid=The infobox {0} contains invalid content. -ec4000.idlink.transfomation.failed=Failed to transform CompressedIdentityLink with Stylesheet {0}. -ec4002.infobox.unknown=Unknown info box identifier {0}. -ec4003.not.resolved=Data to be signed cannot be resolved from URI={0}. -ec4011.notimplemented=Command {0} not implemented. - -# Legacy error codes -# -lec2901.notimplemented=The version ({0}) of the security-layer protocol used in the request is not supported. diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java deleted file mode 100644 index c339704e..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.gv.egiz.bku.accesscontroller;
-
-import static org.junit.Assert.assertTrue;
-
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class AuthenticationClassifierTest {
-
- private X509Certificate atrust;
-
- @Before
- public void setUp() throws Exception {
- atrust = (X509Certificate) CertificateFactory.getInstance("X509")
- .generateCertificate(
- getClass().getClassLoader().getResourceAsStream(
- "at/gv/egiz/bku/accesscontroller/www.a-trust.at.crt"));
- }
-
- @Test
- public void testATrust() {
- assertTrue(AuthenticationClassifier.isGovAgency(atrust));
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/ConfigTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/ConfigTest.java deleted file mode 100644 index bce3cdd9..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/ConfigTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package at.gv.egiz.bku.accesscontroller;
-
-import javax.xml.bind.JAXBException;
-
-import org.junit.Test;
-
-import at.gv.egiz.bku.slcommands.InfoboxReadCommand;
-import at.gv.egiz.bku.slcommands.SLCommandContext;
-import at.gv.egiz.bku.slcommands.SLResult;
-import at.gv.egiz.bku.slcommands.impl.InfoboxReadCommandImpl;
-import at.gv.egiz.bku.slexceptions.SLCommandException;
-import at.gv.egiz.bku.slexceptions.SLException;
-import static org.junit.Assert.*;
-
-public class ConfigTest {
-
- public final static String RESOURCE1 = "at/gv/egiz/bku/accesscontroller/AccessControlConfig.xml";
- public final static String RESOURCE2 = "at/gv/egiz/bku/accesscontroller/SimpleChainTest.xml";
-
- static class MyInfoBox implements InfoboxReadCommand {
- private String domainId;
- private String boxId;
- private String name;
-
- public MyInfoBox(String identifier, String domainId) {
- this.boxId = identifier;
- this.domainId = domainId;
- }
-
- @Override
- public String getIdentityLinkDomainId() {
- return domainId;
- }
-
- @Override
- public String getInfoboxIdentifier() {
- return boxId;
- }
-
- @Override
- public SLResult execute() {
- return null;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String getName() {
- return "InfoboxReadRequest";
- }
-
- @Override
- public void init(SLCommandContext ctx, Object unmarshalledRequest)
- throws SLCommandException {
- }
- }
-
- @Test
- public void testUnmarshall() throws JAXBException {
- AccessControllerFactory.getInstance().init(
- getClass().getClassLoader().getResourceAsStream(RESOURCE1));
- }
-
- @Test
- public void testBasicFunction() throws JAXBException, SLException {
- AccessControllerFactory.getInstance().init(
- getClass().getClassLoader().getResourceAsStream(RESOURCE2));
- ChainChecker cc = AccessControllerFactory.getInstance().getChainChecker(
- "InputFilter");
- assertNotNull(cc);
-
- AccessCheckerContext ctx = new AccessCheckerContext(null,
- AuthenticationClass.ANONYMOUS, null);
- ChainResult cr = cc.check(ctx);
- assertFalse(cr.matchFound());
-
- ctx = new AccessCheckerContext(new MyInfoBox("IdentityLink", "hansi"),
- AuthenticationClass.CERTIFIED, null);
- cr = cc.check(ctx);
- assertTrue(cr.matchFound());
-
- ctx = new AccessCheckerContext(new MyInfoBox("Something", "hansi"),
- AuthenticationClass.CERTIFIED, null);
- cr = cc.check(ctx);
- assertFalse(cr.matchFound());
-
- MyInfoBox mib = new MyInfoBox("IdentityLink", "seppl");
- mib.setName("ReadInfoboxSchickSchnack");
- ctx = new AccessCheckerContext(mib, AuthenticationClass.CERTIFIED, null);
- cr = cc.check(ctx);
- assertTrue(cr.matchFound());
- assertTrue(cr.getAction()==Action.ALLOW);
-
- mib = new MyInfoBox("IdentityLink", null);
- mib.setName("ReadInfoboxSchickSchnack");
- ctx = new AccessCheckerContext(mib, AuthenticationClass.CERTIFIED, null);
- cr = cc.check(ctx);
- assertTrue(cr.matchFound());
- assertTrue(cr.getAction()==Action.DENY);
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/RuleCheckerTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/RuleCheckerTest.java deleted file mode 100644 index 88f1490c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/RuleCheckerTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package at.gv.egiz.bku.accesscontroller;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import at.gv.egiz.bku.accesscontroller.RuleChecker.PEER_TYPE;
-import at.gv.egiz.bku.slcommands.impl.InfoboxReadCommandImpl;
-import at.gv.egiz.bku.slcommands.impl.NullOperationCommandImpl;
-import static org.junit.Assert.*;
-
-public class RuleCheckerTest {
-
- protected RuleChecker onlyAuthChecker;
- protected RuleChecker onlyCmdChecker;
- protected RuleChecker onlyPeerChecker;
-
- @Before
- public void setUp() {
- onlyAuthChecker = new RuleChecker("OnlyAuthChecker");
- onlyAuthChecker.setAction("allow");
- onlyAuthChecker.setUserAction("none");
- onlyAuthChecker.setAuthenticationClass("pseudoanonymous");
- onlyCmdChecker = new RuleChecker("OnlyCmdChecker");
- onlyCmdChecker.setAction("allow");
- onlyCmdChecker.setCommandName("InfoboxReadRequest");
- onlyPeerChecker = new RuleChecker("OnlyPeerChecker");
- onlyPeerChecker.setAction("allow");
- onlyPeerChecker.setPeerId("https://129.27.142..*", PEER_TYPE.URL);
- }
-
- @Test
- public void testAuthClass() {
- AccessCheckerContext ctx = new AccessCheckerContext(null,
- AuthenticationClass.ANONYMOUS, null);
- RuleResult rr = onlyAuthChecker.check(ctx);
- assertFalse(rr.matchFound());
- ctx = new AccessCheckerContext(null, AuthenticationClass.PSEUDO_ANONYMOUS,
- null);
- rr = onlyAuthChecker.check(ctx);
- assertTrue(rr.matchFound());
- ctx = new AccessCheckerContext(null, AuthenticationClass.CERTIFIED, null);
- rr = onlyAuthChecker.check(ctx);
- assertTrue(rr.matchFound());
- }
-
- @Test
- public void testCmd() {
- AccessCheckerContext ctx = new AccessCheckerContext(
- new InfoboxReadCommandImpl(), null, null);
- RuleResult rr = onlyCmdChecker.check(ctx);
- assertTrue(rr.matchFound());
- onlyCmdChecker.setCommandName("Info.*");
- rr = onlyCmdChecker.check(ctx);
- assertTrue(rr.matchFound());
- ctx = new AccessCheckerContext(new NullOperationCommandImpl(), null, null);
- rr = onlyCmdChecker.check(ctx);
- assertFalse(rr.matchFound());
- onlyCmdChecker.setCommandName(".*");
- rr = onlyCmdChecker.check(ctx);
- assertTrue(rr.matchFound());
- }
-
- @Test
- public void testPeerId() {
- AccessCheckerContext ctx = new AccessCheckerContext(null, null,
- "https://129.27.142.20:80/index.html");
- RuleResult rr = onlyPeerChecker.check(ctx);
- assertTrue(rr.matchFound());
-
- ctx = new AccessCheckerContext(null, null,
- "https://129.27.14.20:80/index.html");
- rr = onlyPeerChecker.check(ctx);
- assertFalse(rr.matchFound());
-
- onlyPeerChecker.setPeerId(".*.iaik..*", PEER_TYPE.HOST);
- ctx = new AccessCheckerContext(null, null,
- "https://129.27.142.20:80/index.html");
- rr = onlyPeerChecker.check(ctx);
- assertTrue(rr.matchFound());
-
- onlyPeerChecker.setPeerId("129.27.142..*", PEER_TYPE.IP);
- ctx = new AccessCheckerContext(null, null, "https://www.iaik.tugraz.at:80/");
- rr = onlyPeerChecker.check(ctx);
- assertTrue(rr.matchFound());
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/BindingProcessorManagerTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/BindingProcessorManagerTest.java deleted file mode 100644 index 22a7aa3b..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/BindingProcessorManagerTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configuration; -import at.gv.egiz.bku.conf.DummyConfiguration; -import static org.junit.Assert.*; - -import java.net.MalformedURLException; - -import org.junit.Before; -import org.junit.Test; - -public class BindingProcessorManagerTest { - - @Before - public void setUp() { - IdFactory.getInstance().setNumberOfBits(24*10); - } - - - @Test(expected = MalformedURLException.class) - public void basicCreationTest() throws MalformedURLException { - //TODO for the moment empty config sufficient (currently only maxDataURLHops configured) - BindingProcessorManager manager = new BindingProcessorManagerImpl(new DummyStalFactory(), new SLCommandInvokerImpl(), new DummyConfiguration()); - BindingProcessor bp = manager.createBindingProcessor("http://www.at/", null); - assertNotNull(bp.getId().toString()); - assertEquals(40, bp.getId().toString().length()); - String hansi = "Hansi"; - bp = manager.createBindingProcessor("http://www.iaik.at",hansi); - assertEquals(hansi, bp.getId().toString()); - bp = manager.createBindingProcessor("HtTp://www.iaik.at", null); - assertNotNull(bp); - manager.createBindingProcessor("seppl", null); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/DataUrlConnectionTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/DataUrlConnectionTest.java deleted file mode 100644 index 6e48e6fa..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/DataUrlConnectionTest.java +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configuration; -import at.gv.egiz.bku.conf.DummyConfiguration; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.InetSocketAddress; -import java.net.URL; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.sun.net.httpserver.Headers; -import com.sun.net.httpserver.HttpExchange; -import com.sun.net.httpserver.HttpHandler; -import com.sun.net.httpserver.HttpServer; - -/** - * - * @author clemens - */ -public class DataUrlConnectionTest { - - public static final String REQUEST_RESOURCE = "at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt"; - - private static final Log log = LogFactory.getLog(DataUrlConnectionTest.class); - - static HttpServer server; - static BindingProcessor bindingProcessor; - static BindingProcessorManager manager; - - protected InputStream requestStream; - - @BeforeClass - public static void setUpHTTPServer() throws IOException { - log.debug("setting up HTTPServer"); - InetSocketAddress addr = new InetSocketAddress("localhost", 8081); - server = HttpServer.create(addr, 0); - server.createContext("/", new DataUrlHandler()); - server.start(); - - log.debug("setting up HTTPBindingProcessor"); - manager = new BindingProcessorManagerImpl(new DummyStalFactory(), - new SLCommandInvokerImpl(), new DummyConfiguration()); - bindingProcessor = (HTTPBindingProcessor) manager.createBindingProcessor( - "http://www.iaik.at", null); - Map<String, String> headers = new HashMap<String, String>(); - headers.put("Content-Type", InputDecoderFactory.MULTIPART_FORMDATA - + ";boundary=---------------------------2330864292941"); - ((HTTPBindingProcessor) bindingProcessor).setHTTPHeaders(headers); - } - - @Before - public void setUp() { - requestStream = getClass().getClassLoader().getResourceAsStream( - REQUEST_RESOURCE); - } - - @AfterClass - public static void stopServer() { - if (server != null) { - log.debug("stopping HTTPServer"); - server.stop(0); - } - } - - @Test - public void testBasicNop() { - bindingProcessor.consumeRequestStream(requestStream); - // manager.process(bindingProcessor); - bindingProcessor.run(); - } - -// @Test - public void openConnectionTest() throws Exception { - - URL dataUrl = new URL("http://localhost:8081/"); - - log.debug("creating DataUrlConnection " + dataUrl.toString()); - DataUrlConnectionImpl c = new DataUrlConnectionImpl(); - c.init(dataUrl); - - c.setHTTPHeader("httpHeader_1", "001"); - ByteArrayInputStream bais = new ByteArrayInputStream("Hello, world!" - .getBytes()); - c.setHTTPFormParameter("formParam_1", bais, "text/plain", "UTF-8", null); - - log.debug("open dataUrl connection"); - c.connect(); - //TODO mock SLResult and c.transmit(result); - } - - static class DataUrlHandler implements HttpHandler { - - public DataUrlHandler() { - log.debug("setting up DataUrlHandler"); - } - - @Override - public void handle(HttpExchange exchange) throws IOException { - log.debug("handling incoming request"); - logHTTPHeaders(exchange.getRequestHeaders()); - logRequest(exchange.getRequestBody()); - - log.debug("sending dummy response"); - exchange.getResponseHeaders().add("Content-type", "text/html"); - String response = "<b>" + new Date() + "</b> for " - + exchange.getRequestURI(); - exchange.sendResponseHeaders(200, response.length()); - - OutputStream os = exchange.getResponseBody(); - os.write(response.getBytes()); - os.close(); - } - - private void logRequest(InputStream in) throws IOException { - StringBuilder reqLogMsg = new StringBuilder("HTTP request: \n"); - int c = 0; - while ((c = in.read()) != -1) { - reqLogMsg.append((char) c); - } - log.debug(reqLogMsg.toString()); - in.close(); - } - - private void logHTTPHeaders(Headers headers) { - StringBuilder headersLogMsg = new StringBuilder("HTTP headers: \n"); - Set<String> keys = headers.keySet(); - Iterator<String> keysIt = keys.iterator(); - while (keysIt.hasNext()) { - String key = keysIt.next(); - List<String> values = headers.get(key); - Iterator<String> valuesIt = values.iterator(); - headersLogMsg.append(' '); - headersLogMsg.append(key); - headersLogMsg.append(": "); - while (valuesIt.hasNext()) { - headersLogMsg.append(valuesIt.next()); - headersLogMsg.append(' '); - } - headersLogMsg.append('\n'); - } - log.debug(headersLogMsg.toString()); - } - } -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/DummyStalFactory.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/DummyStalFactory.java deleted file mode 100644 index f832f364..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/DummyStalFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.util.Locale; - -import at.gv.egiz.stal.STAL;
-import at.gv.egiz.stal.STALFactory;
-
-public class DummyStalFactory implements STALFactory {
-
- @Override
- public STAL createSTAL() {
- // TODO Auto-generated method stub
- return new at.gv.egiz.stal.dummy.DummySTAL();
- } - - @Override - public void setLocale(Locale locale) { - // TODO Auto-generated method stub - - }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/EmptyMultipartSLRequestTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/EmptyMultipartSLRequestTest.java deleted file mode 100644 index ee17f5e9..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/EmptyMultipartSLRequestTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configuration; -import iaik.security.ecc.provider.ECCProvider; -import iaik.security.provider.IAIK; -import iaik.xml.crypto.XSecProvider; - -import java.io.InputStream; -import java.net.MalformedURLException; -import java.security.Provider; -import java.security.Security; -import java.security.Provider.Service; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.Before; -import org.junit.Test; - -import at.gv.egiz.bku.conf.Configurator; -import at.gv.egiz.bku.conf.DummyConfiguration; -import at.gv.egiz.bku.slcommands.SLCommandFactory; -import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider; - -public class EmptyMultipartSLRequestTest { - - private static Log log = LogFactory.getLog(EmptyMultipartSLRequestTest.class); - - protected String resourceName = "at/gv/egiz/bku/binding/MultipartEmpty.txt"; - - protected BindingProcessor bindingProcessor; - protected InputStream dataStream; - protected BindingProcessorManager manager; - - @Before - public void setUp() throws MalformedURLException, ClassNotFoundException { - manager = new BindingProcessorManagerImpl(new DummyStalFactory(), - new SLCommandInvokerImpl(), new DummyConfiguration()); - HTTPBindingProcessor http = (HTTPBindingProcessor) manager - .createBindingProcessor("http://www.at/", null); - Map<String, String> headers = new HashMap<String, String>(); - headers.put("Content-Type", InputDecoderFactory.MULTIPART_FORMDATA - + ";boundary=uW10q_I9UeqKyw-1o5EW4jtEAaGs7-mC6o"); - http.setHTTPHeaders(headers); - dataStream = getClass().getClassLoader().getResourceAsStream(resourceName); - bindingProcessor = http; - Map<String, String> commandMap = new HashMap<String, String>(); - commandMap - .put( - "http://www.buergerkarte.at/namespaces/securitylayer/1.2#:CreateXMLSignatureRequest", - "at.gv.egiz.bku.slcommands.impl.CreateXMLSignatureCommandImpl"); - commandMap - .put( - "http://www.buergerkarte.at/namespaces/securitylayer/1.2#:InfoboxReadRequest", - "at.gv.egiz.bku.slcommands.impl.InfoboxReadCommandImpl"); - SLCommandFactory.getInstance().setCommandImpl(commandMap); - Security.insertProviderAt(new IAIK(), 1); - Security.insertProviderAt(new ECCProvider(false), 2); - XSecProvider.addAsProvider(false); - // registering STALProvider as delegation provider for XSECT - STALProvider stalProvider = new STALProvider(); - Security.addProvider(stalProvider); - Set<Service> services = stalProvider.getServices(); - StringBuilder sb = new StringBuilder(); - for (Service service : services) { - String algorithm = service.getType() + "." + service.getAlgorithm(); - XSecProvider.setDelegationProvider(algorithm, stalProvider.getName()); - sb.append("\n" + algorithm); - } - log.debug(sb); - } - - @Test - public void testBasicNop() { - bindingProcessor.consumeRequestStream(dataStream); - // manager.process(bindingProcessor); - bindingProcessor.run(); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/ExpiryRemoverTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/ExpiryRemoverTest.java deleted file mode 100644 index faf08c54..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/ExpiryRemoverTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.Configuration; -import at.gv.egiz.bku.conf.DummyConfiguration; -import java.net.MalformedURLException; - -import org.junit.Test; -import static org.junit.Assert.*; - -public class ExpiryRemoverTest { - - @Test - public void testMe() throws InterruptedException, MalformedURLException { - //TODO for the moment empty config sufficient (currently only maxDataURLHops configured) - BindingProcessorManager manager = new BindingProcessorManagerImpl(new DummyStalFactory(), - new SLCommandInvokerImpl(), new DummyConfiguration()); - BindingProcessor bp = manager.createBindingProcessor("http://www.at", null); - ExpiryRemover remover = new ExpiryRemover(); - remover.setBindingProcessorManager(manager); - remover.execute(); - manager.process(bp); - remover.execute(); - assertTrue(manager.getManagedIds().size() == 1); - remover.setMaxAcceptedAge(1000); - Thread.sleep(100); - remover.execute(); - assertTrue(manager.getManagedIds().size() == 1); - Thread.sleep(910); - remover.execute(); - assertTrue(manager.getManagedIds().size() == 0); - } - - @Test - public void testMe2() throws InterruptedException, MalformedURLException { - BindingProcessorManager manager = new BindingProcessorManagerImpl(new DummyStalFactory(), - new SLCommandInvokerImpl(), new DummyConfiguration()); - BindingProcessor bp = manager.createBindingProcessor("http://www.iaik.at", null); - ExpiryRemover remover = new ExpiryRemover(); - remover.setBindingProcessorManager(manager); - remover.execute(); - manager.process(bp); - remover.execute(); - assertTrue(manager.getManagedIds().size() == 1); - remover.setMaxAcceptedAge(1000); - Thread.sleep(500); - remover.execute(); - assertTrue(manager.getManagedIds().size() == 1); - bp.updateLastAccessTime(); - Thread.sleep(510); - remover.execute(); - assertTrue(manager.getManagedIds().size() == 1); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/HttpBindingProcessorTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/HttpBindingProcessorTest.java deleted file mode 100644 index d03e1807..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/HttpBindingProcessorTest.java +++ /dev/null @@ -1,328 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import at.gv.egiz.bku.binding.MultiTestDataUrlConnection.DataSourceProvider; -import at.gv.egiz.bku.conf.Configuration; -import at.gv.egiz.bku.conf.DummyConfiguration; -import at.gv.egiz.bku.utils.StreamUtil; - -public class HttpBindingProcessorTest { - - public static class TestDataSource implements DataSourceProvider { - - private List<Integer> responseCodes = new ArrayList<Integer>(); - private List<String> content = new ArrayList<String>(); - private List<Map<String, String>> responseHeaders = new ArrayList<Map<String, String>>(); - private int counter = -1; - - public void resetCounter() { - counter = -1; - } - - public void addResponse(int responseCode, String content, - Map<String, String> headerMap) { - responseCodes.add(new Integer(responseCode)); - this.content.add(content); - this.responseHeaders.add(headerMap); - } - - @Override - public int getResponseCode() { - return responseCodes.get(counter); - } - - @Override - public String getResponseContent() { - return content.get(counter); - } - - @Override - public Map<String, String> getResponseHeaders() { - return responseHeaders.get(counter); - } - - @Override - public void nextEvent() { - if (++counter >= responseCodes.size()) { - counter = 0; - } - } - } - - protected BindingProcessorManager manager; - protected HTTPBindingProcessor bindingProcessor; - protected Map<String, String> serverHeaderMap; - protected Map<String, String> clientHeaderMap; - protected TestDataUrlConnection server; - - protected static ApplicationContext appCtx; - - @BeforeClass - public static void setUpClass() { - appCtx = new ClassPathXmlApplicationContext("at/gv/egiz/bku/slcommands/testApplicationContext.xml"); - } - - - @Before - public void setUp() throws IOException { - server = new TestDataUrlConnection(); - DataUrl.setDataUrlConnectionImpl(server); - serverHeaderMap = new HashMap<String, String>(); - serverHeaderMap.put("Content-Type", HttpUtil.TXT_XML); - server.setResponseCode(200); - server.setResponseContent("<ok/>"); - server.setResponseHeaders(serverHeaderMap); - manager = new BindingProcessorManagerImpl(new DummyStalFactory(), - new SLCommandInvokerImpl(), new DummyConfiguration()); - bindingProcessor = (HTTPBindingProcessor) manager.createBindingProcessor( - "http://www.iaik.at", null); - clientHeaderMap = new HashMap<String, String>(); - clientHeaderMap.put("Content-Type", - "application/x-www-form-urlencoded;charset=utf8"); - bindingProcessor.setHTTPHeaders(clientHeaderMap); - } - - protected String resultAsString(String encoding) throws IOException { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - bindingProcessor.writeResultTo(baos, encoding); - return new String(baos.toByteArray(), encoding); - } - - @Test - public void testWithoutDataUrlWithoutStylesheet() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm("Haßnsi", "Wüurzel"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullOperationResponse") != -1); - assertEquals(200, bindingProcessor.getResponseCode()); - assertEquals(0, bindingProcessor.getResponseHeaders().size()); - } - - @Test - public void testWithoutDataUrlWithStylesheet() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm("Hansi", "Wurzel"); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_HTML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullKommaJosef") != -1); - assertEquals(200, bindingProcessor.getResponseCode()); - assertEquals(0, bindingProcessor.getResponseHeaders().size()); - } - - @Test - public void testWithDataUrl301WithStylesheet() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(301); - rf = new RequestFactory(); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); - server.setResponseContent(rf.getURLencodedAsString()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); - assertEquals(301, bindingProcessor.getResponseCode()); - assertTrue(bindingProcessor.getResponseHeaders().size() > 0); - } - - @Test - public void testWithDataUrl302WithStylesheet() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(302); - rf = new RequestFactory(); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); - server.setResponseContent(rf.getURLencodedAsString()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); - assertEquals(302, bindingProcessor.getResponseCode()); - assertTrue(bindingProcessor.getResponseHeaders().size() > 0); - } - - @Test - public void testWithDataUrl303WithStylesheet() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(303); - rf = new RequestFactory(); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); - server.setResponseContent(rf.getURLencodedAsString()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); - assertEquals(303, bindingProcessor.getResponseCode()); - assertTrue(bindingProcessor.getResponseHeaders().size() > 0); - } - - @Test - public void testWithDataUrl306WithStylesheet() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(306); - rf = new RequestFactory(); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); - server.setResponseContent(rf.getURLencodedAsString()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("ErrorResponse") != -1); - assertEquals(200, bindingProcessor.getResponseCode()); - assertTrue(bindingProcessor.getResponseHeaders().size() == 0); - } - - @Test - public void testWithDataUrl307NonXML() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(307); - serverHeaderMap.put("Content-Type", HttpUtil.TXT_PLAIN); - server.setResponseHeaders(serverHeaderMap); - rf = new RequestFactory(); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); - server.setResponseContent(rf.getURLencodedAsString()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_PLAIN, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullOperationRequest") != -1); - assertEquals(307, bindingProcessor.getResponseCode()); - assertTrue(bindingProcessor.getResponseHeaders().size() > 0); - } - - @Test - public void testWithInvalidDataUrl307XML() throws IOException { - RequestFactory rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(307); - serverHeaderMap.put("Content-Type", HttpUtil.TXT_XML); - serverHeaderMap.put("Location", "noUrl"); - server.setResponseHeaders(serverHeaderMap); - rf = new RequestFactory(); - server.setResponseContent(rf.getNullOperationXML()); - bindingProcessor.run(); - assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("ErrorResponse") != -1); - assertEquals(200, bindingProcessor.getResponseCode()); - assertTrue(bindingProcessor.getResponseHeaders().size() == 0); - } - - @Test - public void testWithValidDataUrl307XML() throws IOException, InterruptedException { - server = new MultiTestDataUrlConnection(); - DataUrl.setDataUrlConnectionImpl(server); - TestDataSource tds = new TestDataSource(); - ((MultiTestDataUrlConnection)server).setDataSource(tds); - - // first server response with 307 xml and location - RequestFactory rf = new RequestFactory(); - serverHeaderMap = new HashMap<String, String>(); - serverHeaderMap.put("Location", "http://localhost:8080"); - serverHeaderMap.put("Content-Type", HttpUtil.TXT_XML); - tds.addResponse(307, rf.getNullOperationXML(), serverHeaderMap); - - // 2nd response with 200 text/plain and != <ok/> - String testString = "CheckMe"; - serverHeaderMap = new HashMap<String, String>(); - serverHeaderMap.put("Content-Type", HttpUtil.TXT_PLAIN); - String testHeader ="DummyHeader"; - String testHeaderVal ="DummyHeaderVal"; - serverHeaderMap.put(testHeader, testHeaderVal); - tds.addResponse(200, testString, serverHeaderMap); - - rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - bindingProcessor.run(); - - assertTrue(bindingProcessor.getResponseHeaders().size()>0); - assertEquals(testHeaderVal, bindingProcessor.getResponseHeaders().get(testHeader)); - assertEquals(200,bindingProcessor.getResponseCode()); - assertEquals(HttpUtil.TXT_PLAIN, bindingProcessor.getResultContentType()); - assertEquals(testString ,resultAsString("UTF-8")); - } - - @Test - public void testWithValidDataUrl200Urlencoded() throws IOException { - RequestFactory rf = new RequestFactory(); - rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(200); - rf = new RequestFactory(); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - serverHeaderMap.put("Content-Type", HttpUtil.APPLICATION_URL_ENCODED); - server.setResponseHeaders(serverHeaderMap); - server.setResponseContent(rf.getURLencodedAsString()); - bindingProcessor.run(); - assertTrue(bindingProcessor.getResponseHeaders().size()==0); - assertEquals(200,bindingProcessor.getResponseCode()); - assertEquals(HttpUtil.TXT_XML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullOperationResponse") != -1); - } - - @Test - public void testWithValidDataUrl200UrlencodedAndStylesheet() throws IOException { - RequestFactory rf = new RequestFactory(); - rf = new RequestFactory(); - rf.addForm(RequestFactory.DATAURL, "http://localhost:8080"); - bindingProcessor.consumeRequestStream(rf.getURLencoded()); - server.setResponseCode(200); - rf = new RequestFactory(); - rf.addFormAsResource("Styleshit", "at/gv/egiz/bku/binding/stylesheet.xslt"); - rf.addForm(RequestFactory.STYLESHEETURL, "formdata:Styleshit"); - serverHeaderMap.put("Content-Type", HttpUtil.APPLICATION_URL_ENCODED); - server.setResponseHeaders(serverHeaderMap); - server.setResponseContent(rf.getURLencodedAsString()); - bindingProcessor.run(); - assertTrue(bindingProcessor.getResponseHeaders().size()==0); - assertEquals(200,bindingProcessor.getResponseCode()); - assertEquals(HttpUtil.TXT_HTML, bindingProcessor.getResultContentType()); - assertTrue(resultAsString("UTF-8").indexOf("NullKommaJosef") != -1); - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/IdFactoryTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/IdFactoryTest.java deleted file mode 100644 index cd75ec38..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/IdFactoryTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class IdFactoryTest {
-
- @Before
- public void setUp() {
- IdFactory.getInstance().setNumberOfBits(168);
-
- }
-
- @Test
- public void testWithString() {
- String testString = "Hansi";
- Id hansi = IdFactory.getInstance().createId(testString);
- assertEquals(hansi.toString(), testString);
- }
-
- @Test(expected = NullPointerException.class)
- public void testFactory() {
- IdFactory.getInstance().setSecureRandom(null);
- }
-
- @Test
- public void testRandom() {
- IdFactory fab = IdFactory.getInstance();
- Id id = fab.createId();
- assertEquals(id.toString().length(), 28);
- fab.setNumberOfBits(24);
- id = fab.createId();
- assertEquals(id.toString().length(), 4);
- }
-
- @Test
- public void testEquals() {
- String idString = "Hansi";
- IdFactory fab = IdFactory.getInstance();
- Id id1 = fab.createId(idString);
- Id id2 = fab.createId(idString);
- assertEquals(id1, id2);
- assertEquals(id1.hashCode(), id2.hashCode());
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/InputDecoderFactoryTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/InputDecoderFactoryTest.java deleted file mode 100644 index 7d79889d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/InputDecoderFactoryTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import at.gv.egiz.bku.utils.StreamUtil;
-
-public class InputDecoderFactoryTest {
-
- protected String resourceName = "at/gv/egiz/bku/binding/Multipart.txt.bin";
- protected byte[] data;
-
- @Before
- public void setUp() throws IOException {
- InputStream is = getClass().getClassLoader().getResourceAsStream(
- resourceName);
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int i;
-
- while ((i = is.read(buffer)) != -1) {
- bos.write(buffer, 0, i);
- }
- is.close();
- data = bos.toByteArray();
- }
-
- @Test
- public void testPrefix() {
- InputDecoder dec = InputDecoderFactory.getDecoder(
- "multipart/form-data; boundary=AaB03x", null);
- assertTrue(dec instanceof MultiPartFormDataInputDecoder);
- }
-
- @Test
- public void testMultipart() throws IOException {
- InputDecoder dec = InputDecoderFactory
- .getDecoder(
- "multipart/form-data; boundary=---------------------------15671293698853",
- new ByteArrayInputStream(data));
- assertNotNull(dec);
- for (Iterator<FormParameter> fpi = dec.getFormParameterIterator(); fpi
- .hasNext();) {
- FormParameter fp = fpi.next();
- if (fp.getFormParameterName().equals("XMLRequest")) {
- assertEquals("text/xml", fp.getFormParameterContentType());
- return;
- }
- }
- assertTrue(false);
- }
-
- @Test
- public void testUrlEncoded() throws IOException {
- InputDecoder dec = InputDecoderFactory.getDecoder(
- "application/x-www-form-urlencoded", null);
- assertTrue(dec instanceof XWWWFormUrlInputDecoder);
- dec = InputDecoderFactory.getDecoder(
- "application/x-WWW-form-urlencoded;charset=UTF-8",
- new ByteArrayInputStream(
- "your_name=hansi+wurzel&userid=123&form_name=wasinet".getBytes()));
- assertTrue(dec instanceof XWWWFormUrlInputDecoder);
- Iterator<FormParameter> fpi = dec.getFormParameterIterator();
- FormParameter fp = fpi.next();
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- StreamUtil.copyStream(fp.getFormParameterValue(), os);
- String value = new String(os.toByteArray(), "UTF-8");
- assertEquals("hansi wurzel", value);
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultiTestDataUrlConnection.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultiTestDataUrlConnection.java deleted file mode 100644 index 5d2a7544..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultiTestDataUrlConnection.java +++ /dev/null @@ -1,49 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.IOException;
-import java.util.Map;
-
-public class MultiTestDataUrlConnection extends TestDataUrlConnection {
-
- public static interface DataSourceProvider {
- public Map<String, String> getResponseHeaders();
- public String getResponseContent();
- public int getResponseCode();
- public void nextEvent();
- }
-
-
- protected DataSourceProvider dataSource;
-
- public void setDataSource(DataSourceProvider dataSource) {
- this.dataSource = dataSource;
- }
-
- public DataUrlResponse getResponse() throws IOException {
- if (dataSource == null) {
- return super.getResponse();
- }
- dataSource.nextEvent();
- responseHeaders = dataSource.getResponseHeaders();
- responseCode = dataSource.getResponseCode();
- responseContent = dataSource.getResponseContent();
- return super.getResponse();
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultipartSLRequestTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultipartSLRequestTest.java deleted file mode 100644 index 1a9a6a70..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/MultipartSLRequestTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.DummyConfiguration; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; - -public class MultipartSLRequestTest { - - protected String resourceName = "at/gv/egiz/bku/binding/MultipartFromTutorial.txt"; - - protected BindingProcessor bindingProcessor; - protected InputStream dataStream; - protected BindingProcessorManager manager; - - @Before - public void setUp() throws MalformedURLException { - manager = new BindingProcessorManagerImpl(new DummyStalFactory(), - new SLCommandInvokerImpl(), new DummyConfiguration()); - HTTPBindingProcessor http = (HTTPBindingProcessor) manager - .createBindingProcessor("http://www.at/", null); - Map<String, String> headers = new HashMap<String, String>(); - headers.put("Content-Type", InputDecoderFactory.MULTIPART_FORMDATA - + ";boundary=---------------------------2330864292941"); - http.setHTTPHeaders(headers); - dataStream = getClass().getClassLoader().getResourceAsStream(resourceName); - bindingProcessor = http; - } - - @Test - public void testBasicNop() { - bindingProcessor.consumeRequestStream(dataStream); - // manager.process(bindingProcessor); - bindingProcessor.run(); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/NullOperationTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/NullOperationTest.java deleted file mode 100644 index 58c82c49..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/NullOperationTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding; - -import at.gv.egiz.bku.conf.DummyConfiguration; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.util.HashMap; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; - -public class NullOperationTest { - - protected String resourceName = "at/gv/egiz/bku/binding/NulloperationRequest.txt.bin"; - - protected BindingProcessor bindingProcessor; - protected InputStream dataStream; - protected BindingProcessorManager manager; - - @Before - public void setUp() throws MalformedURLException { - manager = new BindingProcessorManagerImpl(new DummyStalFactory(), new SLCommandInvokerImpl(), new DummyConfiguration()); - HTTPBindingProcessor http = (HTTPBindingProcessor) manager.createBindingProcessor("http://www.at/", null); - Map<String, String> headers = new HashMap<String, String>(); - headers.put("Content-Type", "application/x-www-form-urlencoded"); - http.setHTTPHeaders(headers); - dataStream = getClass().getClassLoader().getResourceAsStream(resourceName); - bindingProcessor = http; - } - - @Test - public void testBasicNop() { - bindingProcessor.consumeRequestStream(dataStream); - //manager.process(bindingProcessor); - bindingProcessor.run(); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/RequestFactory.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/RequestFactory.java deleted file mode 100644 index 77157a41..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/RequestFactory.java +++ /dev/null @@ -1,116 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URLEncoder;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import at.gv.egiz.bku.utils.StreamUtil;
-
-public class RequestFactory implements FixedFormParameters {
-
- protected String requestResourceName = "at/gv/egiz/bku/binding/Nulloperation.xml";
-
- protected Map<String, String> formString = new HashMap<String, String>();
- protected Map<String, String> formResources = new HashMap<String, String>();
-
- public RequestFactory() {
- formResources.put(XMLREQUEST, requestResourceName);
- }
-
- public void addForm(String formName, String content) {
- formString.put(formName, content);
- }
-
- public void addFormAsResource(String formName, String resourceName) {
- formResources.put(formName, resourceName);
- }
-
- public InputStream getURLencoded() throws IOException {
- StringBuffer sb = new StringBuffer();
- for (Iterator<String> si = formString.keySet().iterator(); si.hasNext();) {
- String formName = si.next();
- String formVal = formString.get(formName);
- sb.append(URLEncoder.encode(formName, "UTF-8"));
- sb.append("=");
- sb.append(URLEncoder.encode(formVal, "UTF-8"));
- if (si.hasNext()) {
- sb.append("&");
- } else {
- if (formResources.keySet().iterator().hasNext()) {
- sb.append("&");
- }
- }
- }
-
- for (Iterator<String> si = formResources.keySet().iterator(); si.hasNext();) {
- String formName = si.next();
- String formVal = URLEncoder.encode(StreamUtil.asString(getClass()
- .getClassLoader().getResourceAsStream(formResources.get(formName)),
- "UTF-8"), "UTF-8");
- sb.append(URLEncoder.encode(formName, "UTF-8"));
- sb.append("=");
- sb.append(formVal);
- if (si.hasNext()) {
- sb.append("&");
- }
- }
- return new ByteArrayInputStream(sb.toString().getBytes("UTF-8"));
- }
-
- public String getURLencodedAsString() throws IOException {
- StringBuffer sb = new StringBuffer();
- for (Iterator<String> si = formString.keySet().iterator(); si.hasNext();) {
- String formName = si.next();
- String formVal = formString.get(formName);
- sb.append(URLEncoder.encode(formName, "UTF-8"));
- sb.append("=");
- sb.append(URLEncoder.encode(formVal, "UTF-8"));
- if (si.hasNext()) {
- sb.append("&");
- } else {
- if (formResources.keySet().iterator().hasNext()) {
- sb.append("&");
- }
- }
- }
-
- for (Iterator<String> si = formResources.keySet().iterator(); si.hasNext();) {
- String formName = si.next();
- String formVal = URLEncoder.encode(StreamUtil.asString(getClass()
- .getClassLoader().getResourceAsStream(formResources.get(formName)),
- "UTF-8"), "UTF-8");
- sb.append(URLEncoder.encode(formName, "UTF-8"));
- sb.append("=");
- sb.append(formVal);
- if (si.hasNext()) {
- sb.append("&");
- }
- }
- return sb.toString();
- }
-
- public String getNullOperationXML() throws IOException {
- return StreamUtil.asString(getClass().getClassLoader().getResourceAsStream(
- requestResourceName), "UTF-8");
- }
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/SSLDataUrlConnectionTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/SSLDataUrlConnectionTest.java deleted file mode 100644 index 79757244..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/SSLDataUrlConnectionTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.junit.Ignore; -import org.junit.Test;
-
-@Ignore
-public class SSLDataUrlConnectionTest {
-
- @Test
- public void testVerisign() throws IOException {
- URL url = new URL("https://www.verisign.com:443");
- DataUrlConnectionImpl uc = new DataUrlConnectionImpl();
- uc.init(url);
- uc.connect();
- assertNotNull(uc.getServerCertificate());
- //uc.transmit(null);
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/TestDataUrlConnection.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/TestDataUrlConnection.java deleted file mode 100644 index 0a24b5c5..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/TestDataUrlConnection.java +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.binding;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.SocketTimeoutException;
-import java.net.URL;
-import java.security.cert.X509Certificate;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLSocketFactory; -
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.Ignore;
-
-import at.gv.egiz.bku.slcommands.SLResult;
-
-@Ignore
-public class TestDataUrlConnection implements DataUrlConnectionSPI {
-
-
- protected Log log = LogFactory.getLog(TestDataUrlConnection.class);
- protected X509Certificate serverCertificate;
- protected Map<String, String> responseHeaders = Collections.EMPTY_MAP;
- protected Map<String, String> requestHeaders = new HashMap<String, String>();
- protected String responseContent = "";
- protected int responseCode = 200;
-
- protected URL url;
-
- @Override
- public void init(URL url) {
- log.debug("Init Testdataurlconnection to url: " + url);
- this.url = url;
- }
-
- @Override
- public void connect() throws SocketTimeoutException, IOException {
- log.debug("Dummy connect to Testdataurlconnection to url: " + url);
-
- }
-
- @Override
- public String getProtocol() {
- return url.getProtocol();
- }
-
- @Override
- public DataUrlResponse getResponse() throws IOException {
- String ct = responseHeaders.get(HttpUtil.HTTP_HEADER_CONTENT_TYPE);
- if (ct != null) {
- ct = HttpUtil.getCharset(ct, true);
- } else {
- ct = HttpUtil.DEFAULT_CHARSET;
- }
- DataUrlResponse response = new DataUrlResponse(url.toString(), responseCode, new ByteArrayInputStream(responseContent.getBytes(ct)));
- response.setResponseHttpHeaders(responseHeaders);
- return response;
- }
-
- @Override
- public X509Certificate getServerCertificate() {
- return serverCertificate;
- }
-
- @Override
- public void setHTTPFormParameter(String name, InputStream data,
- String contentType, String charSet, String transferEncoding) {
- // TODO Auto-generated method stub
- }
-
- @Override
- public void setHTTPHeader(String key, String value) {
- requestHeaders.put(key, value);
- }
-
- @Override
- public void transmit(SLResult slResult) throws IOException {
- log.debug("Dummy transmit to url: " + url);
- }
-
- public void setServerCertificate(X509Certificate serverCertificate) {
- this.serverCertificate = serverCertificate;
- }
-
- public void setResponseHeaders(Map<String, String> responseHeaders) {
- this.responseHeaders = responseHeaders;
- }
-
- public void setResponseContent(String responseContent) {
- this.responseContent = responseContent;
- }
-
- public void setResponseCode(int responseCode) {
- this.responseCode = responseCode;
- }
-
- public Map<String, String> getRequestHeaders() {
- return requestHeaders;
- }
-
- @Override
- public DataUrlConnectionSPI newInstance() {
- return this;
- } - - @Override - public URL getUrl() { - return url; - } - - @Override - public void setConfiguration(Properties config) { - // TODO Auto-generated method stub - - } - - @Override - public void setHostnameVerifier(HostnameVerifier hostnameVerifier) { - // TODO Auto-generated method stub - - } - - @Override - public void setSSLSocketFactory(SSLSocketFactory socketFactory) { - // TODO Auto-generated method stub - - }
- }
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/XWWWFormUrlInputIteratorTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/XWWWFormUrlInputIteratorTest.java deleted file mode 100644 index 4d81f038..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/binding/XWWWFormUrlInputIteratorTest.java +++ /dev/null @@ -1,299 +0,0 @@ -package at.gv.egiz.bku.binding; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.net.URL; -import java.net.URLEncoder; -import java.nio.CharBuffer; -import java.nio.channels.FileChannel; -import java.nio.charset.Charset; - -import org.junit.Ignore; -import org.junit.Test; - -import at.gv.egiz.bku.utils.URLEncodingWriter; -import static org.junit.Assert.*; - -public class XWWWFormUrlInputIteratorTest { - - @Test - public void testEmpty() throws IOException { - - ByteArrayInputStream emptyStream = new ByteArrayInputStream(new byte[] {}); - - XWWWFormUrlInputIterator decoder = new XWWWFormUrlInputIterator(emptyStream); - - assertFalse(decoder.hasNext()); - - } - - @Test - public void testOneParam() throws IOException { - - final String name = "name"; - final String value = "value"; - - ByteArrayOutputStream os = new ByteArrayOutputStream(); - OutputStreamWriter w = new OutputStreamWriter(os, Charset.forName("UTF-8")); - w.write(name); - w.write("="); - w.write(value); - w.flush(); - w.close(); - - ByteArrayInputStream in = new ByteArrayInputStream(os.toByteArray()); - XWWWFormUrlInputIterator decoder = new XWWWFormUrlInputIterator(in); - - assertTrue(decoder.hasNext()); - FormParameter param = decoder.next(); - assertNotNull(param); - assertEquals(name, param.getFormParameterName()); - InputStream vis = param.getFormParameterValue(); - assertNotNull(vis); - InputStreamReader r = new InputStreamReader(vis); - char[] buf = new char[value.length() + 1]; - int len = r.read(buf); - assertEquals(value.length(), len); - assertEquals(value, new String(buf, 0, len)); - assertFalse(decoder.hasNext()); - Exception ex = null; - try { - decoder.next(); - } catch (Exception e) { - ex = e; - } - assertNotNull(ex); - - } - - @Test - public void testTwoParam() throws IOException { - - final String name1 = "name"; - final String value1 = "value"; - final String name2 = "Name_2"; - final String value2 = "Value 2"; - - ByteArrayOutputStream os = new ByteArrayOutputStream(); - OutputStreamWriter w = new OutputStreamWriter(os, Charset.forName("UTF-8")); - w.write(name1); - w.write("="); - w.write(value1); - w.write("&"); - w.write(URLEncoder.encode(name2, "UTF-8")); - w.write("="); - w.write(URLEncoder.encode(value2, "UTF-8")); - w.flush(); - w.close(); - - ByteArrayInputStream in = new ByteArrayInputStream(os.toByteArray()); - XWWWFormUrlInputIterator decoder = new XWWWFormUrlInputIterator(in); - - assertTrue(decoder.hasNext()); - FormParameter param = decoder.next(); - assertNotNull(param); - assertEquals(name1, param.getFormParameterName()); - InputStream vis = param.getFormParameterValue(); - assertNotNull(vis); - InputStreamReader r = new InputStreamReader(vis); - char[] buf = new char[value1.length() + 1]; - int len = r.read(buf); - assertEquals(value1.length(), len); - assertEquals(value1, new String(buf, 0, len)); - - assertTrue(decoder.hasNext()); - param = decoder.next(); - assertNotNull(param); - assertEquals(name2, param.getFormParameterName()); - vis = param.getFormParameterValue(); - assertNotNull(vis); - r = new InputStreamReader(vis); - buf = new char[value2.length() + 1]; - len = r.read(buf); - assertEquals(value2.length(), len); - assertEquals(value2, new String(buf, 0, len)); - - assertFalse(decoder.hasNext()); - } - - @Test - public void testURLEnc() throws IOException { - - String name = "name"; - byte[] value = new byte[128]; - for (int i = 0; i < value.length; i++) { - value[i] = (byte) i; - } - - String encValue = URLEncoder.encode(new String(value, "UTF-8"), "ASCII"); - System.out.println(encValue); - - ByteArrayOutputStream os = new ByteArrayOutputStream(); - OutputStreamWriter w = new OutputStreamWriter(os, Charset.forName("UTF-8")); - w.write(name); - w.write("="); - w.write(encValue); - w.flush(); - w.close(); - - ByteArrayInputStream in = new ByteArrayInputStream(os.toByteArray()); - XWWWFormUrlInputIterator decoder = new XWWWFormUrlInputIterator(in); - - assertTrue(decoder.hasNext()); - FormParameter param = decoder.next(); - assertNotNull(param); - assertEquals(name, param.getFormParameterName()); - InputStream vis = param.getFormParameterValue(); - assertNotNull(vis); - byte[] buf = new byte[value.length]; - int len = vis.read(buf); - assertArrayEquals(value, buf); - assertEquals(value.length, len); - assertFalse(decoder.hasNext()); - Exception ex = null; - try { - decoder.next(); - } catch (Exception e) { - ex = e; - } - assertNotNull(ex); - - } - - @Test - public void testURLEnc1() throws IOException { - - InputStream urlEncStream = new BufferedInputStream(getClass() - .getResourceAsStream("XWWWFormUrlEncoded1.txt")); - - XWWWFormUrlInputIterator decoder = new XWWWFormUrlInputIterator(urlEncStream); - - assertTrue(decoder.hasNext()); - FormParameter param = decoder.next(); - assertNotNull(param); - assertEquals("XMLRequest", param.getFormParameterName()); - InputStream vis = param.getFormParameterValue(); - assertNotNull(vis); - ByteArrayOutputStream os = new ByteArrayOutputStream(); - byte[] buf = new byte[1024]; - for (int l; (l = vis.read(buf)) != -1;) { - os.write(buf, 0, l); - } - assertEquals(-1, vis.read()); - assertFalse(decoder.hasNext()); - assertEquals(-1, urlEncStream.read()); - - } - - @Test - public void testURLEnc2() throws IOException { - - InputStream urlEncStream = new BufferedInputStream(getClass() - .getResourceAsStream("XWWWFormUrlEncoded2.txt")); - - XWWWFormUrlInputIterator decoder = new XWWWFormUrlInputIterator(urlEncStream); - - assertTrue(decoder.hasNext()); - FormParameter param = decoder.next(); - assertNotNull(param); - assertEquals("XMLRequest", param.getFormParameterName()); - InputStream vis = param.getFormParameterValue(); - assertNotNull(vis); - ByteArrayOutputStream os = new ByteArrayOutputStream(); - byte[] buf = new byte[1024]; - for (int l; (l = vis.read(buf)) != -1;) { - os.write(buf, 0, l); - } - assertEquals(-1, vis.read()); - vis.close(); - - assertTrue(decoder.hasNext()); - param = decoder.next(); - assertNotNull(param); - assertEquals("EmptyParam", param.getFormParameterName()); - vis = param.getFormParameterValue(); - assertNotNull(vis); - assertEquals(-1, vis.read()); - vis.close(); - - assertTrue(decoder.hasNext()); - param = decoder.next(); - assertNotNull(param); - assertEquals("TransferParam__", param.getFormParameterName()); - vis = param.getFormParameterValue(); - assertNotNull(vis); - for (int l = 0; (l = vis.read(buf)) != -1;) { - os.write(buf, 0, l); - } - assertEquals(-1, vis.read()); - vis.close(); - - } - - @Ignore - @Test - public void testURLEncLoremIpsum() throws IOException { - - InputStream urlEncStream = new BufferedInputStream(getClass() - .getResourceAsStream("UrlEncodedLoremIpsum.txt")); - - XWWWFormUrlInputIterator decoder = new XWWWFormUrlInputIterator(urlEncStream); - - assertTrue(decoder.hasNext()); - FormParameter param = decoder.next(); - assertNotNull(param); - assertEquals("LoremIpsum", param.getFormParameterName()); - InputStream vis = param.getFormParameterValue(); - assertNotNull(vis); - ByteArrayOutputStream os = new ByteArrayOutputStream(); - byte[] buf = new byte[1024]; - for (int l; (l = vis.read(buf)) != -1;) { - os.write(buf, 0, l); - } - assertEquals(-1, vis.read()); - vis.close(); - - assertFalse(decoder.hasNext()); - - } - - - public static void main(String[] args) throws IOException { - - URL resource = XWWWFormUrlInputIteratorTest.class - .getResource("LoremIpsum.txt"); - - BufferedInputStream is = new BufferedInputStream(resource.openStream()); - - InputStreamReader reader = new InputStreamReader(is, "UTF-8"); - - StringBuilder sb = new StringBuilder(); - char[] b = new char[1024]; - for (int l; (l = reader.read(b)) != -1;) { - sb.append(b, 0, l); - } - String li = sb.toString(); - - FileOutputStream os = new FileOutputStream("UrlEncodedLoremIpsum.txt"); - OutputStreamWriter writer = new OutputStreamWriter(new BufferedOutputStream(os), "ISO-8859-1"); - URLEncodingWriter encoder = new URLEncodingWriter(writer); - - for (int i = 0; i < 100; i++) { - encoder.write(li); - } - - encoder.flush(); - encoder.close(); - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java deleted file mode 100644 index d97d741d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package at.gv.egiz.bku.conf;
-
-import iaik.x509.X509Certificate;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.cert.CertificateException;
-
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class CertValidatorTest {
-
- private CertValidator cv;
-
- @Before
- public void setUp() throws URISyntaxException {
- cv = new CertValidatorImpl();
- URL caDir = getClass().getClassLoader().getResource("at/gv/egiz/bku/conf/certs/CACerts");
- URL certDir = getClass().getClassLoader().getResource("at/gv/egiz/bku/conf/certs/certStore");
- cv.init(new File(caDir.toURI()), new File(certDir.toURI()));
- }
-
- @Test
- public void testValid() throws CertificateException, IOException {
- X509Certificate cert = new X509Certificate(getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/conf/certs/testCerts/www.a-trust.at.der"));
- assertTrue(cv.isCertificateValid("TID", new X509Certificate[]{cert}));
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/conf/DummyConfiguration.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/conf/DummyConfiguration.java deleted file mode 100644 index 1e0e5aa9..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/conf/DummyConfiguration.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package at.gv.egiz.bku.conf; - -/** - * - * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at> - */ -public class DummyConfiguration extends Configuration { - - public DummyConfiguration() { - this.setMaxDataUrlHops(MAX_DATAURL_HOPS_DEFAULT); - //this.set... - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java deleted file mode 100644 index 7a087b38..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands; - -import static org.junit.Assert.assertTrue; - -import java.io.Reader; -import java.io.StringReader; - -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.slexceptions.SLVersionException; -import at.gv.egiz.stal.dummy.DummySTAL; - -public class SLCommandFactoryTest { - - protected static ApplicationContext appCtx; - SLCommandFactory factory; - SLCommandContext context; - - @BeforeClass - public static void setUpClass() { - appCtx = new ClassPathXmlApplicationContext("at/gv/egiz/bku/slcommands/testApplicationContext.xml"); - } - - @Before - public void setUp() { - factory = SLCommandFactory.getInstance(); - context = new SLCommandContext(); - context.setSTAL(new DummySTAL()); - } - - @Test - public void createNullOperationCommand() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException { - Reader requestReader = new StringReader( - "<NullOperationRequest xmlns=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>"); - Source source = new StreamSource(requestReader); - - SLCommand slCommand = factory.createSLCommand(source, context); - - assertTrue(slCommand instanceof NullOperationCommand); - } - - @Test(expected=SLCommandException.class) - public void createUnsupportedCommand() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException { - Reader requestReader = new StringReader( - "<CreateCMSSignatureRequest xmlns=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2# file:/home/clemens/IAIK/BKU2/svn/bku/utils/src/main/schema/Core-1.2.xsd\" Structure=\"detached\"><KeyboxIdentifier></KeyboxIdentifier><DataObject><MetaInfo><MimeType></MimeType></MetaInfo><Content><Base64Content></Base64Content></Content></DataObject></CreateCMSSignatureRequest>"); - Source source = new StreamSource(requestReader); - - factory.createSLCommand(source, context); - - } - - @Test(expected=SLRequestException.class) - public void createMalformedCommand() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException { - Reader requestReader = new StringReader( - "<NullOperationRequest xmlns=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\">" + - "missplacedContent" + - "</NullOperationRequest>"); - Source source = new StreamSource(requestReader); - - factory.createSLCommand(source, context); - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureComandImplTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureComandImplTest.java deleted file mode 100644 index 4e9b4cd7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureComandImplTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl;
-
-import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import iaik.xml.crypto.XSecProvider; - -import java.io.InputStream; -import java.security.Security; - -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import at.gv.egiz.bku.slcommands.CreateXMLSignatureCommand; -import at.gv.egiz.bku.slcommands.InfoboxReadCommand; -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLCommandFactory; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.slexceptions.SLVersionException; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.dummy.DummySTAL; -//@Ignore
-public class CreateXMLSignatureComandImplTest {
-
- private SLCommandFactory factory;
-
- private STAL stal;
-
- @BeforeClass
- public static void setUpClass() {
- - new ClassPathXmlApplicationContext("at/gv/egiz/bku/slcommands/testApplicationContext.xml"); -
- Security.addProvider(new STALProvider());
- XSecProvider.addAsProvider(true);
- }
-
- @Before
- public void setUp() {
- factory = SLCommandFactory.getInstance();
- stal = new DummySTAL();
- }
-
- @Test
- public void testCreateXMLSignatureRequest() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext();
- context.setSTAL(stal);
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof CreateXMLSignatureCommand);
-
- SLResult result = command.execute();
- result.writeTo(new StreamResult(System.out), false);
- }
-
-// @Test(expected=SLCommandException.class)
- public void testInfboxReadRequestInvalid1() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext();
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand);
- }
-
-// @Test(expected=SLCommandException.class)
- public void testInfboxReadRequestInvalid2() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext();
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand);
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImplTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImplTest.java deleted file mode 100644 index aa2bcd62..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImplTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import java.io.ByteArrayOutputStream; -import java.util.Locale; - -import javax.xml.transform.stream.StreamResult; - -import org.junit.Test; - -import at.gv.egiz.bku.slcommands.ErrorResult; -import at.gv.egiz.bku.slexceptions.SLException; - -public class ErrorResultImplTest { - - @Test - public void writeTo() { - - SLException slException = new SLException(0,"test.noerror", null); - ErrorResult errorResult = new ErrorResultImpl(slException, Locale.getDefault()); - - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - StreamResult result = new StreamResult(stream); - errorResult.writeTo(result, false); - - System.out.println(stream.toString()); - - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadComandImplTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadComandImplTest.java deleted file mode 100644 index bfc784f7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadComandImplTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl;
-
-import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.InputStream; - -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import at.gv.egiz.bku.slcommands.ErrorResult; -import at.gv.egiz.bku.slcommands.InfoboxReadCommand; -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLCommandFactory; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.slexceptions.SLVersionException; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.dummy.DummySTAL; - -//@Ignore
-public class InfoboxReadComandImplTest {
-
- private static ApplicationContext appCtx; - - private SLCommandFactory factory;
-
- private STAL stal;
-
- @BeforeClass - public static void setUpClass() { - appCtx = new ClassPathXmlApplicationContext("at/gv/egiz/bku/slcommands/testApplicationContext.xml"); - } - - @Before
- public void setUp() {
- factory = SLCommandFactory.getInstance();
- stal = new DummySTAL();
- }
-
- @Test
- public void testInfboxReadRequest() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext();
- context.setSTAL(stal);
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand);
-
- SLResult result = command.execute();
- result.writeTo(new StreamResult(System.out), false);
- }
-
- @Test(expected=SLCommandException.class)
- public void testInfboxReadRequestInvalid1() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext(); - context.setSTAL(stal);
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand);
- }
-
- public void testInfboxReadRequestInvalid2() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext(); - context.setSTAL(stal);
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand); - - SLResult result = command.execute(); - assertTrue(result instanceof ErrorResult);
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImplTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImplTest.java deleted file mode 100644 index e9b0775f..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/NullOperationResultImplTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl; - -import java.io.ByteArrayOutputStream; - -import javax.xml.transform.stream.StreamResult; - -import org.junit.Test; - -import at.gv.egiz.bku.slcommands.NullOperationResult; - -public class NullOperationResultImplTest { - - @Test - public void writeTo() { - - NullOperationResult nullOperationResult = new NullOperationResultImpl(); - - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - StreamResult result = new StreamResult(stream); - nullOperationResult.writeTo(result, false); - - System.out.println(stream.toString()); - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/SVPersonendatenInfoboxImplTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/SVPersonendatenInfoboxImplTest.java deleted file mode 100644 index a17f0797..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/SVPersonendatenInfoboxImplTest.java +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl;
-
-import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import iaik.asn1.CodingException; - -import java.io.IOException; -import java.io.InputStream; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.junit.Ignore; -import org.junit.Test; -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import at.buergerkarte.namespaces.cardchannel.AttributeList; -import at.buergerkarte.namespaces.cardchannel.ObjectFactory; -import at.gv.egiz.bku.slcommands.ErrorResult; -import at.gv.egiz.bku.slcommands.InfoboxReadCommand; -import at.gv.egiz.bku.slcommands.SLCommand; -import at.gv.egiz.bku.slcommands.SLCommandContext; -import at.gv.egiz.bku.slcommands.SLCommandFactory; -import at.gv.egiz.bku.slcommands.SLMarshallerFactory; -import at.gv.egiz.bku.slcommands.SLResult; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLRuntimeException; -import at.gv.egiz.bku.slexceptions.SLVersionException; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.dummy.DummySTAL; - -//@Ignore
-public class SVPersonendatenInfoboxImplTest {
- - private byte[] EHIC = new byte[] { - (byte) 0x30, (byte) 0x6b, (byte) 0x30, (byte) 0x12, (byte) 0x06, (byte) 0x08, (byte) 0x2a, (byte) 0x28, - (byte) 0x00, (byte) 0x0a, (byte) 0x01, (byte) 0x04, (byte) 0x01, (byte) 0x14, (byte) 0x31, (byte) 0x06, - (byte) 0x04, (byte) 0x04, (byte) 0x42, (byte) 0x47, (byte) 0x4b, (byte) 0x4b, (byte) 0x30, (byte) 0x12, - (byte) 0x06, (byte) 0x08, (byte) 0x2a, (byte) 0x28, (byte) 0x00, (byte) 0x0a, (byte) 0x01, (byte) 0x04, - (byte) 0x01, (byte) 0x15, (byte) 0x31, (byte) 0x06, (byte) 0x12, (byte) 0x04, (byte) 0x31, (byte) 0x33, - (byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x22, (byte) 0x06, (byte) 0x08, (byte) 0x2a, (byte) 0x28, - (byte) 0x00, (byte) 0x0a, (byte) 0x01, (byte) 0x04, (byte) 0x01, (byte) 0x16, (byte) 0x31, (byte) 0x16, - (byte) 0x12, (byte) 0x14, (byte) 0x38, (byte) 0x30, (byte) 0x30, (byte) 0x34, (byte) 0x30, (byte) 0x30, - (byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x32, (byte) 0x33, (byte) 0x30, (byte) 0x30, - (byte) 0x34, (byte) 0x37, (byte) 0x30, (byte) 0x37, (byte) 0x35, (byte) 0x39, (byte) 0x30, (byte) 0x1d, - (byte) 0x06, (byte) 0x08, (byte) 0x2a, (byte) 0x28, (byte) 0x00, (byte) 0x0a, (byte) 0x01, (byte) 0x04, - (byte) 0x01, (byte) 0x17, (byte) 0x31, (byte) 0x11, (byte) 0x18, (byte) 0x0f, (byte) 0x32, (byte) 0x30, - (byte) 0x30, (byte) 0x35, (byte) 0x30, (byte) 0x37, (byte) 0x30, (byte) 0x31, (byte) 0x31, (byte) 0x32, - (byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x5a - }; -
- private static ApplicationContext appCtx; - - private SLCommandFactory factory;
-
- private STAL stal;
-
-// @BeforeClass - public static void setUpClass() { - appCtx = new ClassPathXmlApplicationContext("at/gv/egiz/bku/slcommands/testApplicationContext.xml"); - } - -// @Before
- public void setUp() {
- factory = SLCommandFactory.getInstance();
- stal = new DummySTAL();
- }
- - @Test - public void testEHIC() throws SLCommandException, JAXBException, CodingException, IOException { - - AttributeList attributeList = SVPersonendatenInfoboxImpl.createAttributeList(EHIC); - - JAXBElement<AttributeList> ehic = new ObjectFactory().createEHIC(attributeList); - - Marshaller marshaller = SLMarshallerFactory.getInstance().createMarshaller(false); - - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); - - marshaller.marshal(ehic, System.out); - - } - - @Ignore
- @Test
- public void testInfboxReadRequest() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext();
- context.setSTAL(stal);
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand);
-
- SLResult result = command.execute();
- result.writeTo(new StreamResult(System.out), false);
- }
- - @Ignore
- @Test(expected=SLCommandException.class)
- public void testInfboxReadRequestInvalid1() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext(); - context.setSTAL(stal);
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand);
- }
- - @Ignore
- public void testInfboxReadRequestInvalid2() throws SLCommandException, SLRuntimeException, SLRequestException, SLVersionException {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml");
- assertNotNull(inputStream);
-
- SLCommandContext context = new SLCommandContext(); - context.setSTAL(stal);
- SLCommand command = factory.createSLCommand(new StreamSource(inputStream), context);
- assertTrue(command instanceof InfoboxReadCommand); - - SLResult result = command.execute(); - assertTrue(result instanceof ErrorResult);
- }
-
-}
diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java deleted file mode 100644 index ccd29e85..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/impl/xsect/SignatureTest.java +++ /dev/null @@ -1,853 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.bku.slcommands.impl.xsect; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import iaik.xml.crypto.XSecProvider; - -import java.io.IOException; -import java.io.InputStream; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.List; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLSocketFactory; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.crypto.MarshalException; -import javax.xml.crypto.dsig.CanonicalizationMethod; -import javax.xml.crypto.dsig.DigestMethod; -import javax.xml.crypto.dsig.Reference; -import javax.xml.crypto.dsig.SignatureMethod; -import javax.xml.crypto.dsig.Transform; -import javax.xml.crypto.dsig.XMLObject; -import javax.xml.crypto.dsig.XMLSignatureException; -import javax.xml.crypto.dsig.XMLSignatureFactory; -import javax.xml.crypto.dsig.dom.DOMSignContext; -import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; -import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec; -import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec; -import javax.xml.stream.XMLEventReader; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; - -import org.junit.BeforeClass; -import org.junit.Test; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.ls.DOMImplementationLS; -import org.w3c.dom.ls.LSOutput; -import org.w3c.dom.ls.LSSerializer; - -import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureRequestType; -import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; -import at.buergerkarte.namespaces.securitylayer._1.ObjectFactory; -import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType; -import at.gv.egiz.bku.slexceptions.SLCommandException; -import at.gv.egiz.bku.slexceptions.SLRequestException; -import at.gv.egiz.bku.slexceptions.SLViewerException; -import at.gv.egiz.bku.utils.urldereferencer.StreamData; -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer; -import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext; -import at.gv.egiz.bku.utils.urldereferencer.URLProtocolHandler; -import at.gv.egiz.dom.DOMUtils; -import at.gv.egiz.slbinding.RedirectEventFilter; -import at.gv.egiz.slbinding.RedirectUnmarshallerListener; -import org.junit.Ignore; - -public class SignatureTest { - - private class AlgorithmMethodFactoryImpl implements AlgorithmMethodFactory { - - @Override - public CanonicalizationMethod createCanonicalizationMethod( - SignatureContext signatureContext) { - - XMLSignatureFactory signatureFactory = signatureContext.getSignatureFactory(); - - try { - return signatureFactory.newCanonicalizationMethod(CanonicalizationMethod.EXCLUSIVE, (C14NMethodParameterSpec) null); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - @Override - public DigestMethod createDigestMethod(SignatureContext signatureContext) { - - XMLSignatureFactory signatureFactory = signatureContext.getSignatureFactory(); - - try { - return signatureFactory.newDigestMethod(DigestMethod.SHA1, (DigestMethodParameterSpec) null); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - @Override - public SignatureMethod createSignatureMethod( - SignatureContext signatureContext) { - - XMLSignatureFactory signatureFactory = signatureContext.getSignatureFactory(); - - try { - return signatureFactory.newSignatureMethod(SignatureMethod.RSA_SHA1, (SignatureMethodParameterSpec) null); - } catch (Exception e) { - throw new RuntimeException(e); - } - - } - - } - - private static final String RESOURCE_PREFIX = "at/gv/egiz/bku/slcommands/impl/"; - - private static Unmarshaller unmarshaller; - - private static PrivateKey privateKey; - - private static X509Certificate certificate; - - @BeforeClass - public static void setUpClass() throws JAXBException, NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException, UnrecoverableKeyException { - - XSecProvider.addAsProvider(true); - - String packageName = ObjectFactory.class.getPackage().getName(); - packageName += ":" - + org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); - JAXBContext jaxbContext = JAXBContext.newInstance(packageName); - - unmarshaller = jaxbContext.createUnmarshaller(); - - initURLDereferencer(); - - ClassLoader classLoader = SignatureTest.class.getClassLoader(); - InputStream certStream = classLoader.getResourceAsStream(RESOURCE_PREFIX + "Cert.p12"); - assertNotNull("Certificate not found.", certStream); - - char[] passwd = "1622".toCharArray(); - - KeyStore keystore = KeyStore.getInstance("PKCS12"); - keystore.load(certStream, passwd); - String firstAlias = keystore.aliases().nextElement(); - certificate = (X509Certificate) keystore.getCertificate(firstAlias); - privateKey = (PrivateKey) keystore.getKey(firstAlias, passwd); - - } - - private static void initURLDereferencer() { - - URLDereferencer.getInstance().registerHandler("testlocal", new URLProtocolHandler() { - - @Override - public StreamData dereference(String url, URLDereferencerContext context) - throws IOException { - - ClassLoader classLoader = SignatureTest.class.getClassLoader(); - - String filename = url.split(":", 2)[1]; - - InputStream stream = classLoader.getResourceAsStream(RESOURCE_PREFIX + filename); - - if (stream == null) { - - throw new IOException("Failed to resolve resource '" + url + "'."); - - } else { - - String contentType; - if (filename.endsWith(".xml")) { - contentType = "text/xml"; - } else if (filename.endsWith(".txt")) { - contentType = "text/plain"; - } else { - contentType = ""; - } - - return new StreamData(url, contentType, stream); - - } - - } - - @Override - public void setHostnameVerifier(HostnameVerifier hostnameVerifier) { - // TODO Auto-generated method stub - - } - - @Override - public void setSSLSocketFactory(SSLSocketFactory socketFactory) { - // TODO Auto-generated method stub - - } - - }); - - } - - private Object unmarshal(String file) throws XMLStreamException, JAXBException { - - ClassLoader classLoader = SignatureTest.class.getClassLoader(); - InputStream resourceStream = classLoader.getResourceAsStream(RESOURCE_PREFIX + file); - assertNotNull(resourceStream); - - XMLInputFactory inputFactory = XMLInputFactory.newInstance(); - XMLEventReader eventReader = inputFactory.createXMLEventReader(resourceStream); - RedirectEventFilter redirectEventFilter = new RedirectEventFilter(); - XMLEventReader filteredReader = inputFactory.createFilteredReader(eventReader, redirectEventFilter); - - unmarshaller.setListener(new RedirectUnmarshallerListener(redirectEventFilter)); - - return unmarshaller.unmarshal(filteredReader); - - } - - // - // - // SignatureInfo - // - // - - @SuppressWarnings("unchecked") - private SignatureInfoCreationType unmarshalSignatureInfo(String file) throws JAXBException, XMLStreamException { - - Object object = unmarshal(file); - - Object requestType = ((JAXBElement) object).getValue(); - - assertTrue(requestType instanceof CreateXMLSignatureRequestType); - - SignatureInfoCreationType signatureInfo = ((CreateXMLSignatureRequestType) requestType).getSignatureInfo(); - - assertNotNull(signatureInfo); - - return signatureInfo; - - } - - @Test - public void testSetSignatureInfo_Base64_1() throws JAXBException, SLCommandException, XMLStreamException { - - SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Base64_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), null); - - signature.setSignatureInfo(signatureInfo); - - Node parent = signature.getParent(); - Node nextSibling = signature.getNextSibling(); - - assertNotNull(parent); - assertTrue("urn:document".equals(parent.getNamespaceURI())); - assertTrue("XMLDocument".equals(parent.getLocalName())); - - assertNotNull(nextSibling); - assertTrue("urn:document".equals(nextSibling.getNamespaceURI())); - assertTrue("Paragraph".equals(nextSibling.getLocalName())); - - } - - @Test - public void testSetSignature_Base64_2() throws JAXBException, SLCommandException, XMLStreamException { - - SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Base64_2.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), null); - - signature.setSignatureInfo(signatureInfo); - - Node parent = signature.getParent(); - Node nextSibling = signature.getNextSibling(); - - assertNotNull(parent); - assertTrue("XMLDocument".equals(parent.getLocalName())); - - assertNotNull(nextSibling); - assertTrue("Paragraph".equals(nextSibling.getLocalName())); - - } - - @Test - public void testSetSignature_Base64_3() throws JAXBException, SLCommandException, XMLStreamException { - - SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Base64_3.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), null); - - signature.setSignatureInfo(signatureInfo); - - Node parent = signature.getParent(); - Node nextSibling = signature.getNextSibling(); - - assertNotNull(parent); - assertTrue("XMLDocument".equals(parent.getLocalName())); - - assertNotNull(nextSibling); - assertTrue("Paragraph".equals(nextSibling.getLocalName())); - - } - - @Test - public void testSetSignatureInfo_XMLContent_1() throws JAXBException, SLCommandException, XMLStreamException { - - SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_XMLContent_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), null); - - signature.setSignatureInfo(signatureInfo); - - Node parent = signature.getParent(); - Node nextSibling = signature.getNextSibling(); - - assertNotNull(parent); - assertTrue("urn:document".equals(parent.getNamespaceURI())); - assertTrue("Whole".equals(parent.getLocalName())); - - assertNull(nextSibling); - - } - - @Test - public void testSetSignature_Reference_1() throws JAXBException, SLCommandException, XMLStreamException { - - SignatureInfoCreationType signatureInfo = unmarshalSignatureInfo("SignatureInfo_Reference_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), null); - - signature.setSignatureInfo(signatureInfo); - - Node parent = signature.getParent(); - Node nextSibling = signature.getNextSibling(); - - assertNotNull(parent); - assertTrue("urn:document".equals(parent.getNamespaceURI())); - assertTrue("Paragraph".equals(parent.getLocalName())); - - assertNull(nextSibling); - - } - - // - // - // DataObject - // - // - - @SuppressWarnings("unchecked") - private List<DataObjectInfoType> unmarshalDataObjectInfo(String file) throws JAXBException, XMLStreamException { - - Object object = unmarshal(file); - - Object requestType = ((JAXBElement) object).getValue(); - - assertTrue(requestType instanceof CreateXMLSignatureRequestType); - - List<DataObjectInfoType> dataObjectInfos = ((CreateXMLSignatureRequestType) requestType).getDataObjectInfo(); - - assertNotNull(dataObjectInfos); - - return dataObjectInfos; - - } - - private void signAndMarshalSignature(Signature signature) throws MarshalException, XMLSignatureException, SLCommandException, SLViewerException { - - Node parent = signature.getParent(); - Node nextSibling = signature.getNextSibling(); - - DOMSignContext signContext = (nextSibling == null) - ? new DOMSignContext(privateKey, parent) - : new DOMSignContext(privateKey, parent, nextSibling); - - signature.sign(signContext); - - Document document = signature.getDocument(); - - DOMImplementationLS domImplLS = DOMUtils.getDOMImplementationLS(); - LSOutput output = domImplLS.createLSOutput(); - output.setByteStream(System.out); - - LSSerializer serializer = domImplLS.createLSSerializer(); -// serializer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE); - serializer.getDomConfig().setParameter("namespaces", Boolean.FALSE); - serializer.write(document, output); - - } - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_Base64Content_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Base64Content_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.setSignerCeritifcate(certificate); - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 1); - - Transform transform = transforms.get(0); - assertTrue(Transform.BASE64.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); - - XMLObject object = objects.get(0); - - assertTrue(("#" + object.getId()).equals(reference.getURI())); - - } - - @SuppressWarnings("unchecked") - @Test - - public void testDataObject_XMLContent_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_XMLContent_1 \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_XMLContent_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.setSignerCeritifcate(certificate); - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 2); - - Transform transform = transforms.get(0); - assertTrue(Transform.XPATH2.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); - - XMLObject object = objects.get(0); - - assertTrue(("#" + object.getId()).equals(reference.getURI())); - - } - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_XMLContent_2() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_XMLContent_2 \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_XMLContent_2.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.setSignerCeritifcate(certificate); - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 2); - - Transform transform = transforms.get(0); - assertTrue(Transform.XPATH2.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); - - XMLObject object = objects.get(0); - - assertTrue(("#" + object.getId()).equals(reference.getURI())); - - } - - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_LocRefContent_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_LocRefContent_1 \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_LocRefContent_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 2); - - Transform transform = transforms.get(0); - assertTrue(Transform.XPATH2.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); - - XMLObject object = objects.get(0); - - assertTrue(("#" + object.getId()).equals(reference.getURI())); - - } - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_LocRefContent_2() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_LocRefContent_2 \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_LocRefContent_2.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 1); - - Transform transform = transforms.get(0); - assertTrue(Transform.BASE64.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); - - XMLObject object = objects.get(0); - - assertTrue(("#" + object.getId()).equals(reference.getURI())); - - } - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_Reference_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_Reference_1 \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Reference_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 1); - - Transform transform = transforms.get(0); - assertTrue(Transform.BASE64.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 2.", objects.size() == 2); - - XMLObject object = objects.get(0); - - assertTrue(("#" + object.getId()).equals(reference.getURI())); - - } - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_Detached_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_Detached_1 \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Detached_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 0); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue(objects.size() == 1); - - } - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_Detached_Base64Content() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_Detached_Base64Content \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Detached_Base64Content.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 0); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue(objects.size() == 1); - - } - - @SuppressWarnings("unchecked") - @Test - public void testDataObject_Detached_LocRefContent() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - System.out.println("\n ****************** testDataObject_Detached_LocRefContent \n"); - - List<DataObjectInfoType> dataObjectInfos = unmarshalDataObjectInfo("DataObjectInfo_Detached_LocRefContent.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue(transforms.size() == 0); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue(objects.size() == 1); - - } - - // - // - // TransformsInfo - // - // - - @SuppressWarnings("unchecked") - private CreateXMLSignatureRequestType unmarshalCreateXMLSignatureRequest(String file) throws JAXBException, XMLStreamException { - - Object object = unmarshal(file); - - Object requestType = ((JAXBElement) object).getValue(); - - assertTrue(requestType instanceof CreateXMLSignatureRequestType); - - return (CreateXMLSignatureRequestType) requestType; - - } - - - @SuppressWarnings("unchecked") - @Test - public void testTransformsInfo_1() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - CreateXMLSignatureRequestType requestType = unmarshalCreateXMLSignatureRequest("TransformsInfo_1.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - - signature.setSignatureInfo(requestType.getSignatureInfo()); - - List<DataObjectInfoType> dataObjectInfos = requestType.getDataObjectInfo(); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.setSignerCeritifcate(certificate); - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue("Size " + transforms.size() + "", transforms.size() == 3); - - Transform transform = transforms.get(0); - assertTrue(Transform.ENVELOPED.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 1.", objects.size() == 1); - - } - - @SuppressWarnings("unchecked") - @Test - @Ignore - public void testTransformsInfo_2() throws JAXBException, SLCommandException, XMLStreamException, SLRequestException, MarshalException, XMLSignatureException, SLViewerException { - - CreateXMLSignatureRequestType requestType = unmarshalCreateXMLSignatureRequest("TransformsInfo_2.xml"); - - Signature signature = new Signature(null, new IdValueFactoryImpl(), new AlgorithmMethodFactoryImpl()); - - - signature.setSignatureInfo(requestType.getSignatureInfo()); - - List<DataObjectInfoType> dataObjectInfos = requestType.getDataObjectInfo(); - - for (DataObjectInfoType dataObjectInfo : dataObjectInfos) { - signature.addDataObject(dataObjectInfo); - } - - signature.setSignerCeritifcate(certificate); - - signature.buildXMLSignature(); - - signAndMarshalSignature(signature); - - List<Reference> references = signature.getReferences(); - assertTrue(references.size() == 2); - - Reference reference = references.get(0); - assertNotNull(reference.getId()); - - List<Transform> transforms = reference.getTransforms(); - assertTrue("Size " + transforms.size() + "", transforms.size() == 2); - - Transform transform = transforms.get(0); - assertTrue(Transform.XSLT.equals(transform.getAlgorithm())); - - List<XMLObject> objects = signature.getXMLObjects(); - assertNotNull(objects); - assertTrue("Size " + objects.size() + " but should be 1.", objects.size() == 1); - - } - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java b/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java deleted file mode 100644 index 8adeadee..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package at.gv.egiz.stal.dummy; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.security.KeyStore; -import java.security.PrivateKey; -import java.security.Signature; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; -import java.util.Locale; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.stal.ErrorResponse; -import at.gv.egiz.stal.InfoboxReadRequest; -import at.gv.egiz.stal.InfoboxReadResponse; -import at.gv.egiz.stal.STAL; -import at.gv.egiz.stal.STALRequest; -import at.gv.egiz.stal.STALResponse; -import at.gv.egiz.stal.SignRequest; -import at.gv.egiz.stal.SignResponse; - -public class DummySTAL implements STAL { - - static Log log = LogFactory.getLog(DummySTAL.class); - - protected X509Certificate cert = null; - protected PrivateKey privateKey = null; - - public DummySTAL() { - try { - KeyStore ks = KeyStore.getInstance("pkcs12"); - InputStream ksStream = getClass().getClassLoader().getResourceAsStream( - "at/gv/egiz/bku/slcommands/impl/Cert.p12"); - ks.load(ksStream, "1622".toCharArray()); - for (Enumeration<String> aliases = ks.aliases(); aliases - .hasMoreElements();) { - String alias = aliases.nextElement(); - log.debug("Found alias " + alias + " in keystore"); - if (ks.isKeyEntry(alias)) { - log.debug("Found key entry for alias: " + alias); - privateKey = (PrivateKey) ks.getKey(alias, "1622".toCharArray()); - cert = (X509Certificate) ks.getCertificate(alias); - System.out.println(cert); - } - } - } catch (Exception e) { - log.error(e); - } - - } - - @Override - public List<STALResponse> handleRequest(List<? extends STALRequest> requestList) { - - List<STALResponse> responses = new ArrayList<STALResponse>(); - for (STALRequest request : requestList) { - - log.debug("Got STALRequest " + request + "."); - - if (request instanceof InfoboxReadRequest) { - - String infoboxIdentifier = ((InfoboxReadRequest) request) - .getInfoboxIdentifier(); - InputStream stream = getClass().getClassLoader().getResourceAsStream( - "at/gv/egiz/stal/dummy/infoboxes4/" + infoboxIdentifier + ".bin"); - - STALResponse response; - if (stream != null) { - - log.debug("Infobox " + infoboxIdentifier + " found."); - - byte[] infobox; - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - int b; - while ((b = stream.read()) != -1) { - buffer.write(b); - } - infobox = buffer.toByteArray(); - } catch (IOException e) { - throw new RuntimeException(e); - } - - InfoboxReadResponse infoboxReadResponse = new InfoboxReadResponse(); - infoboxReadResponse.setInfoboxValue(infobox); - response = infoboxReadResponse; - - } else if ((infoboxIdentifier.equals("SecureSignatureKeypair")) ||(infoboxIdentifier.equals("CertifiedKeypair"))) { - try { - InfoboxReadResponse infoboxReadResponse = new InfoboxReadResponse(); - infoboxReadResponse.setInfoboxValue(cert.getEncoded()); - response = infoboxReadResponse; - } catch (CertificateEncodingException e) { - log.error(e); - response = new ErrorResponse(); - } - } else { - - log.debug("Infobox " + infoboxIdentifier + " not found."); - - response = new ErrorResponse(); - } - responses.add(response); - - } else if (request instanceof SignRequest) { - try { - - SignRequest signReq = (SignRequest) request; - Signature s = Signature.getInstance("SHA1withRSA"); - s.initSign(privateKey); - s.update(signReq.getSignedInfo()); - byte[] sigVal = s.sign(); - SignResponse resp = new SignResponse(); - resp.setSignatureValue(sigVal); - responses.add(resp); - } catch (Exception e) { - log.error(e); - responses.add(new ErrorResponse()); - } - - } else { - - log.debug("Request not implemented."); - - responses.add(new ErrorResponse()); - } - - } - - return responses; - } -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/MOASPClient.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/MOASPClient.java deleted file mode 100644 index ade5b38b..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/MOASPClient.java +++ /dev/null @@ -1,276 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package moaspss; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.net.URL; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.SchemaOutputResolver; -import javax.xml.bind.Unmarshaller; -import javax.xml.bind.Validator; -import javax.xml.namespace.QName; -import javax.xml.transform.Result; - -import moaspss.generated.ContentOptionalRefType; -import moaspss.generated.InputDataType; -import moaspss.generated.MOAFault; -import moaspss.generated.ObjectFactory; -import moaspss.generated.SignatureVerificationPortType; -import moaspss.generated.SignatureVerificationService; -import moaspss.generated.VerifyXMLSignatureRequestType; -import moaspss.generated.VerifyXMLSignatureResponseType; -import moaspss.generated.VerifyXMLSignatureRequestType.VerifySignatureInfo; - -import org.w3c.dom.Node; -import org.w3c.dom.bootstrap.DOMImplementationRegistry; -import org.w3c.dom.ls.DOMImplementationLS; -import org.w3c.dom.ls.LSOutput; -import org.w3c.dom.ls.LSSerializer; - -import com.sun.xml.bind.api.Bridge; -import com.sun.xml.bind.api.BridgeContext; -import com.sun.xml.bind.api.JAXBRIContext; -import com.sun.xml.bind.api.RawAccessor; -import com.sun.xml.bind.api.TypeReference; -import com.sun.xml.bind.marshaller.NamespacePrefixMapper; -import com.sun.xml.ws.api.model.SEIModel; -import com.sun.xml.ws.developer.JAXBContextFactory; -import com.sun.xml.ws.developer.UsesJAXBContextFeature; - -@SuppressWarnings("deprecation") -public class MOASPClient { - - private static class JAXBContextHolder { - - private static final JAXBContext context; - - static { - try { - context = JAXBRIContext.newInstance(VerifyXMLSignatureRequestType.class.getPackage().getName()); - } catch (JAXBException e) { - throw new RuntimeException("Failed to setup JAXBContext.", e); - } - } - - } - - public static JAXBContext getJAXBContext() { - return JAXBContextHolder.context; - } - - public static class ClientJAXBContextFactory implements JAXBContextFactory { - - @SuppressWarnings("unchecked") - public JAXBRIContext createJAXBContext(final SEIModel sei, - final List<Class> classesToBind, final List<TypeReference> typeReferences) - throws JAXBException { - - System.out.println("Create Context"); - - return new JAXBRIContext() { - - JAXBRIContext context = JAXBRIContext.newInstance(classesToBind.toArray - (new Class[classesToBind.size()]), - typeReferences, null, sei.getTargetNamespace(), false, null); - - @Override - public Validator createValidator() throws JAXBException { - return context.createValidator(); - } - - @Override - public Unmarshaller createUnmarshaller() throws JAXBException { - return context.createUnmarshaller(); - } - - @Override - public Marshaller createMarshaller() throws JAXBException { - Marshaller marshaller = context.createMarshaller(); - ClientNamespacePrefixMapper pm = new ClientNamespacePrefixMapper(); - System.out.println(pm.toString()); - marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", pm); - return marshaller; - } - - @Override - public boolean hasSwaRef() { - return context.hasSwaRef(); - } - - @Override - public QName getTypeName(TypeReference arg0) { - return context.getTypeName(arg0); - } - - @Override - public List<String> getKnownNamespaceURIs() { - return context.getKnownNamespaceURIs(); - } - - @Override - public <B, V> RawAccessor<B, V> getElementPropertyAccessor(Class<B> arg0, - String arg1, String arg2) throws JAXBException { - return context.getElementPropertyAccessor(arg0, arg1, arg2); - } - - @Override - public QName getElementName(Object arg0) throws JAXBException { - return context.getElementName(arg0); - } - - @Override - public String getBuildId() { - return context.getBuildId(); - } - - @Override - public void generateSchema(SchemaOutputResolver arg0) throws IOException { - context.generateSchema(arg0); - } - - @Override - public void generateEpisode(Result arg0) { - context.generateEpisode(arg0); - } - - @Override - public BridgeContext createBridgeContext() { - return context.createBridgeContext(); - } - - @Override - public Bridge createBridge(TypeReference arg0) { - return context.createBridge(arg0); - } - }; - - } - - } - - public static class ClientNamespacePrefixMapper extends NamespacePrefixMapper { - - protected static final Map<String, String> prefixMap = new HashMap<String, String>(); - - static { - prefixMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsi"); - prefixMap.put("http://reference.e-government.gv.at/namespace/moa/20020822#", "moa"); - prefixMap.put("http://www.w3.org/2000/09/xmldsig#", "dsig"); - prefixMap.put("http://uri.etsi.org/01903/v1.1.1#", "xades"); - } - - - @Override - public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { - - String prefix = prefixMap.get(namespaceUri); - - return (prefix != null) ? prefix : suggestion; - } - - /** - * Returns a list of namespace URIs that should be declared - * at the root element. - * <p> - * By default, the JAXB RI produces namespace declarations only when - * they are necessary, only at where they are used. Because of this - * lack of look-ahead, sometimes the marshaller produces a lot of - * namespace declarations that look redundant to human eyes. For example, - */ - @Override - public String[] getPreDeclaredNamespaceUris() { - return new String[]{ "http://www.w3.org/2000/09/xmldsig#" }; - } - } - - - private SignatureVerificationPortType port; - - public MOASPClient() { - QName serviceName = new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationService"); - - URL wsdlURL = MOASPClient.class.getClassLoader().getResource("MOA-SPSS-1.3.wsdl"); - - SignatureVerificationService service = new SignatureVerificationService(wsdlURL, serviceName); - - UsesJAXBContextFeature feature = new UsesJAXBContextFeature(ClientJAXBContextFactory.class); - - port = service.getSignatureVerificationPort(feature); - } - - public JAXBElement<VerifyXMLSignatureResponseType> verifySignature(Node node, - String signatureLocation, String trustProfileId) throws JAXBException, - IOException, ClassCastException, ClassNotFoundException, - InstantiationException, IllegalAccessException { - - DOMImplementationLS domImpl = (DOMImplementationLS) DOMImplementationRegistry - .newInstance().getDOMImplementation("LS"); - - LSSerializer serializer = domImpl.createLSSerializer(); - - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - LSOutput output = domImpl.createLSOutput(); - output.setByteStream(bos); - serializer.write(node, output); - - ObjectFactory factory = new ObjectFactory(); - - ContentOptionalRefType contentOptionalRefType = factory.createContentOptionalRefType(); - contentOptionalRefType.setBase64Content(bos.toByteArray()); - - VerifySignatureInfo verifySignatureInfo = factory.createVerifyXMLSignatureRequestTypeVerifySignatureInfo(); - verifySignatureInfo.setVerifySignatureEnvironment(contentOptionalRefType); - verifySignatureInfo.setVerifySignatureLocation(signatureLocation); - - VerifyXMLSignatureRequestType verifyXMLSignatureRequestType = factory.createVerifyXMLSignatureRequestType(); - verifyXMLSignatureRequestType.setVerifySignatureInfo(verifySignatureInfo); - verifyXMLSignatureRequestType.setTrustProfileID(trustProfileId); - verifyXMLSignatureRequestType.setReturnHashInputData(Boolean.TRUE); - - VerifyXMLSignatureResponseType resp = null; - try { - resp = port.verifyXMLSignature(verifyXMLSignatureRequestType); - } catch (MOAFault e) { - e.printStackTrace(); - } - - JAXBElement<VerifyXMLSignatureResponseType> verifyXMLSignatureResponse = factory.createVerifyXMLSignatureResponse(resp); - - Marshaller marshaller = getJAXBContext().createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); - marshaller.marshal(verifyXMLSignatureResponse, System.out); - - List<InputDataType> hashInputData = resp.getHashInputData(); - for (InputDataType inputDataType : hashInputData) { - System.out.println("------------------------------------------"); - System.out.println("HashInputData: " + inputDataType.getPartOf() + " " + inputDataType.getReferringSigReference()); - System.out.println("------------------------------------------"); - System.out.write(inputDataType.getBase64Content()); - System.out.println(); - } - - return verifyXMLSignatureResponse; - } -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/SLClient.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/SLClient.java deleted file mode 100644 index c3561bfe..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/SLClient.java +++ /dev/null @@ -1,175 +0,0 @@ -package moaspss; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.UnsupportedEncodingException; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.ProtocolException; -import java.net.URL; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -import at.gv.egiz.bku.utils.URLEncodingWriter; - -public class SLClient { - - private static class JAXBContextHolder { - - private static JAXBContext context; - - { - String slPkg = at.buergerkarte.namespaces.securitylayer._1.ObjectFactory.class.getPackage().getName(); - String xmldsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName(); - String samlPkg = oasis.names.tc.saml._1_0.assertion.ObjectFactory.class.getPackage().getName(); - String prPkg = at.buergerkarte.namespaces.personenbindung._20020506_.ObjectFactory.class.getPackage().getName(); - try { - context = JAXBContext.newInstance(slPkg + ":" + xmldsigPkg + ":" + samlPkg + ":" + prPkg); - } catch (JAXBException e) { - throw new RuntimeException("Failed to setup JAXBContext.", e); - } - } - - } - - public static JAXBContext getJAXBContext() { - return JAXBContextHolder.context; - } - - private URL slUrl; - - private URL slUrlSSL; - - private boolean useSSL = false; - - public SLClient() { - try { - slUrl = new URL("http://localhost:3495/http-security-layer-request"); - slUrlSSL = new URL("https://localhost:3496/https-security-layer-request"); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - } - - public Object submitRequest(Element request, Class<?> responseType) - throws SLException, TransformerException, IOException { - - URL url = (useSSL) ? slUrlSSL : slUrl; - - HttpURLConnection connection; - int responseCode; - try { - connection = (HttpURLConnection) url.openConnection(); - connection.setRequestMethod("POST"); - connection.setDoOutput(true); - connection.setDoInput(true); - connection.connect(); - - OutputStream outputStream = connection.getOutputStream(); - OutputStreamWriter streamWriter = new OutputStreamWriter(outputStream, "ISO-8859-1"); - streamWriter.write("XMLRequest="); - URLEncodingWriter urlEnc = new URLEncodingWriter(streamWriter); - - TransformerFactory tf = TransformerFactory.newInstance(); - Transformer transformer = tf.newTransformer(); - Source source = new DOMSource(request); - Result result = new StreamResult(urlEnc); - transformer.transform(source, result); - urlEnc.flush(); - streamWriter.flush(); - outputStream.close(); - responseCode = connection.getResponseCode(); - - } catch (ProtocolException e) { - throw new RuntimeException(e); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - - if (responseCode == 200) { - String[] contentType = connection.getContentType().split(";", 2); - - if ("text/xml".equals(contentType[0])) { - - Reader streamReader; - try { - InputStream inputStream = connection.getInputStream(); - - String charset = "ISO-8859-1"; - if (contentType.length > 1 - && (contentType[1].trim()).startsWith("charset=")) { - charset = contentType[1].split("=", 2)[1]; - } - - streamReader = new InputStreamReader(inputStream, charset); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - - if (JAXBElement.class.isAssignableFrom(responseType)) { - Object obj; - try { - Unmarshaller unmarshaller = getJAXBContext().createUnmarshaller(); - obj = unmarshaller.unmarshal(streamReader); - } catch (JAXBException e) { - throw new SLException(9000, e); - } - if (obj instanceof JAXBElement<?>) { - return obj; - } else { - throw new SLException(9000, "Got unexpected response."); - } - } else if (Element.class.isAssignableFrom(responseType)) { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - Document doc; - try { - DocumentBuilder db = dbf.newDocumentBuilder(); - doc = db.parse(new InputSource(streamReader)); - } catch (ParserConfigurationException e) { - throw new SLException(9000, e); - } catch (SAXException e) { - throw new SLException(9000, e); - } catch (IOException e) { - throw new SLException(9000, e); - } - return doc.getDocumentElement(); - } else { - throw new SLException(9000, "Unsupported response type " - + responseType); - } - - } else { - throw new SLException(9000, "Got unexpected content type " - + contentType + "."); - } - } else { - throw new SLException(9000, "Got unexpected response code " - + responseCode + "."); - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/SLException.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/SLException.java deleted file mode 100644 index 4b43d6e7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/SLException.java +++ /dev/null @@ -1,40 +0,0 @@ -package moaspss; - -public class SLException extends Exception { - - private static final long serialVersionUID = 1L; - - private int code; - - private String info; - - public SLException() { - super(); - } - - public SLException(int code, String info) { - super(code + ": " + info); - this.code = code; - this.info = info; - } - - public SLException(Throwable cause, int code, String info) { - super(code + ": " + info, cause); - this.code = code; - this.info = info; - } - - public SLException(int code, Throwable cause) { - super(code + ": " + cause.getMessage(), cause); - this.code = code; - } - - public int getCode() { - return code; - } - - public String getInfo() { - return info; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/TestCreateAndVerifySignature.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/TestCreateAndVerifySignature.java deleted file mode 100644 index a9397d31..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/TestCreateAndVerifySignature.java +++ /dev/null @@ -1,163 +0,0 @@ -package moaspss; - -import static junit.framework.Assert.fail; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.Iterator; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerException; - -import moaspss.generated.KeyInfoType; -import moaspss.generated.VerifyXMLSignatureResponseType; -import moaspss.generated.X509DataType; - -import org.junit.Ignore; -import org.junit.Test; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentFragment; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import at.buergerkarte.namespaces.securitylayer._1.ErrorResponseType; - -//@Ignore -public class TestCreateAndVerifySignature { - - protected Element parseCreateXMLSignatureRequest(InputStream is) - throws ParserConfigurationException, SAXException, IOException { - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - Document doc; - DocumentBuilder db = dbf.newDocumentBuilder(); - doc = db.parse(is); - - Element docElem = doc.getDocumentElement(); - if ("http://www.buergerkarte.at/namespaces/securitylayer/1.2#".equals(docElem.getNamespaceURI()) - && "CreateXMLSignatureRequest".equals(docElem.getLocalName())) { - return docElem; - } else { - return null; - } - - } - - protected DocumentFragment getXMLSignatureFromResponse(String xpath, Object response) throws SLException, JAXBException { - - if (response instanceof Element) { - - Element respElem = (Element) response; - if ("http://www.buergerkarte.at/namespaces/securitylayer/1.2#".equals(respElem.getNamespaceURI()) - && "CreateXMLSignatureResponse".equals(respElem.getLocalName())) { - - NodeList childNodes = respElem.getChildNodes(); - - Document doc = respElem.getOwnerDocument(); - DocumentFragment fragment = doc.createDocumentFragment(); - - for (int i = 0; i < childNodes.getLength(); i++) { - fragment.appendChild(childNodes.item(i)); - } - - return fragment; - - } else { - Unmarshaller unmarshaller = SLClient.getJAXBContext().createUnmarshaller(); - Object obj = unmarshaller.unmarshal(respElem); - - if (obj instanceof JAXBElement<?>) { - JAXBElement<?> element = (JAXBElement<?>) obj; - if (element.getValue() instanceof ErrorResponseType) { - ErrorResponseType error = (ErrorResponseType) element.getValue(); - throw new SLException(error.getErrorCode(), error.getInfo()); - } - } - } - } - - return null; - - } - - public X509Certificate getCertFromKeyInfo(KeyInfoType keyInfo) throws CertificateException { - - Iterator<Object> keyInfos = keyInfo.getContent().iterator(); - while (keyInfos.hasNext()) { - Object ki = keyInfos.next(); - if (ki instanceof JAXBElement<?> - && X509DataType.class.isAssignableFrom(((JAXBElement<?>) ki) - .getDeclaredType())) { - X509DataType x509data = (X509DataType) ((JAXBElement<?>) ki).getValue(); - Iterator<Object> contents = x509data - .getX509IssuerSerialOrX509SKIOrX509SubjectName().iterator(); - while (contents.hasNext()) { - Object content = (Object) contents.next(); - if (byte[].class.isAssignableFrom(((JAXBElement<?>) content) - .getDeclaredType())) { - CertificateFactory certFactory = CertificateFactory.getInstance("X509"); - byte[] b = (byte[]) ((JAXBElement<?>) content).getValue(); - return (X509Certificate) certFactory.generateCertificate(new ByteArrayInputStream(b)); - } - } - - } - } - - return null; - - } - - @Test - public void testCreateAndVerifyXMLSignature() - throws ParserConfigurationException, SAXException, IOException, - TransformerException, JAXBException, ClassCastException, - ClassNotFoundException, InstantiationException, IllegalAccessException, CertificateException { - - ClassLoader cl = TestCreateAndVerifySignature.class.getClassLoader(); - InputStream is = cl.getResourceAsStream("moaspss/CreateXMLSignatureRequest.xml"); - Element cxsReq = parseCreateXMLSignatureRequest(is); - - Node cxsResp; - try { - SLClient slClient = new SLClient(); - Object response = slClient.submitRequest(cxsReq, Element.class); - cxsResp = getXMLSignatureFromResponse(".", response); - } catch (SLException e) { - fail(e.getMessage()); - return; - } - - MOASPClient spClient = new MOASPClient(); - JAXBElement<VerifyXMLSignatureResponseType> verifySignature = spClient.verifySignature(cxsResp, ".", "qualifiedSignature+Test"); - VerifyXMLSignatureResponseType vxsResp = verifySignature.getValue(); - int signatureCheck = vxsResp.getSignatureCheck().getCode().intValue(); - if (signatureCheck != 0) { - fail("SignatureCheck = " + signatureCheck); - } - int certificateCheck = vxsResp.getCertificateCheck().getCode().intValue(); - if (certificateCheck != 0) { - - X509Certificate certificate = getCertFromKeyInfo(vxsResp.getSignerInfo()); - if (certificate != null) { - System.out.println(certificate); - } - - fail("CertificateCheck = " + certificateCheck); - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/AllSignatoriesType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/AllSignatoriesType.java deleted file mode 100644 index 99e28c1a..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/AllSignatoriesType.java +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for AllSignatoriesType. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * <p> - * <pre> - * <simpleType name="AllSignatoriesType"> - * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> - * <enumeration value="all"/> - * </restriction> - * </simpleType> - * </pre> - * - */ -@XmlType(name = "AllSignatoriesType") -@XmlEnum -public enum AllSignatoriesType { - - @XmlEnumValue("all") - ALL("all"); - private final String value; - - AllSignatoriesType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static AllSignatoriesType fromValue(String v) { - for (AllSignatoriesType c: AllSignatoriesType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/AnyChildrenType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/AnyChildrenType.java deleted file mode 100644 index 81dd4472..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/AnyChildrenType.java +++ /dev/null @@ -1,96 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for AnyChildrenType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="AnyChildrenType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AnyChildrenType", propOrder = { - "content" -}) -@XmlSeeAlso({ - ReferencesCheckResultInfoType.class, - XMLContentType.class, - ManifestRefsCheckResultInfoType.class -}) -public class AnyChildrenType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * {@link Element } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CMSContentBaseType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CMSContentBaseType.java deleted file mode 100644 index 7356b655..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CMSContentBaseType.java +++ /dev/null @@ -1,51 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for CMSContentBaseType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CMSContentBaseType"> - * <complexContent> - * <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"> - * <choice minOccurs="0"> - * <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CMSContentBaseType") -public class CMSContentBaseType - extends ContentOptionalRefType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CMSDataObjectOptionalMetaType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CMSDataObjectOptionalMetaType.java deleted file mode 100644 index 887e7de5..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CMSDataObjectOptionalMetaType.java +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for CMSDataObjectOptionalMetaType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CMSDataObjectOptionalMetaType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="MetaInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}MetaInfoType" minOccurs="0"/> - * <element name="Content" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CMSContentBaseType"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CMSDataObjectOptionalMetaType", propOrder = { - "metaInfo", - "content" -}) -public class CMSDataObjectOptionalMetaType { - - @XmlElement(name = "MetaInfo") - protected MetaInfoType metaInfo; - @XmlElement(name = "Content", required = true) - protected CMSContentBaseType content; - - /** - * Gets the value of the metaInfo property. - * - * @return - * possible object is - * {@link MetaInfoType } - * - */ - public MetaInfoType getMetaInfo() { - return metaInfo; - } - - /** - * Sets the value of the metaInfo property. - * - * @param value - * allowed object is - * {@link MetaInfoType } - * - */ - public void setMetaInfo(MetaInfoType value) { - this.metaInfo = value; - } - - /** - * Gets the value of the content property. - * - * @return - * possible object is - * {@link CMSContentBaseType } - * - */ - public CMSContentBaseType getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is - * {@link CMSContentBaseType } - * - */ - public void setContent(CMSContentBaseType value) { - this.content = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CanonicalizationMethodType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CanonicalizationMethodType.java deleted file mode 100644 index 889419db..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CanonicalizationMethodType.java +++ /dev/null @@ -1,118 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for CanonicalizationMethodType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CanonicalizationMethodType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CanonicalizationMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class CanonicalizationMethodType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Object } - * {@link String } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CheckResultType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CheckResultType.java deleted file mode 100644 index 48f28dac..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CheckResultType.java +++ /dev/null @@ -1,114 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for CheckResultType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CheckResultType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/> - * <element name="Info" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CheckResultType", propOrder = { - "code", - "info" -}) -@XmlSeeAlso({ - ManifestRefsCheckResultType.class, - ReferencesCheckResultType.class -}) -public class CheckResultType { - - @XmlElement(name = "Code", required = true) - @XmlSchemaType(name = "nonNegativeInteger") - protected BigInteger code; - @XmlElement(name = "Info") - protected AnyChildrenType info; - - /** - * Gets the value of the code property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getCode() { - return code; - } - - /** - * Sets the value of the code property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setCode(BigInteger value) { - this.code = value; - } - - /** - * Gets the value of the info property. - * - * @return - * possible object is - * {@link AnyChildrenType } - * - */ - public AnyChildrenType getInfo() { - return info; - } - - /** - * Sets the value of the info property. - * - * @param value - * allowed object is - * {@link AnyChildrenType } - * - */ - public void setInfo(AnyChildrenType value) { - this.info = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentBaseType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentBaseType.java deleted file mode 100644 index ffd96202..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentBaseType.java +++ /dev/null @@ -1,139 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ContentBaseType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ContentBaseType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice minOccurs="0"> - * <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="XMLContent" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLContentType"/> - * <element name="LocRefContent" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentBaseType", propOrder = { - "base64Content", - "xmlContent", - "locRefContent" -}) -@XmlSeeAlso({ - ContentExLocRefBaseType.class, - ContentOptionalRefType.class -}) -public class ContentBaseType { - - @XmlElement(name = "Base64Content") - protected byte[] base64Content; - @XmlElement(name = "XMLContent") - protected XMLContentType xmlContent; - @XmlElement(name = "LocRefContent") - @XmlSchemaType(name = "anyURI") - protected String locRefContent; - - /** - * Gets the value of the base64Content property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getBase64Content() { - return base64Content; - } - - /** - * Sets the value of the base64Content property. - * - * @param value - * allowed object is - * byte[] - */ - public void setBase64Content(byte[] value) { - this.base64Content = ((byte[]) value); - } - - /** - * Gets the value of the xmlContent property. - * - * @return - * possible object is - * {@link XMLContentType } - * - */ - public XMLContentType getXMLContent() { - return xmlContent; - } - - /** - * Sets the value of the xmlContent property. - * - * @param value - * allowed object is - * {@link XMLContentType } - * - */ - public void setXMLContent(XMLContentType value) { - this.xmlContent = value; - } - - /** - * Gets the value of the locRefContent property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getLocRefContent() { - return locRefContent; - } - - /** - * Sets the value of the locRefContent property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLocRefContent(String value) { - this.locRefContent = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentExLocRefBaseType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentExLocRefBaseType.java deleted file mode 100644 index 00a884f0..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentExLocRefBaseType.java +++ /dev/null @@ -1,56 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ContentExLocRefBaseType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ContentExLocRefBaseType"> - * <complexContent> - * <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentBaseType"> - * <choice minOccurs="0"> - * <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="XMLContent" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLContentType"/> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentExLocRefBaseType") -@XmlSeeAlso({ - InputDataType.class -}) -public class ContentExLocRefBaseType - extends ContentBaseType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentOptionalRefType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentOptionalRefType.java deleted file mode 100644 index 73cdfcf9..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentOptionalRefType.java +++ /dev/null @@ -1,84 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ContentOptionalRefType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ContentOptionalRefType"> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentBaseType"> - * <attribute name="Reference" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentOptionalRefType") -@XmlSeeAlso({ - CMSContentBaseType.class, - ContentRequiredRefType.class, - moaspss.generated.DataObjectInfoType.DataObject.class -}) -public class ContentOptionalRefType - extends ContentBaseType -{ - - @XmlAttribute(name = "Reference") - @XmlSchemaType(name = "anyURI") - protected String reference; - - /** - * Gets the value of the reference property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getReference() { - return reference; - } - - /** - * Sets the value of the reference property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setReference(String value) { - this.reference = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentRequiredRefType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentRequiredRefType.java deleted file mode 100644 index 4b9f7524..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ContentRequiredRefType.java +++ /dev/null @@ -1,54 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ContentRequiredRefType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ContentRequiredRefType"> - * <complexContent> - * <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"> - * <choice minOccurs="0"> - * <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="XMLContent" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLContentType"/> - * <element name="LocRefContent" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> - * </choice> - * <attribute name="Reference" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentRequiredRefType") -public class ContentRequiredRefType - extends ContentOptionalRefType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateSignatureEnvironmentProfile.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateSignatureEnvironmentProfile.java deleted file mode 100644 index 22d7ef7c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateSignatureEnvironmentProfile.java +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="CreateSignatureLocation" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureLocationType"/> - * <element name="Supplement" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}XMLDataObjectAssociationType" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "createSignatureLocation", - "supplement" -}) -@XmlRootElement(name = "CreateSignatureEnvironmentProfile") -public class CreateSignatureEnvironmentProfile { - - @XmlElement(name = "CreateSignatureLocation", required = true) - protected CreateSignatureLocationType createSignatureLocation; - @XmlElement(name = "Supplement") - protected List<XMLDataObjectAssociationType> supplement; - - /** - * Gets the value of the createSignatureLocation property. - * - * @return - * possible object is - * {@link CreateSignatureLocationType } - * - */ - public CreateSignatureLocationType getCreateSignatureLocation() { - return createSignatureLocation; - } - - /** - * Sets the value of the createSignatureLocation property. - * - * @param value - * allowed object is - * {@link CreateSignatureLocationType } - * - */ - public void setCreateSignatureLocation(CreateSignatureLocationType value) { - this.createSignatureLocation = value; - } - - /** - * Gets the value of the supplement property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the supplement property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSupplement().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link XMLDataObjectAssociationType } - * - * - */ - public List<XMLDataObjectAssociationType> getSupplement() { - if (supplement == null) { - supplement = new ArrayList<XMLDataObjectAssociationType>(); - } - return this.supplement; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateSignatureLocationType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateSignatureLocationType.java deleted file mode 100644 index f6278d07..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateSignatureLocationType.java +++ /dev/null @@ -1,109 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for CreateSignatureLocationType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CreateSignatureLocationType"> - * <simpleContent> - * <extension base="<http://www.w3.org/2001/XMLSchema>token"> - * <attribute name="Index" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" /> - * </extension> - * </simpleContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CreateSignatureLocationType", propOrder = { - "value" -}) -public class CreateSignatureLocationType { - - @XmlValue - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "token") - protected String value; - @XmlAttribute(name = "Index", required = true) - protected BigInteger index; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the index property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getIndex() { - return index; - } - - /** - * Sets the value of the index property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setIndex(BigInteger value) { - this.index = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateTransformsInfoProfile.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateTransformsInfoProfile.java deleted file mode 100644 index d39c2a63..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateTransformsInfoProfile.java +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="CreateTransformsInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}TransformsInfoType"/> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}Supplement" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "createTransformsInfo", - "supplement" -}) -@XmlRootElement(name = "CreateTransformsInfoProfile") -public class CreateTransformsInfoProfile { - - @XmlElement(name = "CreateTransformsInfo", required = true) - protected TransformsInfoType createTransformsInfo; - @XmlElement(name = "Supplement") - protected List<XMLDataObjectAssociationType> supplement; - - /** - * Gets the value of the createTransformsInfo property. - * - * @return - * possible object is - * {@link TransformsInfoType } - * - */ - public TransformsInfoType getCreateTransformsInfo() { - return createTransformsInfo; - } - - /** - * Sets the value of the createTransformsInfo property. - * - * @param value - * allowed object is - * {@link TransformsInfoType } - * - */ - public void setCreateTransformsInfo(TransformsInfoType value) { - this.createTransformsInfo = value; - } - - /** - * Gets the value of the supplement property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the supplement property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSupplement().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link XMLDataObjectAssociationType } - * - * - */ - public List<XMLDataObjectAssociationType> getSupplement() { - if (supplement == null) { - supplement = new ArrayList<XMLDataObjectAssociationType>(); - } - return this.supplement; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequest.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequest.java deleted file mode 100644 index 92dc9b4b..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateXMLSignatureRequestType"> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "") -@XmlRootElement(name = "CreateXMLSignatureRequest") -public class CreateXMLSignatureRequest - extends CreateXMLSignatureRequestType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequestType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequestType.java deleted file mode 100644 index aad14567..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureRequestType.java +++ /dev/null @@ -1,466 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for CreateXMLSignatureRequestType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CreateXMLSignatureRequestType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="KeyIdentifier" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}KeyIdentifierType"/> - * <element name="SingleSignatureInfo" maxOccurs="unbounded"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="DataObjectInfo" maxOccurs="unbounded"> - * <complexType> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}DataObjectInfoType"> - * <attribute name="ChildOfManifest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> - * </extension> - * </complexContent> - * </complexType> - * </element> - * <element name="CreateSignatureInfo" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="CreateSignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/> - * <choice> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureEnvironmentProfile"/> - * <element name="CreateSignatureEnvironmentProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/> - * </choice> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * <attribute name="SecurityLayerConformity" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CreateXMLSignatureRequestType", propOrder = { - "keyIdentifier", - "singleSignatureInfo" -}) -@XmlSeeAlso({ - CreateXMLSignatureRequest.class -}) -public class CreateXMLSignatureRequestType { - - @XmlElement(name = "KeyIdentifier", required = true) - protected String keyIdentifier; - @XmlElement(name = "SingleSignatureInfo", required = true) - protected List<CreateXMLSignatureRequestType.SingleSignatureInfo> singleSignatureInfo; - - /** - * Gets the value of the keyIdentifier property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getKeyIdentifier() { - return keyIdentifier; - } - - /** - * Sets the value of the keyIdentifier property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setKeyIdentifier(String value) { - this.keyIdentifier = value; - } - - /** - * Gets the value of the singleSignatureInfo property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the singleSignatureInfo property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSingleSignatureInfo().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link CreateXMLSignatureRequestType.SingleSignatureInfo } - * - * - */ - public List<CreateXMLSignatureRequestType.SingleSignatureInfo> getSingleSignatureInfo() { - if (singleSignatureInfo == null) { - singleSignatureInfo = new ArrayList<CreateXMLSignatureRequestType.SingleSignatureInfo>(); - } - return this.singleSignatureInfo; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="DataObjectInfo" maxOccurs="unbounded"> - * <complexType> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}DataObjectInfoType"> - * <attribute name="ChildOfManifest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> - * </extension> - * </complexContent> - * </complexType> - * </element> - * <element name="CreateSignatureInfo" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="CreateSignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/> - * <choice> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureEnvironmentProfile"/> - * <element name="CreateSignatureEnvironmentProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/> - * </choice> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * <attribute name="SecurityLayerConformity" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "dataObjectInfo", - "createSignatureInfo" - }) - public static class SingleSignatureInfo { - - @XmlElement(name = "DataObjectInfo", required = true) - protected List<CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo> dataObjectInfo; - @XmlElement(name = "CreateSignatureInfo") - protected CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo createSignatureInfo; - @XmlAttribute(name = "SecurityLayerConformity") - protected Boolean securityLayerConformity; - - /** - * Gets the value of the dataObjectInfo property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the dataObjectInfo property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getDataObjectInfo().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo } - * - * - */ - public List<CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo> getDataObjectInfo() { - if (dataObjectInfo == null) { - dataObjectInfo = new ArrayList<CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo>(); - } - return this.dataObjectInfo; - } - - /** - * Gets the value of the createSignatureInfo property. - * - * @return - * possible object is - * {@link CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo } - * - */ - public CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo getCreateSignatureInfo() { - return createSignatureInfo; - } - - /** - * Sets the value of the createSignatureInfo property. - * - * @param value - * allowed object is - * {@link CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo } - * - */ - public void setCreateSignatureInfo(CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo value) { - this.createSignatureInfo = value; - } - - /** - * Gets the value of the securityLayerConformity property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isSecurityLayerConformity() { - if (securityLayerConformity == null) { - return true; - } else { - return securityLayerConformity; - } - } - - /** - * Sets the value of the securityLayerConformity property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setSecurityLayerConformity(Boolean value) { - this.securityLayerConformity = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="CreateSignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/> - * <choice> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateSignatureEnvironmentProfile"/> - * <element name="CreateSignatureEnvironmentProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/> - * </choice> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "createSignatureEnvironment", - "createSignatureEnvironmentProfile", - "createSignatureEnvironmentProfileID" - }) - public static class CreateSignatureInfo { - - @XmlElement(name = "CreateSignatureEnvironment", required = true) - protected ContentOptionalRefType createSignatureEnvironment; - @XmlElement(name = "CreateSignatureEnvironmentProfile") - protected CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile; - @XmlElement(name = "CreateSignatureEnvironmentProfileID") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - protected String createSignatureEnvironmentProfileID; - - /** - * Gets the value of the createSignatureEnvironment property. - * - * @return - * possible object is - * {@link ContentOptionalRefType } - * - */ - public ContentOptionalRefType getCreateSignatureEnvironment() { - return createSignatureEnvironment; - } - - /** - * Sets the value of the createSignatureEnvironment property. - * - * @param value - * allowed object is - * {@link ContentOptionalRefType } - * - */ - public void setCreateSignatureEnvironment(ContentOptionalRefType value) { - this.createSignatureEnvironment = value; - } - - /** - * Gets the value of the createSignatureEnvironmentProfile property. - * - * @return - * possible object is - * {@link CreateSignatureEnvironmentProfile } - * - */ - public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile() { - return createSignatureEnvironmentProfile; - } - - /** - * Sets the value of the createSignatureEnvironmentProfile property. - * - * @param value - * allowed object is - * {@link CreateSignatureEnvironmentProfile } - * - */ - public void setCreateSignatureEnvironmentProfile(CreateSignatureEnvironmentProfile value) { - this.createSignatureEnvironmentProfile = value; - } - - /** - * Gets the value of the createSignatureEnvironmentProfileID property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCreateSignatureEnvironmentProfileID() { - return createSignatureEnvironmentProfileID; - } - - /** - * Sets the value of the createSignatureEnvironmentProfileID property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCreateSignatureEnvironmentProfileID(String value) { - this.createSignatureEnvironmentProfileID = value; - } - - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}DataObjectInfoType"> - * <attribute name="ChildOfManifest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class DataObjectInfo - extends DataObjectInfoType - { - - @XmlAttribute(name = "ChildOfManifest") - protected Boolean childOfManifest; - - /** - * Gets the value of the childOfManifest property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isChildOfManifest() { - if (childOfManifest == null) { - return false; - } else { - return childOfManifest; - } - } - - /** - * Sets the value of the childOfManifest property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setChildOfManifest(Boolean value) { - this.childOfManifest = value; - } - - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureResponseType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureResponseType.java deleted file mode 100644 index 1b320998..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/CreateXMLSignatureResponseType.java +++ /dev/null @@ -1,160 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElements; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for CreateXMLSignatureResponseType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CreateXMLSignatureResponseType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice maxOccurs="unbounded"> - * <element name="SignatureEnvironment"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}ErrorResponse"/> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CreateXMLSignatureResponseType", propOrder = { - "signatureEnvironmentOrErrorResponse" -}) -public class CreateXMLSignatureResponseType { - - @XmlElements({ - @XmlElement(name = "ErrorResponse", type = ErrorResponseType.class), - @XmlElement(name = "SignatureEnvironment", type = CreateXMLSignatureResponseType.SignatureEnvironment.class) - }) - protected List<Object> signatureEnvironmentOrErrorResponse; - - /** - * Gets the value of the signatureEnvironmentOrErrorResponse property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the signatureEnvironmentOrErrorResponse property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSignatureEnvironmentOrErrorResponse().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link ErrorResponseType } - * {@link CreateXMLSignatureResponseType.SignatureEnvironment } - * - * - */ - public List<Object> getSignatureEnvironmentOrErrorResponse() { - if (signatureEnvironmentOrErrorResponse == null) { - signatureEnvironmentOrErrorResponse = new ArrayList<Object>(); - } - return this.signatureEnvironmentOrErrorResponse; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "any" - }) - public static class SignatureEnvironment { - - @XmlAnyElement(lax = true) - protected Object any; - - /** - * Gets the value of the any property. - * - * @return - * possible object is - * {@link Object } - * {@link Element } - * - */ - public Object getAny() { - return any; - } - - /** - * Sets the value of the any property. - * - * @param value - * allowed object is - * {@link Object } - * {@link Element } - * - */ - public void setAny(Object value) { - this.any = value; - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DSAKeyValueType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DSAKeyValueType.java deleted file mode 100644 index 085452f4..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DSAKeyValueType.java +++ /dev/null @@ -1,236 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for DSAKeyValueType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="DSAKeyValueType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <sequence minOccurs="0"> - * <element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/> - * <element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/> - * </sequence> - * <element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/> - * <element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/> - * <element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/> - * <sequence minOccurs="0"> - * <element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/> - * <element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/> - * </sequence> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "DSAKeyValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "p", - "q", - "g", - "y", - "j", - "seed", - "pgenCounter" -}) -public class DSAKeyValueType { - - @XmlElement(name = "P") - protected byte[] p; - @XmlElement(name = "Q") - protected byte[] q; - @XmlElement(name = "G") - protected byte[] g; - @XmlElement(name = "Y", required = true) - protected byte[] y; - @XmlElement(name = "J") - protected byte[] j; - @XmlElement(name = "Seed") - protected byte[] seed; - @XmlElement(name = "PgenCounter") - protected byte[] pgenCounter; - - /** - * Gets the value of the p property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getP() { - return p; - } - - /** - * Sets the value of the p property. - * - * @param value - * allowed object is - * byte[] - */ - public void setP(byte[] value) { - this.p = ((byte[]) value); - } - - /** - * Gets the value of the q property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getQ() { - return q; - } - - /** - * Sets the value of the q property. - * - * @param value - * allowed object is - * byte[] - */ - public void setQ(byte[] value) { - this.q = ((byte[]) value); - } - - /** - * Gets the value of the g property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getG() { - return g; - } - - /** - * Sets the value of the g property. - * - * @param value - * allowed object is - * byte[] - */ - public void setG(byte[] value) { - this.g = ((byte[]) value); - } - - /** - * Gets the value of the y property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getY() { - return y; - } - - /** - * Sets the value of the y property. - * - * @param value - * allowed object is - * byte[] - */ - public void setY(byte[] value) { - this.y = ((byte[]) value); - } - - /** - * Gets the value of the j property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getJ() { - return j; - } - - /** - * Sets the value of the j property. - * - * @param value - * allowed object is - * byte[] - */ - public void setJ(byte[] value) { - this.j = ((byte[]) value); - } - - /** - * Gets the value of the seed property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getSeed() { - return seed; - } - - /** - * Sets the value of the seed property. - * - * @param value - * allowed object is - * byte[] - */ - public void setSeed(byte[] value) { - this.seed = ((byte[]) value); - } - - /** - * Gets the value of the pgenCounter property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getPgenCounter() { - return pgenCounter; - } - - /** - * Sets the value of the pgenCounter property. - * - * @param value - * allowed object is - * byte[] - */ - public void setPgenCounter(byte[] value) { - this.pgenCounter = ((byte[]) value); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DataObjectInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DataObjectInfoType.java deleted file mode 100644 index b5f6fe27..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DataObjectInfoType.java +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for DataObjectInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="DataObjectInfoType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="DataObject"> - * <complexType> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"> - * </extension> - * </complexContent> - * </complexType> - * </element> - * <choice> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}CreateTransformsInfoProfile"/> - * <element name="CreateTransformsInfoProfileID" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ProfileIdentifierType"/> - * </choice> - * </sequence> - * <attribute name="Structure" use="required"> - * <simpleType> - * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> - * <enumeration value="detached"/> - * <enumeration value="enveloping"/> - * </restriction> - * </simpleType> - * </attribute> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "DataObjectInfoType", propOrder = { - "dataObject", - "createTransformsInfoProfile", - "createTransformsInfoProfileID" -}) -@XmlSeeAlso({ - moaspss.generated.CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo.class -}) -public class DataObjectInfoType { - - @XmlElement(name = "DataObject", required = true) - protected DataObjectInfoType.DataObject dataObject; - @XmlElement(name = "CreateTransformsInfoProfile") - protected CreateTransformsInfoProfile createTransformsInfoProfile; - @XmlElement(name = "CreateTransformsInfoProfileID") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - protected String createTransformsInfoProfileID; - @XmlAttribute(name = "Structure", required = true) - protected String structure; - - /** - * Gets the value of the dataObject property. - * - * @return - * possible object is - * {@link DataObjectInfoType.DataObject } - * - */ - public DataObjectInfoType.DataObject getDataObject() { - return dataObject; - } - - /** - * Sets the value of the dataObject property. - * - * @param value - * allowed object is - * {@link DataObjectInfoType.DataObject } - * - */ - public void setDataObject(DataObjectInfoType.DataObject value) { - this.dataObject = value; - } - - /** - * Gets the value of the createTransformsInfoProfile property. - * - * @return - * possible object is - * {@link CreateTransformsInfoProfile } - * - */ - public CreateTransformsInfoProfile getCreateTransformsInfoProfile() { - return createTransformsInfoProfile; - } - - /** - * Sets the value of the createTransformsInfoProfile property. - * - * @param value - * allowed object is - * {@link CreateTransformsInfoProfile } - * - */ - public void setCreateTransformsInfoProfile(CreateTransformsInfoProfile value) { - this.createTransformsInfoProfile = value; - } - - /** - * Gets the value of the createTransformsInfoProfileID property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCreateTransformsInfoProfileID() { - return createTransformsInfoProfileID; - } - - /** - * Sets the value of the createTransformsInfoProfileID property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCreateTransformsInfoProfileID(String value) { - this.createTransformsInfoProfileID = value; - } - - /** - * Gets the value of the structure property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStructure() { - return structure; - } - - /** - * Sets the value of the structure property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStructure(String value) { - this.structure = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class DataObject - extends ContentOptionalRefType - { - - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DigestMethodType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DigestMethodType.java deleted file mode 100644 index 7abbc50f..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/DigestMethodType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for DigestMethodType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="DigestMethodType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "DigestMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class DigestMethodType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * {@link Element } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ErrorResponseType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ErrorResponseType.java deleted file mode 100644 index e39bcf55..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ErrorResponseType.java +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ErrorResponseType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ErrorResponseType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="ErrorCode" type="{http://www.w3.org/2001/XMLSchema}integer"/> - * <element name="Info" type="{http://www.w3.org/2001/XMLSchema}string"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ErrorResponseType", propOrder = { - "errorCode", - "info" -}) -public class ErrorResponseType { - - @XmlElement(name = "ErrorCode", required = true) - protected BigInteger errorCode; - @XmlElement(name = "Info", required = true) - protected String info; - - /** - * Gets the value of the errorCode property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getErrorCode() { - return errorCode; - } - - /** - * Sets the value of the errorCode property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setErrorCode(BigInteger value) { - this.errorCode = value; - } - - /** - * Gets the value of the info property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getInfo() { - return info; - } - - /** - * Sets the value of the info property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setInfo(String value) { - this.info = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/FinalDataMetaInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/FinalDataMetaInfoType.java deleted file mode 100644 index 64fff8ed..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/FinalDataMetaInfoType.java +++ /dev/null @@ -1,82 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for FinalDataMetaInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="FinalDataMetaInfoType"> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}MetaInfoType"> - * <sequence> - * <element name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/> - * </sequence> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "FinalDataMetaInfoType", propOrder = { - "type" -}) -public class FinalDataMetaInfoType - extends MetaInfoType -{ - - @XmlElement(name = "Type") - @XmlSchemaType(name = "anyURI") - protected String type; - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/InputDataType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/InputDataType.java deleted file mode 100644 index a95bdce9..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/InputDataType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for InputDataType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="InputDataType"> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentExLocRefBaseType"> - * <attribute name="PartOf" default="SignedInfo"> - * <simpleType> - * <restriction base="{http://www.w3.org/2001/XMLSchema}token"> - * <enumeration value="SignedInfo"/> - * <enumeration value="XMLDSIGManifest"/> - * </restriction> - * </simpleType> - * </attribute> - * <attribute name="ReferringSigReference" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" /> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InputDataType") -public class InputDataType - extends ContentExLocRefBaseType -{ - - @XmlAttribute(name = "PartOf") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - protected String partOf; - @XmlAttribute(name = "ReferringSigReference") - @XmlSchemaType(name = "nonNegativeInteger") - protected BigInteger referringSigReference; - - /** - * Gets the value of the partOf property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPartOf() { - if (partOf == null) { - return "SignedInfo"; - } else { - return partOf; - } - } - - /** - * Sets the value of the partOf property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPartOf(String value) { - this.partOf = value; - } - - /** - * Gets the value of the referringSigReference property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getReferringSigReference() { - return referringSigReference; - } - - /** - * Sets the value of the referringSigReference property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setReferringSigReference(BigInteger value) { - this.referringSigReference = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyInfoType.java deleted file mode 100644 index d12ac599..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyInfoType.java +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.w3c.dom.Element; - - -/** - * <p>Java class for KeyInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="KeyInfoType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice maxOccurs="unbounded"> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyName"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyValue"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}X509Data"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}PGPData"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}SPKIData"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}MgmtData"/> - * <any/> - * </choice> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "KeyInfoType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class KeyInfoType { - - @XmlElementRefs({ - @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - }) - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link Element } - * {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >} - * {@link String } - * {@link JAXBElement }{@code <}{@link X509DataType }{@code >} - * {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} - * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} - * {@link Object } - * {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} - * {@link JAXBElement }{@code <}{@link String }{@code >} - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyStorageType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyStorageType.java deleted file mode 100644 index b03332aa..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyStorageType.java +++ /dev/null @@ -1,67 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for KeyStorageType. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * <p> - * <pre> - * <simpleType name="KeyStorageType"> - * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> - * <enumeration value="Software"/> - * <enumeration value="Hardware"/> - * </restriction> - * </simpleType> - * </pre> - * - */ -@XmlType(name = "KeyStorageType") -@XmlEnum -public enum KeyStorageType { - - @XmlEnumValue("Software") - SOFTWARE("Software"), - @XmlEnumValue("Hardware") - HARDWARE("Hardware"); - private final String value; - - KeyStorageType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static KeyStorageType fromValue(String v) { - for (KeyStorageType c: KeyStorageType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyValueType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyValueType.java deleted file mode 100644 index 2744b3e7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/KeyValueType.java +++ /dev/null @@ -1,101 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for KeyValueType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="KeyValueType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue"/> - * <any/> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "KeyValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class KeyValueType { - - @XmlElementRefs({ - @XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - }) - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link String } - * {@link Object } - * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} - * {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >} - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/MOAFault.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/MOAFault.java deleted file mode 100644 index ea986aed..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/MOAFault.java +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.ws.WebFault; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebFault(name = "ErrorResponse", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#") -public class MOAFault - extends Exception -{ - - /** - * Java type that goes as soapenv:Fault detail element. - * - */ - private ErrorResponseType faultInfo; - - /** - * - * @param message - * @param faultInfo - */ - public MOAFault(String message, ErrorResponseType faultInfo) { - super(message); - this.faultInfo = faultInfo; - } - - /** - * - * @param message - * @param faultInfo - * @param cause - */ - public MOAFault(String message, ErrorResponseType faultInfo, Throwable cause) { - super(message, cause); - this.faultInfo = faultInfo; - } - - /** - * - * @return - * returns fault bean: moaspss.generated.ErrorResponseType - */ - public ErrorResponseType getFaultInfo() { - return faultInfo; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultInfoType.java deleted file mode 100644 index a6935534..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultInfoType.java +++ /dev/null @@ -1,53 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ManifestRefsCheckResultInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ManifestRefsCheckResultInfoType"> - * <complexContent> - * <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType"> - * <sequence> - * <any/> - * <element name="FailedReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" maxOccurs="unbounded" minOccurs="0"/> - * <element name="ReferringSigReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ManifestRefsCheckResultInfoType") -public class ManifestRefsCheckResultInfoType - extends AnyChildrenType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultType.java deleted file mode 100644 index 96b95ba6..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestRefsCheckResultType.java +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ManifestRefsCheckResultType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ManifestRefsCheckResultType"> - * <complexContent> - * <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"> - * <sequence> - * <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/> - * <element name="Info" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ManifestRefsCheckResultInfoType"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ManifestRefsCheckResultType") -public class ManifestRefsCheckResultType - extends CheckResultType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestType.java deleted file mode 100644 index 7fcf45ac..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ManifestType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for ManifestType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ManifestType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ManifestType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "reference" -}) -public class ManifestType { - - @XmlElement(name = "Reference", required = true) - protected List<ReferenceType> reference; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the reference property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the reference property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getReference().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link ReferenceType } - * - * - */ - public List<ReferenceType> getReference() { - if (reference == null) { - reference = new ArrayList<ReferenceType>(); - } - return this.reference; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/MetaInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/MetaInfoType.java deleted file mode 100644 index 3c00c24b..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/MetaInfoType.java +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for MetaInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="MetaInfoType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="MimeType" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}MimeTypeType"/> - * <element name="Description" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MetaInfoType", propOrder = { - "mimeType", - "description", - "any" -}) -@XmlSeeAlso({ - FinalDataMetaInfoType.class -}) -public class MetaInfoType { - - @XmlElement(name = "MimeType", required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - protected String mimeType; - @XmlElement(name = "Description") - @XmlSchemaType(name = "anyURI") - protected String description; - @XmlAnyElement(lax = true) - protected List<Object> any; - - /** - * Gets the value of the mimeType property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMimeType() { - return mimeType; - } - - /** - * Sets the value of the mimeType property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMimeType(String value) { - this.mimeType = value; - } - - /** - * Gets the value of the description property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the any property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the any property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getAny().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Object } - * - * - */ - public List<Object> getAny() { - if (any == null) { - any = new ArrayList<Object>(); - } - return this.any; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ObjectFactory.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ObjectFactory.java deleted file mode 100644 index de270fec..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ObjectFactory.java +++ /dev/null @@ -1,1032 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.math.BigInteger; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the moaspss.generated package. - * <p>An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _CreateXMLSignatureResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "CreateXMLSignatureResponse"); - private final static QName _PGPData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPData"); - private final static QName _Signature_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Signature"); - private final static QName _DSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DSAKeyValue"); - private final static QName _VerifyCMSSignatureResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "VerifyCMSSignatureResponse"); - private final static QName _SupplementProfile_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "SupplementProfile"); - private final static QName _VerifyXMLSignatureRequest_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "VerifyXMLSignatureRequest"); - private final static QName _SPKIData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKIData"); - private final static QName _SignedInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignedInfo"); - private final static QName _RetrievalMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RetrievalMethod"); - private final static QName _CanonicalizationMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod"); - private final static QName _PublicAuthority_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "PublicAuthority"); - private final static QName _Object_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Object"); - private final static QName _SignatureProperty_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperty"); - private final static QName _Transforms_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transforms"); - private final static QName _Manifest_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Manifest"); - private final static QName _SignatureValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureValue"); - private final static QName _Transform_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transform"); - private final static QName _X509Data_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Data"); - private final static QName _SignatureMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureMethod"); - private final static QName _ErrorResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "ErrorResponse"); - private final static QName _KeyInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyInfo"); - private final static QName _DigestMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestMethod"); - private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue"); - private final static QName _MgmtData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "MgmtData"); - private final static QName _SignatureProperties_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperties"); - private final static QName _KeyName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyName"); - private final static QName _KeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyValue"); - private final static QName _Reference_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Reference"); - private final static QName _VerifyXMLSignatureResponse_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "VerifyXMLSignatureResponse"); - private final static QName _QualifiedCertificate_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "QualifiedCertificate"); - private final static QName _RSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RSAKeyValue"); - private final static QName _Supplement_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "Supplement"); - private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial"); - private final static QName _X509DataTypeX509Certificate_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Certificate"); - private final static QName _X509DataTypeX509SKI_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SKI"); - private final static QName _X509DataTypeX509SubjectName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SubjectName"); - private final static QName _X509DataTypeX509CRL_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509CRL"); - private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); - private final static QName _VerifyCMSSignatureResponseTypeCertificateCheck_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "CertificateCheck"); - private final static QName _VerifyCMSSignatureResponseTypeSignerInfo_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "SignerInfo"); - private final static QName _VerifyCMSSignatureResponseTypeSignatureCheck_QNAME = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "SignatureCheck"); - private final static QName _PGPDataTypePGPKeyID_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyID"); - private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket"); - private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); - private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: moaspss.generated - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link VerifyXMLSignatureRequestType } - * - */ - public VerifyXMLSignatureRequestType createVerifyXMLSignatureRequestType() { - return new VerifyXMLSignatureRequestType(); - } - - /** - * Create an instance of {@link TransformsType } - * - */ - public TransformsType createTransformsType() { - return new TransformsType(); - } - - /** - * Create an instance of {@link CanonicalizationMethodType } - * - */ - public CanonicalizationMethodType createCanonicalizationMethodType() { - return new CanonicalizationMethodType(); - } - - /** - * Create an instance of {@link PublicAuthorityType } - * - */ - public PublicAuthorityType createPublicAuthorityType() { - return new PublicAuthorityType(); - } - - /** - * Create an instance of {@link ContentExLocRefBaseType } - * - */ - public ContentExLocRefBaseType createContentExLocRefBaseType() { - return new ContentExLocRefBaseType(); - } - - /** - * Create an instance of {@link ManifestRefsCheckResultInfoType } - * - */ - public ManifestRefsCheckResultInfoType createManifestRefsCheckResultInfoType() { - return new ManifestRefsCheckResultInfoType(); - } - - /** - * Create an instance of {@link KeyValueType } - * - */ - public KeyValueType createKeyValueType() { - return new KeyValueType(); - } - - /** - * Create an instance of {@link SignatureType } - * - */ - public SignatureType createSignatureType() { - return new SignatureType(); - } - - /** - * Create an instance of {@link CreateTransformsInfoProfile } - * - */ - public CreateTransformsInfoProfile createCreateTransformsInfoProfile() { - return new CreateTransformsInfoProfile(); - } - - /** - * Create an instance of {@link ManifestType } - * - */ - public ManifestType createManifestType() { - return new ManifestType(); - } - - /** - * Create an instance of {@link CreateSignatureLocationType } - * - */ - public CreateSignatureLocationType createCreateSignatureLocationType() { - return new CreateSignatureLocationType(); - } - - /** - * Create an instance of {@link SignatureValueType } - * - */ - public SignatureValueType createSignatureValueType() { - return new SignatureValueType(); - } - - /** - * Create an instance of {@link ObjectType } - * - */ - public ObjectType createObjectType() { - return new ObjectType(); - } - - /** - * Create an instance of {@link AnyChildrenType } - * - */ - public AnyChildrenType createAnyChildrenType() { - return new AnyChildrenType(); - } - - /** - * Create an instance of {@link X509IssuerSerialType } - * - */ - public X509IssuerSerialType createX509IssuerSerialType() { - return new X509IssuerSerialType(); - } - - /** - * Create an instance of {@link CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo } - * - */ - public CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo createCreateXMLSignatureRequestTypeSingleSignatureInfoCreateSignatureInfo() { - return new CreateXMLSignatureRequestType.SingleSignatureInfo.CreateSignatureInfo(); - } - - /** - * Create an instance of {@link CreateSignatureEnvironmentProfile } - * - */ - public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile() { - return new CreateSignatureEnvironmentProfile(); - } - - /** - * Create an instance of {@link VerifyXMLSignatureResponseType } - * - */ - public VerifyXMLSignatureResponseType createVerifyXMLSignatureResponseType() { - return new VerifyXMLSignatureResponseType(); - } - - /** - * Create an instance of {@link ReferenceType } - * - */ - public ReferenceType createReferenceType() { - return new ReferenceType(); - } - - /** - * Create an instance of {@link ContentOptionalRefType } - * - */ - public ContentOptionalRefType createContentOptionalRefType() { - return new ContentOptionalRefType(); - } - - /** - * Create an instance of {@link TransformType } - * - */ - public TransformType createTransformType() { - return new TransformType(); - } - - /** - * Create an instance of {@link ReferencesCheckResultInfoType } - * - */ - public ReferencesCheckResultInfoType createReferencesCheckResultInfoType() { - return new ReferencesCheckResultInfoType(); - } - - /** - * Create an instance of {@link VerifyXMLSignatureRequestType.VerifySignatureInfo } - * - */ - public VerifyXMLSignatureRequestType.VerifySignatureInfo createVerifyXMLSignatureRequestTypeVerifySignatureInfo() { - return new VerifyXMLSignatureRequestType.VerifySignatureInfo(); - } - - /** - * Create an instance of {@link VerifyCMSSignatureRequestType } - * - */ - public VerifyCMSSignatureRequestType createVerifyCMSSignatureRequestType() { - return new VerifyCMSSignatureRequestType(); - } - - /** - * Create an instance of {@link ReferencesCheckResultType } - * - */ - public ReferencesCheckResultType createReferencesCheckResultType() { - return new ReferencesCheckResultType(); - } - - /** - * Create an instance of {@link VerifyCMSSignatureResponseType } - * - */ - public VerifyCMSSignatureResponseType createVerifyCMSSignatureResponseType() { - return new VerifyCMSSignatureResponseType(); - } - - /** - * Create an instance of {@link TransformParameterType.Hash } - * - */ - public TransformParameterType.Hash createTransformParameterTypeHash() { - return new TransformParameterType.Hash(); - } - - /** - * Create an instance of {@link SignedInfoType } - * - */ - public SignedInfoType createSignedInfoType() { - return new SignedInfoType(); - } - - /** - * Create an instance of {@link X509DataType } - * - */ - public X509DataType createX509DataType() { - return new X509DataType(); - } - - /** - * Create an instance of {@link CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo } - * - */ - public CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo createCreateXMLSignatureRequestTypeSingleSignatureInfoDataObjectInfo() { - return new CreateXMLSignatureRequestType.SingleSignatureInfo.DataObjectInfo(); - } - - /** - * Create an instance of {@link VerifyXMLSignatureRequestType.SignatureManifestCheckParams } - * - */ - public VerifyXMLSignatureRequestType.SignatureManifestCheckParams createVerifyXMLSignatureRequestTypeSignatureManifestCheckParams() { - return new VerifyXMLSignatureRequestType.SignatureManifestCheckParams(); - } - - /** - * Create an instance of {@link SignaturePropertiesType } - * - */ - public SignaturePropertiesType createSignaturePropertiesType() { - return new SignaturePropertiesType(); - } - - /** - * Create an instance of {@link XMLContentType } - * - */ - public XMLContentType createXMLContentType() { - return new XMLContentType(); - } - - /** - * Create an instance of {@link SPKIDataType } - * - */ - public SPKIDataType createSPKIDataType() { - return new SPKIDataType(); - } - - /** - * Create an instance of {@link MetaInfoType } - * - */ - public MetaInfoType createMetaInfoType() { - return new MetaInfoType(); - } - - /** - * Create an instance of {@link SignaturePropertyType } - * - */ - public SignaturePropertyType createSignaturePropertyType() { - return new SignaturePropertyType(); - } - - /** - * Create an instance of {@link FinalDataMetaInfoType } - * - */ - public FinalDataMetaInfoType createFinalDataMetaInfoType() { - return new FinalDataMetaInfoType(); - } - - /** - * Create an instance of {@link CMSDataObjectOptionalMetaType } - * - */ - public CMSDataObjectOptionalMetaType createCMSDataObjectOptionalMetaType() { - return new CMSDataObjectOptionalMetaType(); - } - - /** - * Create an instance of {@link CreateXMLSignatureRequest } - * - */ - public CreateXMLSignatureRequest createCreateXMLSignatureRequest() { - return new CreateXMLSignatureRequest(); - } - - /** - * Create an instance of {@link TransformParameterType } - * - */ - public TransformParameterType createTransformParameterType() { - return new TransformParameterType(); - } - - /** - * Create an instance of {@link PGPDataType } - * - */ - public PGPDataType createPGPDataType() { - return new PGPDataType(); - } - - /** - * Create an instance of {@link ErrorResponseType } - * - */ - public ErrorResponseType createErrorResponseType() { - return new ErrorResponseType(); - } - - /** - * Create an instance of {@link ContentBaseType } - * - */ - public ContentBaseType createContentBaseType() { - return new ContentBaseType(); - } - - /** - * Create an instance of {@link CreateXMLSignatureResponseType.SignatureEnvironment } - * - */ - public CreateXMLSignatureResponseType.SignatureEnvironment createCreateXMLSignatureResponseTypeSignatureEnvironment() { - return new CreateXMLSignatureResponseType.SignatureEnvironment(); - } - - /** - * Create an instance of {@link XMLDataObjectAssociationType } - * - */ - public XMLDataObjectAssociationType createXMLDataObjectAssociationType() { - return new XMLDataObjectAssociationType(); - } - - /** - * Create an instance of {@link ContentRequiredRefType } - * - */ - public ContentRequiredRefType createContentRequiredRefType() { - return new ContentRequiredRefType(); - } - - /** - * Create an instance of {@link RSAKeyValueType } - * - */ - public RSAKeyValueType createRSAKeyValueType() { - return new RSAKeyValueType(); - } - - /** - * Create an instance of {@link ManifestRefsCheckResultType } - * - */ - public ManifestRefsCheckResultType createManifestRefsCheckResultType() { - return new ManifestRefsCheckResultType(); - } - - /** - * Create an instance of {@link VerifyCMSSignatureRequest } - * - */ - public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest() { - return new VerifyCMSSignatureRequest(); - } - - /** - * Create an instance of {@link InputDataType } - * - */ - public InputDataType createInputDataType() { - return new InputDataType(); - } - - /** - * Create an instance of {@link CreateXMLSignatureResponseType } - * - */ - public CreateXMLSignatureResponseType createCreateXMLSignatureResponseType() { - return new CreateXMLSignatureResponseType(); - } - - /** - * Create an instance of {@link CreateXMLSignatureRequestType } - * - */ - public CreateXMLSignatureRequestType createCreateXMLSignatureRequestType() { - return new CreateXMLSignatureRequestType(); - } - - /** - * Create an instance of {@link VerifyTransformsDataType } - * - */ - public VerifyTransformsDataType createVerifyTransformsDataType() { - return new VerifyTransformsDataType(); - } - - /** - * Create an instance of {@link VerifyTransformsInfoProfile } - * - */ - public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile() { - return new VerifyTransformsInfoProfile(); - } - - /** - * Create an instance of {@link DataObjectInfoType } - * - */ - public DataObjectInfoType createDataObjectInfoType() { - return new DataObjectInfoType(); - } - - /** - * Create an instance of {@link CheckResultType } - * - */ - public CheckResultType createCheckResultType() { - return new CheckResultType(); - } - - /** - * Create an instance of {@link TransformsInfoType } - * - */ - public TransformsInfoType createTransformsInfoType() { - return new TransformsInfoType(); - } - - /** - * Create an instance of {@link KeyInfoType } - * - */ - public KeyInfoType createKeyInfoType() { - return new KeyInfoType(); - } - - /** - * Create an instance of {@link RetrievalMethodType } - * - */ - public RetrievalMethodType createRetrievalMethodType() { - return new RetrievalMethodType(); - } - - /** - * Create an instance of {@link DataObjectInfoType.DataObject } - * - */ - public DataObjectInfoType.DataObject createDataObjectInfoTypeDataObject() { - return new DataObjectInfoType.DataObject(); - } - - /** - * Create an instance of {@link CreateXMLSignatureRequestType.SingleSignatureInfo } - * - */ - public CreateXMLSignatureRequestType.SingleSignatureInfo createCreateXMLSignatureRequestTypeSingleSignatureInfo() { - return new CreateXMLSignatureRequestType.SingleSignatureInfo(); - } - - /** - * Create an instance of {@link DigestMethodType } - * - */ - public DigestMethodType createDigestMethodType() { - return new DigestMethodType(); - } - - /** - * Create an instance of {@link DSAKeyValueType } - * - */ - public DSAKeyValueType createDSAKeyValueType() { - return new DSAKeyValueType(); - } - - /** - * Create an instance of {@link CMSContentBaseType } - * - */ - public CMSContentBaseType createCMSContentBaseType() { - return new CMSContentBaseType(); - } - - /** - * Create an instance of {@link SignatureMethodType } - * - */ - public SignatureMethodType createSignatureMethodType() { - return new SignatureMethodType(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CreateXMLSignatureResponseType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "CreateXMLSignatureResponse") - public JAXBElement<CreateXMLSignatureResponseType> createCreateXMLSignatureResponse(CreateXMLSignatureResponseType value) { - return new JAXBElement<CreateXMLSignatureResponseType>(_CreateXMLSignatureResponse_QNAME, CreateXMLSignatureResponseType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PGPDataType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPData") - public JAXBElement<PGPDataType> createPGPData(PGPDataType value) { - return new JAXBElement<PGPDataType>(_PGPData_QNAME, PGPDataType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignatureType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Signature") - public JAXBElement<SignatureType> createSignature(SignatureType value) { - return new JAXBElement<SignatureType>(_Signature_QNAME, SignatureType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DSAKeyValue") - public JAXBElement<DSAKeyValueType> createDSAKeyValue(DSAKeyValueType value) { - return new JAXBElement<DSAKeyValueType>(_DSAKeyValue_QNAME, DSAKeyValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link VerifyCMSSignatureResponseType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "VerifyCMSSignatureResponse") - public JAXBElement<VerifyCMSSignatureResponseType> createVerifyCMSSignatureResponse(VerifyCMSSignatureResponseType value) { - return new JAXBElement<VerifyCMSSignatureResponseType>(_VerifyCMSSignatureResponse_QNAME, VerifyCMSSignatureResponseType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link XMLDataObjectAssociationType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "SupplementProfile") - public JAXBElement<XMLDataObjectAssociationType> createSupplementProfile(XMLDataObjectAssociationType value) { - return new JAXBElement<XMLDataObjectAssociationType>(_SupplementProfile_QNAME, XMLDataObjectAssociationType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link VerifyXMLSignatureRequestType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "VerifyXMLSignatureRequest") - public JAXBElement<VerifyXMLSignatureRequestType> createVerifyXMLSignatureRequest(VerifyXMLSignatureRequestType value) { - return new JAXBElement<VerifyXMLSignatureRequestType>(_VerifyXMLSignatureRequest_QNAME, VerifyXMLSignatureRequestType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKIData") - public JAXBElement<SPKIDataType> createSPKIData(SPKIDataType value) { - return new JAXBElement<SPKIDataType>(_SPKIData_QNAME, SPKIDataType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignedInfoType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignedInfo") - public JAXBElement<SignedInfoType> createSignedInfo(SignedInfoType value) { - return new JAXBElement<SignedInfoType>(_SignedInfo_QNAME, SignedInfoType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RetrievalMethod") - public JAXBElement<RetrievalMethodType> createRetrievalMethod(RetrievalMethodType value) { - return new JAXBElement<RetrievalMethodType>(_RetrievalMethod_QNAME, RetrievalMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CanonicalizationMethodType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "CanonicalizationMethod") - public JAXBElement<CanonicalizationMethodType> createCanonicalizationMethod(CanonicalizationMethodType value) { - return new JAXBElement<CanonicalizationMethodType>(_CanonicalizationMethod_QNAME, CanonicalizationMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PublicAuthorityType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "PublicAuthority") - public JAXBElement<PublicAuthorityType> createPublicAuthority(PublicAuthorityType value) { - return new JAXBElement<PublicAuthorityType>(_PublicAuthority_QNAME, PublicAuthorityType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ObjectType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Object") - public JAXBElement<ObjectType> createObject(ObjectType value) { - return new JAXBElement<ObjectType>(_Object_QNAME, ObjectType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertyType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperty") - public JAXBElement<SignaturePropertyType> createSignatureProperty(SignaturePropertyType value) { - return new JAXBElement<SignaturePropertyType>(_SignatureProperty_QNAME, SignaturePropertyType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TransformsType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transforms") - public JAXBElement<TransformsType> createTransforms(TransformsType value) { - return new JAXBElement<TransformsType>(_Transforms_QNAME, TransformsType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ManifestType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Manifest") - public JAXBElement<ManifestType> createManifest(ManifestType value) { - return new JAXBElement<ManifestType>(_Manifest_QNAME, ManifestType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignatureValueType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureValue") - public JAXBElement<SignatureValueType> createSignatureValue(SignatureValueType value) { - return new JAXBElement<SignatureValueType>(_SignatureValue_QNAME, SignatureValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TransformType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transform") - public JAXBElement<TransformType> createTransform(TransformType value) { - return new JAXBElement<TransformType>(_Transform_QNAME, TransformType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link X509DataType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Data") - public JAXBElement<X509DataType> createX509Data(X509DataType value) { - return new JAXBElement<X509DataType>(_X509Data_QNAME, X509DataType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignatureMethodType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureMethod") - public JAXBElement<SignatureMethodType> createSignatureMethod(SignatureMethodType value) { - return new JAXBElement<SignatureMethodType>(_SignatureMethod_QNAME, SignatureMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ErrorResponseType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "ErrorResponse") - public JAXBElement<ErrorResponseType> createErrorResponse(ErrorResponseType value) { - return new JAXBElement<ErrorResponseType>(_ErrorResponse_QNAME, ErrorResponseType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyInfo") - public JAXBElement<KeyInfoType> createKeyInfo(KeyInfoType value) { - return new JAXBElement<KeyInfoType>(_KeyInfo_QNAME, KeyInfoType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DigestMethodType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestMethod") - public JAXBElement<DigestMethodType> createDigestMethod(DigestMethodType value) { - return new JAXBElement<DigestMethodType>(_DigestMethod_QNAME, DigestMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestValue") - public JAXBElement<byte[]> createDigestValue(byte[] value) { - return new JAXBElement<byte[]>(_DigestValue_QNAME, byte[].class, null, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "MgmtData") - public JAXBElement<String> createMgmtData(String value) { - return new JAXBElement<String>(_MgmtData_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertiesType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperties") - public JAXBElement<SignaturePropertiesType> createSignatureProperties(SignaturePropertiesType value) { - return new JAXBElement<SignaturePropertiesType>(_SignatureProperties_QNAME, SignaturePropertiesType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyName") - public JAXBElement<String> createKeyName(String value) { - return new JAXBElement<String>(_KeyName_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link KeyValueType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyValue") - public JAXBElement<KeyValueType> createKeyValue(KeyValueType value) { - return new JAXBElement<KeyValueType>(_KeyValue_QNAME, KeyValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ReferenceType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Reference") - public JAXBElement<ReferenceType> createReference(ReferenceType value) { - return new JAXBElement<ReferenceType>(_Reference_QNAME, ReferenceType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link VerifyXMLSignatureResponseType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "VerifyXMLSignatureResponse") - public JAXBElement<VerifyXMLSignatureResponseType> createVerifyXMLSignatureResponse(VerifyXMLSignatureResponseType value) { - return new JAXBElement<VerifyXMLSignatureResponseType>(_VerifyXMLSignatureResponse_QNAME, VerifyXMLSignatureResponseType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "QualifiedCertificate") - public JAXBElement<Object> createQualifiedCertificate(Object value) { - return new JAXBElement<Object>(_QualifiedCertificate_QNAME, Object.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RSAKeyValue") - public JAXBElement<RSAKeyValueType> createRSAKeyValue(RSAKeyValueType value) { - return new JAXBElement<RSAKeyValueType>(_RSAKeyValue_QNAME, RSAKeyValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link XMLDataObjectAssociationType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "Supplement") - public JAXBElement<XMLDataObjectAssociationType> createSupplement(XMLDataObjectAssociationType value) { - return new JAXBElement<XMLDataObjectAssociationType>(_Supplement_QNAME, XMLDataObjectAssociationType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509IssuerSerial", scope = X509DataType.class) - public JAXBElement<X509IssuerSerialType> createX509DataTypeX509IssuerSerial(X509IssuerSerialType value) { - return new JAXBElement<X509IssuerSerialType>(_X509DataTypeX509IssuerSerial_QNAME, X509IssuerSerialType.class, X509DataType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Certificate", scope = X509DataType.class) - public JAXBElement<byte[]> createX509DataTypeX509Certificate(byte[] value) { - return new JAXBElement<byte[]>(_X509DataTypeX509Certificate_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SKI", scope = X509DataType.class) - public JAXBElement<byte[]> createX509DataTypeX509SKI(byte[] value) { - return new JAXBElement<byte[]>(_X509DataTypeX509SKI_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SubjectName", scope = X509DataType.class) - public JAXBElement<String> createX509DataTypeX509SubjectName(String value) { - return new JAXBElement<String>(_X509DataTypeX509SubjectName_QNAME, String.class, X509DataType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509CRL", scope = X509DataType.class) - public JAXBElement<byte[]> createX509DataTypeX509CRL(byte[] value) { - return new JAXBElement<byte[]>(_X509DataTypeX509CRL_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) - public JAXBElement<String> createTransformTypeXPath(String value) { - return new JAXBElement<String>(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CheckResultType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "CertificateCheck", scope = VerifyCMSSignatureResponseType.class) - public JAXBElement<CheckResultType> createVerifyCMSSignatureResponseTypeCertificateCheck(CheckResultType value) { - return new JAXBElement<CheckResultType>(_VerifyCMSSignatureResponseTypeCertificateCheck_QNAME, CheckResultType.class, VerifyCMSSignatureResponseType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "SignerInfo", scope = VerifyCMSSignatureResponseType.class) - public JAXBElement<KeyInfoType> createVerifyCMSSignatureResponseTypeSignerInfo(KeyInfoType value) { - return new JAXBElement<KeyInfoType>(_VerifyCMSSignatureResponseTypeSignerInfo_QNAME, KeyInfoType.class, VerifyCMSSignatureResponseType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CheckResultType }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", name = "SignatureCheck", scope = VerifyCMSSignatureResponseType.class) - public JAXBElement<CheckResultType> createVerifyCMSSignatureResponseTypeSignatureCheck(CheckResultType value) { - return new JAXBElement<CheckResultType>(_VerifyCMSSignatureResponseTypeSignatureCheck_QNAME, CheckResultType.class, VerifyCMSSignatureResponseType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyID", scope = PGPDataType.class) - public JAXBElement<byte[]> createPGPDataTypePGPKeyID(byte[] value) { - return new JAXBElement<byte[]>(_PGPDataTypePGPKeyID_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyPacket", scope = PGPDataType.class) - public JAXBElement<byte[]> createPGPDataTypePGPKeyPacket(byte[] value) { - return new JAXBElement<byte[]>(_PGPDataTypePGPKeyPacket_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) - public JAXBElement<byte[]> createSPKIDataTypeSPKISexp(byte[] value) { - return new JAXBElement<byte[]>(_SPKIDataTypeSPKISexp_QNAME, byte[].class, SPKIDataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) - public JAXBElement<BigInteger> createSignatureMethodTypeHMACOutputLength(BigInteger value) { - return new JAXBElement<BigInteger>(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ObjectType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ObjectType.java deleted file mode 100644 index 1ebf8425..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ObjectType.java +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.w3c.dom.Element; - - -/** - * <p>Java class for ObjectType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ObjectType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence maxOccurs="unbounded" minOccurs="0"> - * <any/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" /> - * <attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ObjectType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class ObjectType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - @XmlAttribute(name = "MimeType") - protected String mimeType; - @XmlAttribute(name = "Encoding") - @XmlSchemaType(name = "anyURI") - protected String encoding; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * {@link Element } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Gets the value of the mimeType property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMimeType() { - return mimeType; - } - - /** - * Sets the value of the mimeType property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMimeType(String value) { - this.mimeType = value; - } - - /** - * Gets the value of the encoding property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEncoding() { - return encoding; - } - - /** - * Sets the value of the encoding property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEncoding(String value) { - this.encoding = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/PGPDataType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/PGPDataType.java deleted file mode 100644 index ca3851f0..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/PGPDataType.java +++ /dev/null @@ -1,114 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for PGPDataType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="PGPDataType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice> - * <sequence> - * <element name="PGPKeyID" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/> - * <any/> - * </sequence> - * <sequence> - * <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <any/> - * </sequence> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PGPDataType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class PGPDataType { - - @XmlElementRefs({ - @XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - }) - @XmlAnyElement(lax = true) - protected List<Object> content; - - /** - * Gets the rest of the content model. - * - * <p> - * You are getting this "catch-all" property because of the following reason: - * The field name "PGPKeyPacket" is used by two different parts of a schema. See: - * line 208 of file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/xmldsig-core-schema.xsd - * line 203 of file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/xmldsig-core-schema.xsd - * <p> - * To get rid of this property, apply a property customization to one - * of both of the following declarations to change their names: - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * {@link Element } - * {@link Object } - * {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/PublicAuthorityType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/PublicAuthorityType.java deleted file mode 100644 index c33c353c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/PublicAuthorityType.java +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for PublicAuthorityType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="PublicAuthorityType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="Code" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PublicAuthorityType", propOrder = { - "code" -}) -public class PublicAuthorityType { - - @XmlElement(name = "Code") - protected String code; - - /** - * Gets the value of the code property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCode() { - return code; - } - - /** - * Sets the value of the code property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCode(String value) { - this.code = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/RSAKeyValueType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/RSAKeyValueType.java deleted file mode 100644 index 37babf4d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/RSAKeyValueType.java +++ /dev/null @@ -1,102 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for RSAKeyValueType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="RSAKeyValueType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="Modulus" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/> - * <element name="Exponent" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "RSAKeyValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "modulus", - "exponent" -}) -public class RSAKeyValueType { - - @XmlElement(name = "Modulus", required = true) - protected byte[] modulus; - @XmlElement(name = "Exponent", required = true) - protected byte[] exponent; - - /** - * Gets the value of the modulus property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getModulus() { - return modulus; - } - - /** - * Sets the value of the modulus property. - * - * @param value - * allowed object is - * byte[] - */ - public void setModulus(byte[] value) { - this.modulus = ((byte[]) value); - } - - /** - * Gets the value of the exponent property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getExponent() { - return exponent; - } - - /** - * Sets the value of the exponent property. - * - * @param value - * allowed object is - * byte[] - */ - public void setExponent(byte[] value) { - this.exponent = ((byte[]) value); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferenceType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferenceType.java deleted file mode 100644 index b46eac19..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferenceType.java +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for ReferenceType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ReferenceType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ReferenceType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "transforms", - "digestMethod", - "digestValue" -}) -public class ReferenceType { - - @XmlElement(name = "Transforms") - protected TransformsType transforms; - @XmlElement(name = "DigestMethod", required = true) - protected DigestMethodType digestMethod; - @XmlElement(name = "DigestValue", required = true) - protected byte[] digestValue; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - @XmlAttribute(name = "URI") - @XmlSchemaType(name = "anyURI") - protected String uri; - @XmlAttribute(name = "Type") - @XmlSchemaType(name = "anyURI") - protected String type; - - /** - * Gets the value of the transforms property. - * - * @return - * possible object is - * {@link TransformsType } - * - */ - public TransformsType getTransforms() { - return transforms; - } - - /** - * Sets the value of the transforms property. - * - * @param value - * allowed object is - * {@link TransformsType } - * - */ - public void setTransforms(TransformsType value) { - this.transforms = value; - } - - /** - * Gets the value of the digestMethod property. - * - * @return - * possible object is - * {@link DigestMethodType } - * - */ - public DigestMethodType getDigestMethod() { - return digestMethod; - } - - /** - * Sets the value of the digestMethod property. - * - * @param value - * allowed object is - * {@link DigestMethodType } - * - */ - public void setDigestMethod(DigestMethodType value) { - this.digestMethod = value; - } - - /** - * Gets the value of the digestValue property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getDigestValue() { - return digestValue; - } - - /** - * Sets the value of the digestValue property. - * - * @param value - * allowed object is - * byte[] - */ - public void setDigestValue(byte[] value) { - this.digestValue = ((byte[]) value); - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Gets the value of the uri property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getURI() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setURI(String value) { - this.uri = value; - } - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultInfoType.java deleted file mode 100644 index f2e6a02d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultInfoType.java +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ReferencesCheckResultInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ReferencesCheckResultInfoType"> - * <complexContent> - * <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType"> - * <sequence> - * <any/> - * <element name="FailedReference" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ReferencesCheckResultInfoType") -public class ReferencesCheckResultInfoType - extends AnyChildrenType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultType.java deleted file mode 100644 index 8b94be91..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/ReferencesCheckResultType.java +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ReferencesCheckResultType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ReferencesCheckResultType"> - * <complexContent> - * <restriction base="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"> - * <sequence> - * <element name="Code" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/> - * <element name="Info" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ReferencesCheckResultInfoType" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ReferencesCheckResultType") -public class ReferencesCheckResultType - extends CheckResultType -{ - - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/RetrievalMethodType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/RetrievalMethodType.java deleted file mode 100644 index dae84047..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/RetrievalMethodType.java +++ /dev/null @@ -1,136 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for RetrievalMethodType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="RetrievalMethodType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/> - * </sequence> - * <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "RetrievalMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "transforms" -}) -public class RetrievalMethodType { - - @XmlElement(name = "Transforms") - protected TransformsType transforms; - @XmlAttribute(name = "URI") - @XmlSchemaType(name = "anyURI") - protected String uri; - @XmlAttribute(name = "Type") - @XmlSchemaType(name = "anyURI") - protected String type; - - /** - * Gets the value of the transforms property. - * - * @return - * possible object is - * {@link TransformsType } - * - */ - public TransformsType getTransforms() { - return transforms; - } - - /** - * Sets the value of the transforms property. - * - * @param value - * allowed object is - * {@link TransformsType } - * - */ - public void setTransforms(TransformsType value) { - this.transforms = value; - } - - /** - * Gets the value of the uri property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getURI() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setURI(String value) { - this.uri = value; - } - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SPKIDataType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SPKIDataType.java deleted file mode 100644 index 1f5cab5b..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SPKIDataType.java +++ /dev/null @@ -1,92 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for SPKIDataType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="SPKIDataType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence maxOccurs="unbounded"> - * <element name="SPKISexp" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SPKIDataType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "spkiSexpAndAny" -}) -public class SPKIDataType { - - @XmlElementRef(name = "SPKISexp", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - @XmlAnyElement(lax = true) - protected List<Object> spkiSexpAndAny; - - /** - * Gets the value of the spkiSexpAndAny property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the spkiSexpAndAny property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSPKISexpAndAny().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * {@link Object } - * {@link Element } - * - * - */ - public List<Object> getSPKISexpAndAny() { - if (spkiSexpAndAny == null) { - spkiSexpAndAny = new ArrayList<Object>(); - } - return this.spkiSexpAndAny; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureMethodType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureMethodType.java deleted file mode 100644 index e92e9fec..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureMethodType.java +++ /dev/null @@ -1,124 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for SignatureMethodType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="SignatureMethodType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="HMACOutputLength" type="{http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType" minOccurs="0"/> - * <any/> - * </sequence> - * <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignatureMethodType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class SignatureMethodType { - - @XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignaturePropertiesType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignaturePropertiesType.java deleted file mode 100644 index b602c9d6..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignaturePropertiesType.java +++ /dev/null @@ -1,120 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for SignaturePropertiesType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="SignaturePropertiesType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureProperty" maxOccurs="unbounded"/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignaturePropertiesType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "signatureProperty" -}) -public class SignaturePropertiesType { - - @XmlElement(name = "SignatureProperty", required = true) - protected List<SignaturePropertyType> signatureProperty; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the signatureProperty property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the signatureProperty property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSignatureProperty().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link SignaturePropertyType } - * - * - */ - public List<SignaturePropertyType> getSignatureProperty() { - if (signatureProperty == null) { - signatureProperty = new ArrayList<SignaturePropertyType>(); - } - return this.signatureProperty; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignaturePropertyType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignaturePropertyType.java deleted file mode 100644 index ebe8c7d0..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignaturePropertyType.java +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.w3c.dom.Element; - - -/** - * <p>Java class for SignaturePropertyType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="SignaturePropertyType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice maxOccurs="unbounded"> - * <any/> - * </choice> - * <attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignaturePropertyType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class SignaturePropertyType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - @XmlAttribute(name = "Target", required = true) - @XmlSchemaType(name = "anyURI") - protected String target; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * {@link Element } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - /** - * Gets the value of the target property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTarget() { - return target; - } - - /** - * Sets the value of the target property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTarget(String value) { - this.target = value; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureType.java deleted file mode 100644 index 0eec1637..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureType.java +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for SignatureType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="SignatureType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignatureType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "signedInfo", - "signatureValue", - "keyInfo", - "object" -}) -public class SignatureType { - - @XmlElement(name = "SignedInfo", required = true) - protected SignedInfoType signedInfo; - @XmlElement(name = "SignatureValue", required = true) - protected SignatureValueType signatureValue; - @XmlElement(name = "KeyInfo") - protected KeyInfoType keyInfo; - @XmlElement(name = "Object") - protected List<ObjectType> object; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the signedInfo property. - * - * @return - * possible object is - * {@link SignedInfoType } - * - */ - public SignedInfoType getSignedInfo() { - return signedInfo; - } - - /** - * Sets the value of the signedInfo property. - * - * @param value - * allowed object is - * {@link SignedInfoType } - * - */ - public void setSignedInfo(SignedInfoType value) { - this.signedInfo = value; - } - - /** - * Gets the value of the signatureValue property. - * - * @return - * possible object is - * {@link SignatureValueType } - * - */ - public SignatureValueType getSignatureValue() { - return signatureValue; - } - - /** - * Sets the value of the signatureValue property. - * - * @param value - * allowed object is - * {@link SignatureValueType } - * - */ - public void setSignatureValue(SignatureValueType value) { - this.signatureValue = value; - } - - /** - * Gets the value of the keyInfo property. - * - * @return - * possible object is - * {@link KeyInfoType } - * - */ - public KeyInfoType getKeyInfo() { - return keyInfo; - } - - /** - * Sets the value of the keyInfo property. - * - * @param value - * allowed object is - * {@link KeyInfoType } - * - */ - public void setKeyInfo(KeyInfoType value) { - this.keyInfo = value; - } - - /** - * Gets the value of the object property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the object property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getObject().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link ObjectType } - * - * - */ - public List<ObjectType> getObject() { - if (object == null) { - object = new ArrayList<ObjectType>(); - } - return this.object; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureValueType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureValueType.java deleted file mode 100644 index 3e82e93c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureValueType.java +++ /dev/null @@ -1,108 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for SignatureValueType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="SignatureValueType"> - * <simpleContent> - * <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary"> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </extension> - * </simpleContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignatureValueType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "value" -}) -public class SignatureValueType { - - @XmlValue - protected byte[] value; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * byte[] - */ - public void setValue(byte[] value) { - this.value = ((byte[]) value); - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureVerificationPortType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureVerificationPortType.java deleted file mode 100644 index a9dd3795..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureVerificationPortType.java +++ /dev/null @@ -1,57 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; -import javax.xml.bind.annotation.XmlSeeAlso; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebService(name = "SignatureVerificationPortType", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#") -@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) -@XmlSeeAlso({ - ObjectFactory.class -}) -public interface SignatureVerificationPortType { - - - /** - * - * @param body - * @return - * returns moaspss.generated.VerifyXMLSignatureResponseType - * @throws MOAFault - */ - @WebMethod(action = "urn:VerifyXMLSignatureAction") - @WebResult(name = "VerifyXMLSignatureResponse", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", partName = "body") - public VerifyXMLSignatureResponseType verifyXMLSignature( - @WebParam(name = "VerifyXMLSignatureRequest", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", partName = "body") - VerifyXMLSignatureRequestType body) - throws MOAFault - ; - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureVerificationService.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureVerificationService.java deleted file mode 100644 index 32c2e725..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignatureVerificationService.java +++ /dev/null @@ -1,87 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.logging.Logger; -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import javax.xml.ws.WebEndpoint; -import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebServiceFeature; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebServiceClient(name = "SignatureVerificationService", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", wsdlLocation = "file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/MOA-SPSS-1.3.wsdl") -public class SignatureVerificationService - extends Service -{ - - private final static URL SIGNATUREVERIFICATIONSERVICE_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(moaspss.generated.SignatureVerificationService.class.getName()); - - static { - URL url = null; - try { - URL baseUrl; - baseUrl = moaspss.generated.SignatureVerificationService.class.getResource("."); - url = new URL(baseUrl, "file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/MOA-SPSS-1.3.wsdl"); - } catch (MalformedURLException e) { - logger.warning("Failed to create URL for the wsdl Location: 'file:/home/clemens/workspace/bku/bkucommon/src/test/wsdl/MOA-SPSS-1.3.wsdl', retrying as a local file"); - logger.warning(e.getMessage()); - } - SIGNATUREVERIFICATIONSERVICE_WSDL_LOCATION = url; - } - - public SignatureVerificationService(URL wsdlLocation, QName serviceName) { - super(wsdlLocation, serviceName); - } - - public SignatureVerificationService() { - super(SIGNATUREVERIFICATIONSERVICE_WSDL_LOCATION, new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationService")); - } - - /** - * - * @return - * returns SignatureVerificationPortType - */ - @WebEndpoint(name = "SignatureVerificationPort") - public SignatureVerificationPortType getSignatureVerificationPort() { - return super.getPort(new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationPort"), SignatureVerificationPortType.class); - } - - /** - * - * @param features - * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. - * @return - * returns SignatureVerificationPortType - */ - @WebEndpoint(name = "SignatureVerificationPort") - public SignatureVerificationPortType getSignatureVerificationPort(WebServiceFeature... features) { - return super.getPort(new QName("http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#", "SignatureVerificationPort"), SignatureVerificationPortType.class, features); - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignedInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignedInfoType.java deleted file mode 100644 index 26261204..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/SignedInfoType.java +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for SignedInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="SignedInfoType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/> - * </sequence> - * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignedInfoType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "canonicalizationMethod", - "signatureMethod", - "reference" -}) -public class SignedInfoType { - - @XmlElement(name = "CanonicalizationMethod", required = true) - protected CanonicalizationMethodType canonicalizationMethod; - @XmlElement(name = "SignatureMethod", required = true) - protected SignatureMethodType signatureMethod; - @XmlElement(name = "Reference", required = true) - protected List<ReferenceType> reference; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the canonicalizationMethod property. - * - * @return - * possible object is - * {@link CanonicalizationMethodType } - * - */ - public CanonicalizationMethodType getCanonicalizationMethod() { - return canonicalizationMethod; - } - - /** - * Sets the value of the canonicalizationMethod property. - * - * @param value - * allowed object is - * {@link CanonicalizationMethodType } - * - */ - public void setCanonicalizationMethod(CanonicalizationMethodType value) { - this.canonicalizationMethod = value; - } - - /** - * Gets the value of the signatureMethod property. - * - * @return - * possible object is - * {@link SignatureMethodType } - * - */ - public SignatureMethodType getSignatureMethod() { - return signatureMethod; - } - - /** - * Sets the value of the signatureMethod property. - * - * @param value - * allowed object is - * {@link SignatureMethodType } - * - */ - public void setSignatureMethod(SignatureMethodType value) { - this.signatureMethod = value; - } - - /** - * Gets the value of the reference property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the reference property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getReference().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link ReferenceType } - * - * - */ - public List<ReferenceType> getReference() { - if (reference == null) { - reference = new ArrayList<ReferenceType>(); - } - return this.reference; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformParameterType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformParameterType.java deleted file mode 100644 index 62bf071c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformParameterType.java +++ /dev/null @@ -1,226 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for TransformParameterType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="TransformParameterType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice minOccurs="0"> - * <element name="Base64Content" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="Hash"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </choice> - * <attribute name="URI" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransformParameterType", propOrder = { - "base64Content", - "hash" -}) -public class TransformParameterType { - - @XmlElement(name = "Base64Content") - protected byte[] base64Content; - @XmlElement(name = "Hash") - protected TransformParameterType.Hash hash; - @XmlAttribute(name = "URI", required = true) - @XmlSchemaType(name = "anyURI") - protected String uri; - - /** - * Gets the value of the base64Content property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getBase64Content() { - return base64Content; - } - - /** - * Sets the value of the base64Content property. - * - * @param value - * allowed object is - * byte[] - */ - public void setBase64Content(byte[] value) { - this.base64Content = ((byte[]) value); - } - - /** - * Gets the value of the hash property. - * - * @return - * possible object is - * {@link TransformParameterType.Hash } - * - */ - public TransformParameterType.Hash getHash() { - return hash; - } - - /** - * Sets the value of the hash property. - * - * @param value - * allowed object is - * {@link TransformParameterType.Hash } - * - */ - public void setHash(TransformParameterType.Hash value) { - this.hash = value; - } - - /** - * Gets the value of the uri property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getURI() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setURI(String value) { - this.uri = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "digestMethod", - "digestValue" - }) - public static class Hash { - - @XmlElement(name = "DigestMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) - protected DigestMethodType digestMethod; - @XmlElement(name = "DigestValue", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) - protected byte[] digestValue; - - /** - * Gets the value of the digestMethod property. - * - * @return - * possible object is - * {@link DigestMethodType } - * - */ - public DigestMethodType getDigestMethod() { - return digestMethod; - } - - /** - * Sets the value of the digestMethod property. - * - * @param value - * allowed object is - * {@link DigestMethodType } - * - */ - public void setDigestMethod(DigestMethodType value) { - this.digestMethod = value; - } - - /** - * Gets the value of the digestValue property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getDigestValue() { - return digestValue; - } - - /** - * Sets the value of the digestValue property. - * - * @param value - * allowed object is - * byte[] - */ - public void setDigestValue(byte[] value) { - this.digestValue = ((byte[]) value); - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformType.java deleted file mode 100644 index 192843c5..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformType.java +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for TransformType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="TransformType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice maxOccurs="unbounded" minOccurs="0"> - * <any/> - * <element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/> - * </choice> - * <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransformType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "content" -}) -public class TransformType { - - @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link Object } - * {@link String } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformsInfoType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformsInfoType.java deleted file mode 100644 index 1977f157..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformsInfoType.java +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for TransformsInfoType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="TransformsInfoType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/> - * <element name="FinalDataMetaInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}FinalDataMetaInfoType"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransformsInfoType", propOrder = { - "transforms", - "finalDataMetaInfo" -}) -public class TransformsInfoType { - - @XmlElement(name = "Transforms", namespace = "http://www.w3.org/2000/09/xmldsig#") - protected TransformsType transforms; - @XmlElement(name = "FinalDataMetaInfo", required = true) - protected FinalDataMetaInfoType finalDataMetaInfo; - - /** - * Gets the value of the transforms property. - * - * @return - * possible object is - * {@link TransformsType } - * - */ - public TransformsType getTransforms() { - return transforms; - } - - /** - * Sets the value of the transforms property. - * - * @param value - * allowed object is - * {@link TransformsType } - * - */ - public void setTransforms(TransformsType value) { - this.transforms = value; - } - - /** - * Gets the value of the finalDataMetaInfo property. - * - * @return - * possible object is - * {@link FinalDataMetaInfoType } - * - */ - public FinalDataMetaInfoType getFinalDataMetaInfo() { - return finalDataMetaInfo; - } - - /** - * Sets the value of the finalDataMetaInfo property. - * - * @param value - * allowed object is - * {@link FinalDataMetaInfoType } - * - */ - public void setFinalDataMetaInfo(FinalDataMetaInfoType value) { - this.finalDataMetaInfo = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformsType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformsType.java deleted file mode 100644 index 25510db9..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/TransformsType.java +++ /dev/null @@ -1,85 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for TransformsType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="TransformsType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransformsType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "transform" -}) -public class TransformsType { - - @XmlElement(name = "Transform", required = true) - protected List<TransformType> transform; - - /** - * Gets the value of the transform property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the transform property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getTransform().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link TransformType } - * - * - */ - public List<TransformType> getTransform() { - if (transform == null) { - transform = new ArrayList<TransformType>(); - } - return this.transform; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequest.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequest.java deleted file mode 100644 index ced1e0c5..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyCMSSignatureRequestType"> - * <attribute name="Signatories" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}SignatoriesType" default="1" /> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "") -@XmlRootElement(name = "VerifyCMSSignatureRequest") -public class VerifyCMSSignatureRequest - extends VerifyCMSSignatureRequestType -{ - - @XmlAttribute(name = "Signatories") - protected List<String> signatories; - - /** - * Gets the value of the signatories property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the signatories property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSignatories().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List<String> getSignatories() { - if (signatories == null) { - signatories = new ArrayList<String>(); - } - return this.signatories; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequestType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequestType.java deleted file mode 100644 index ca514c70..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureRequestType.java +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.datatype.XMLGregorianCalendar; - - -/** - * <p>Java class for VerifyCMSSignatureRequestType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="VerifyCMSSignatureRequestType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="DateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> - * <element name="CMSSignature" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="DataObject" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CMSDataObjectOptionalMetaType" minOccurs="0"/> - * <element name="TrustProfileID" type="{http://www.w3.org/2001/XMLSchema}token"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "VerifyCMSSignatureRequestType", propOrder = { - "dateTime", - "cmsSignature", - "dataObject", - "trustProfileID" -}) -@XmlSeeAlso({ - VerifyCMSSignatureRequest.class -}) -public class VerifyCMSSignatureRequestType { - - @XmlElement(name = "DateTime") - @XmlSchemaType(name = "dateTime") - protected XMLGregorianCalendar dateTime; - @XmlElement(name = "CMSSignature", required = true) - protected byte[] cmsSignature; - @XmlElement(name = "DataObject") - protected CMSDataObjectOptionalMetaType dataObject; - @XmlElement(name = "TrustProfileID", required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "token") - protected String trustProfileID; - - /** - * Gets the value of the dateTime property. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateTime() { - return dateTime; - } - - /** - * Sets the value of the dateTime property. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setDateTime(XMLGregorianCalendar value) { - this.dateTime = value; - } - - /** - * Gets the value of the cmsSignature property. - * - * @return - * possible object is - * byte[] - */ - public byte[] getCMSSignature() { - return cmsSignature; - } - - /** - * Sets the value of the cmsSignature property. - * - * @param value - * allowed object is - * byte[] - */ - public void setCMSSignature(byte[] value) { - this.cmsSignature = ((byte[]) value); - } - - /** - * Gets the value of the dataObject property. - * - * @return - * possible object is - * {@link CMSDataObjectOptionalMetaType } - * - */ - public CMSDataObjectOptionalMetaType getDataObject() { - return dataObject; - } - - /** - * Sets the value of the dataObject property. - * - * @param value - * allowed object is - * {@link CMSDataObjectOptionalMetaType } - * - */ - public void setDataObject(CMSDataObjectOptionalMetaType value) { - this.dataObject = value; - } - - /** - * Gets the value of the trustProfileID property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTrustProfileID() { - return trustProfileID; - } - - /** - * Sets the value of the trustProfileID property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTrustProfileID(String value) { - this.trustProfileID = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureResponseType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureResponseType.java deleted file mode 100644 index 65508d4f..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyCMSSignatureResponseType.java +++ /dev/null @@ -1,95 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for VerifyCMSSignatureResponseType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="VerifyCMSSignatureResponseType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence maxOccurs="unbounded"> - * <element name="SignerInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/> - * <element name="SignatureCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"/> - * <element name="CertificateCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "VerifyCMSSignatureResponseType", propOrder = { - "signerInfoAndSignatureCheckAndCertificateCheck" -}) -public class VerifyCMSSignatureResponseType { - - @XmlElementRefs({ - @XmlElementRef(name = "CertificateCheck", namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", type = JAXBElement.class), - @XmlElementRef(name = "SignerInfo", namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", type = JAXBElement.class), - @XmlElementRef(name = "SignatureCheck", namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", type = JAXBElement.class) - }) - protected List<JAXBElement<?>> signerInfoAndSignatureCheckAndCertificateCheck; - - /** - * Gets the value of the signerInfoAndSignatureCheckAndCertificateCheck property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the signerInfoAndSignatureCheckAndCertificateCheck property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSignerInfoAndSignatureCheckAndCertificateCheck().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >} - * {@link JAXBElement }{@code <}{@link CheckResultType }{@code >} - * {@link JAXBElement }{@code <}{@link CheckResultType }{@code >} - * - * - */ - public List<JAXBElement<?>> getSignerInfoAndSignatureCheckAndCertificateCheck() { - if (signerInfoAndSignatureCheckAndCertificateCheck == null) { - signerInfoAndSignatureCheckAndCertificateCheck = new ArrayList<JAXBElement<?>>(); - } - return this.signerInfoAndSignatureCheckAndCertificateCheck; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyTransformsDataType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyTransformsDataType.java deleted file mode 100644 index 85bc0303..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyTransformsDataType.java +++ /dev/null @@ -1,91 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElements; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for VerifyTransformsDataType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="VerifyTransformsDataType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <choice maxOccurs="unbounded"> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyTransformsInfoProfile"/> - * <element name="VerifyTransformsInfoProfileID" type="{http://www.w3.org/2001/XMLSchema}string"/> - * </choice> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "VerifyTransformsDataType", propOrder = { - "verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID" -}) -public class VerifyTransformsDataType { - - @XmlElements({ - @XmlElement(name = "VerifyTransformsInfoProfile", type = VerifyTransformsInfoProfile.class), - @XmlElement(name = "VerifyTransformsInfoProfileID", type = String.class) - }) - protected List<Object> verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID; - - /** - * Gets the value of the verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getVerifyTransformsInfoProfileOrVerifyTransformsInfoProfileID().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link VerifyTransformsInfoProfile } - * {@link String } - * - * - */ - public List<Object> getVerifyTransformsInfoProfileOrVerifyTransformsInfoProfileID() { - if (verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID == null) { - verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID = new ArrayList<Object>(); - } - return this.verifyTransformsInfoProfileOrVerifyTransformsInfoProfileID; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyTransformsInfoProfile.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyTransformsInfoProfile.java deleted file mode 100644 index 9e023df1..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyTransformsInfoProfile.java +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/> - * <element name="TransformParameter" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}TransformParameterType" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "transforms", - "transformParameter" -}) -@XmlRootElement(name = "VerifyTransformsInfoProfile") -public class VerifyTransformsInfoProfile { - - @XmlElement(name = "Transforms", namespace = "http://www.w3.org/2000/09/xmldsig#") - protected TransformsType transforms; - @XmlElement(name = "TransformParameter") - protected List<TransformParameterType> transformParameter; - - /** - * Gets the value of the transforms property. - * - * @return - * possible object is - * {@link TransformsType } - * - */ - public TransformsType getTransforms() { - return transforms; - } - - /** - * Sets the value of the transforms property. - * - * @param value - * allowed object is - * {@link TransformsType } - * - */ - public void setTransforms(TransformsType value) { - this.transforms = value; - } - - /** - * Gets the value of the transformParameter property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the transformParameter property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getTransformParameter().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link TransformParameterType } - * - * - */ - public List<TransformParameterType> getTransformParameter() { - if (transformParameter == null) { - transformParameter = new ArrayList<TransformParameterType>(); - } - return this.transformParameter; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureRequestType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureRequestType.java deleted file mode 100644 index 4d0c09b7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureRequestType.java +++ /dev/null @@ -1,439 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElements; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.datatype.XMLGregorianCalendar; - - -/** - * <p>Java class for VerifyXMLSignatureRequestType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="VerifyXMLSignatureRequestType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="DateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> - * <element name="VerifySignatureInfo"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="VerifySignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/> - * <element name="VerifySignatureLocation" type="{http://www.w3.org/2001/XMLSchema}token"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * <choice maxOccurs="unbounded" minOccurs="0"> - * <element ref="{http://reference.e-government.gv.at/namespace/moa/20020822#}SupplementProfile"/> - * <element name="SupplementProfileID" type="{http://www.w3.org/2001/XMLSchema}string"/> - * </choice> - * <element name="SignatureManifestCheckParams" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="ReferenceInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyTransformsDataType" maxOccurs="unbounded"/> - * </sequence> - * <attribute name="ReturnReferenceInputData" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * <element name="ReturnHashInputData" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/> - * <element name="TrustProfileID" type="{http://www.w3.org/2001/XMLSchema}token"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "VerifyXMLSignatureRequestType", propOrder = { - "dateTime", - "verifySignatureInfo", - "supplementProfileOrSupplementProfileID", - "signatureManifestCheckParams", - "returnHashInputData", - "trustProfileID" -}) -public class VerifyXMLSignatureRequestType { - - @XmlElement(name = "DateTime") - @XmlSchemaType(name = "dateTime") - protected XMLGregorianCalendar dateTime; - @XmlElement(name = "VerifySignatureInfo", required = true) - protected VerifyXMLSignatureRequestType.VerifySignatureInfo verifySignatureInfo; - @XmlElements({ - @XmlElement(name = "SupplementProfileID", type = String.class), - @XmlElement(name = "SupplementProfile", type = XMLDataObjectAssociationType.class) - }) - protected List<Object> supplementProfileOrSupplementProfileID; - @XmlElement(name = "SignatureManifestCheckParams") - protected VerifyXMLSignatureRequestType.SignatureManifestCheckParams signatureManifestCheckParams; - @XmlElement(name = "ReturnHashInputData") - protected Object returnHashInputData; - @XmlElement(name = "TrustProfileID", required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "token") - protected String trustProfileID; - - /** - * Gets the value of the dateTime property. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateTime() { - return dateTime; - } - - /** - * Sets the value of the dateTime property. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setDateTime(XMLGregorianCalendar value) { - this.dateTime = value; - } - - /** - * Gets the value of the verifySignatureInfo property. - * - * @return - * possible object is - * {@link VerifyXMLSignatureRequestType.VerifySignatureInfo } - * - */ - public VerifyXMLSignatureRequestType.VerifySignatureInfo getVerifySignatureInfo() { - return verifySignatureInfo; - } - - /** - * Sets the value of the verifySignatureInfo property. - * - * @param value - * allowed object is - * {@link VerifyXMLSignatureRequestType.VerifySignatureInfo } - * - */ - public void setVerifySignatureInfo(VerifyXMLSignatureRequestType.VerifySignatureInfo value) { - this.verifySignatureInfo = value; - } - - /** - * Gets the value of the supplementProfileOrSupplementProfileID property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the supplementProfileOrSupplementProfileID property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSupplementProfileOrSupplementProfileID().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link XMLDataObjectAssociationType } - * - * - */ - public List<Object> getSupplementProfileOrSupplementProfileID() { - if (supplementProfileOrSupplementProfileID == null) { - supplementProfileOrSupplementProfileID = new ArrayList<Object>(); - } - return this.supplementProfileOrSupplementProfileID; - } - - /** - * Gets the value of the signatureManifestCheckParams property. - * - * @return - * possible object is - * {@link VerifyXMLSignatureRequestType.SignatureManifestCheckParams } - * - */ - public VerifyXMLSignatureRequestType.SignatureManifestCheckParams getSignatureManifestCheckParams() { - return signatureManifestCheckParams; - } - - /** - * Sets the value of the signatureManifestCheckParams property. - * - * @param value - * allowed object is - * {@link VerifyXMLSignatureRequestType.SignatureManifestCheckParams } - * - */ - public void setSignatureManifestCheckParams(VerifyXMLSignatureRequestType.SignatureManifestCheckParams value) { - this.signatureManifestCheckParams = value; - } - - /** - * Gets the value of the returnHashInputData property. - * - * @return - * possible object is - * {@link Object } - * - */ - public Object getReturnHashInputData() { - return returnHashInputData; - } - - /** - * Sets the value of the returnHashInputData property. - * - * @param value - * allowed object is - * {@link Object } - * - */ - public void setReturnHashInputData(Object value) { - this.returnHashInputData = value; - } - - /** - * Gets the value of the trustProfileID property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTrustProfileID() { - return trustProfileID; - } - - /** - * Sets the value of the trustProfileID property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTrustProfileID(String value) { - this.trustProfileID = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="ReferenceInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}VerifyTransformsDataType" maxOccurs="unbounded"/> - * </sequence> - * <attribute name="ReturnReferenceInputData" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "referenceInfo" - }) - public static class SignatureManifestCheckParams { - - @XmlElement(name = "ReferenceInfo", required = true) - protected List<VerifyTransformsDataType> referenceInfo; - @XmlAttribute(name = "ReturnReferenceInputData") - protected Boolean returnReferenceInputData; - - /** - * Gets the value of the referenceInfo property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the referenceInfo property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getReferenceInfo().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link VerifyTransformsDataType } - * - * - */ - public List<VerifyTransformsDataType> getReferenceInfo() { - if (referenceInfo == null) { - referenceInfo = new ArrayList<VerifyTransformsDataType>(); - } - return this.referenceInfo; - } - - /** - * Gets the value of the returnReferenceInputData property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isReturnReferenceInputData() { - if (returnReferenceInputData == null) { - return true; - } else { - return returnReferenceInputData; - } - } - - /** - * Sets the value of the returnReferenceInputData property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setReturnReferenceInputData(Boolean value) { - this.returnReferenceInputData = value; - } - - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="VerifySignatureEnvironment" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentOptionalRefType"/> - * <element name="VerifySignatureLocation" type="{http://www.w3.org/2001/XMLSchema}token"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "verifySignatureEnvironment", - "verifySignatureLocation" - }) - public static class VerifySignatureInfo { - - @XmlElement(name = "VerifySignatureEnvironment", required = true) - protected ContentOptionalRefType verifySignatureEnvironment; - @XmlElement(name = "VerifySignatureLocation", required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "token") - protected String verifySignatureLocation; - - /** - * Gets the value of the verifySignatureEnvironment property. - * - * @return - * possible object is - * {@link ContentOptionalRefType } - * - */ - public ContentOptionalRefType getVerifySignatureEnvironment() { - return verifySignatureEnvironment; - } - - /** - * Sets the value of the verifySignatureEnvironment property. - * - * @param value - * allowed object is - * {@link ContentOptionalRefType } - * - */ - public void setVerifySignatureEnvironment(ContentOptionalRefType value) { - this.verifySignatureEnvironment = value; - } - - /** - * Gets the value of the verifySignatureLocation property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getVerifySignatureLocation() { - return verifySignatureLocation; - } - - /** - * Sets the value of the verifySignatureLocation property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setVerifySignatureLocation(String value) { - this.verifySignatureLocation = value; - } - - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureResponseType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureResponseType.java deleted file mode 100644 index 18c9ddec..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/VerifyXMLSignatureResponseType.java +++ /dev/null @@ -1,263 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for VerifyXMLSignatureResponseType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="VerifyXMLSignatureResponseType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="SignerInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/> - * <element name="HashInputData" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}InputDataType" maxOccurs="unbounded" minOccurs="0"/> - * <element name="ReferenceInputData" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}InputDataType" maxOccurs="unbounded" minOccurs="0"/> - * <element name="SignatureCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ReferencesCheckResultType"/> - * <element name="SignatureManifestCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ReferencesCheckResultType" minOccurs="0"/> - * <element name="XMLDSIGManifestCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ManifestRefsCheckResultType" maxOccurs="unbounded" minOccurs="0"/> - * <element name="CertificateCheck" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}CheckResultType"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "VerifyXMLSignatureResponseType", propOrder = { - "signerInfo", - "hashInputData", - "referenceInputData", - "signatureCheck", - "signatureManifestCheck", - "xmldsigManifestCheck", - "certificateCheck" -}) -public class VerifyXMLSignatureResponseType { - - @XmlElement(name = "SignerInfo", required = true) - protected KeyInfoType signerInfo; - @XmlElement(name = "HashInputData") - protected List<InputDataType> hashInputData; - @XmlElement(name = "ReferenceInputData") - protected List<InputDataType> referenceInputData; - @XmlElement(name = "SignatureCheck", required = true) - protected ReferencesCheckResultType signatureCheck; - @XmlElement(name = "SignatureManifestCheck") - protected ReferencesCheckResultType signatureManifestCheck; - @XmlElement(name = "XMLDSIGManifestCheck") - protected List<ManifestRefsCheckResultType> xmldsigManifestCheck; - @XmlElement(name = "CertificateCheck", required = true) - protected CheckResultType certificateCheck; - - /** - * Gets the value of the signerInfo property. - * - * @return - * possible object is - * {@link KeyInfoType } - * - */ - public KeyInfoType getSignerInfo() { - return signerInfo; - } - - /** - * Sets the value of the signerInfo property. - * - * @param value - * allowed object is - * {@link KeyInfoType } - * - */ - public void setSignerInfo(KeyInfoType value) { - this.signerInfo = value; - } - - /** - * Gets the value of the hashInputData property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the hashInputData property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getHashInputData().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link InputDataType } - * - * - */ - public List<InputDataType> getHashInputData() { - if (hashInputData == null) { - hashInputData = new ArrayList<InputDataType>(); - } - return this.hashInputData; - } - - /** - * Gets the value of the referenceInputData property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the referenceInputData property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getReferenceInputData().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link InputDataType } - * - * - */ - public List<InputDataType> getReferenceInputData() { - if (referenceInputData == null) { - referenceInputData = new ArrayList<InputDataType>(); - } - return this.referenceInputData; - } - - /** - * Gets the value of the signatureCheck property. - * - * @return - * possible object is - * {@link ReferencesCheckResultType } - * - */ - public ReferencesCheckResultType getSignatureCheck() { - return signatureCheck; - } - - /** - * Sets the value of the signatureCheck property. - * - * @param value - * allowed object is - * {@link ReferencesCheckResultType } - * - */ - public void setSignatureCheck(ReferencesCheckResultType value) { - this.signatureCheck = value; - } - - /** - * Gets the value of the signatureManifestCheck property. - * - * @return - * possible object is - * {@link ReferencesCheckResultType } - * - */ - public ReferencesCheckResultType getSignatureManifestCheck() { - return signatureManifestCheck; - } - - /** - * Sets the value of the signatureManifestCheck property. - * - * @param value - * allowed object is - * {@link ReferencesCheckResultType } - * - */ - public void setSignatureManifestCheck(ReferencesCheckResultType value) { - this.signatureManifestCheck = value; - } - - /** - * Gets the value of the xmldsigManifestCheck property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the xmldsigManifestCheck property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getXMLDSIGManifestCheck().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link ManifestRefsCheckResultType } - * - * - */ - public List<ManifestRefsCheckResultType> getXMLDSIGManifestCheck() { - if (xmldsigManifestCheck == null) { - xmldsigManifestCheck = new ArrayList<ManifestRefsCheckResultType>(); - } - return this.xmldsigManifestCheck; - } - - /** - * Gets the value of the certificateCheck property. - * - * @return - * possible object is - * {@link CheckResultType } - * - */ - public CheckResultType getCertificateCheck() { - return certificateCheck; - } - - /** - * Sets the value of the certificateCheck property. - * - * @param value - * allowed object is - * {@link CheckResultType } - * - */ - public void setCertificateCheck(CheckResultType value) { - this.certificateCheck = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/X509DataType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/X509DataType.java deleted file mode 100644 index cab7852d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/X509DataType.java +++ /dev/null @@ -1,109 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - - -/** - * <p>Java class for X509DataType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="X509DataType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence maxOccurs="unbounded"> - * <choice> - * <element name="X509IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/> - * <element name="X509SKI" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="X509SubjectName" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <element name="X509CRL" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/> - * <any/> - * </choice> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "X509DataType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "x509IssuerSerialOrX509SKIOrX509SubjectName" -}) -public class X509DataType { - - @XmlElementRefs({ - @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), - @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - }) - @XmlAnyElement(lax = true) - protected List<Object> x509IssuerSerialOrX509SKIOrX509SubjectName; - - /** - * Gets the value of the x509IssuerSerialOrX509SKIOrX509SubjectName property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the x509IssuerSerialOrX509SKIOrX509SubjectName property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getX509IssuerSerialOrX509SKIOrX509SubjectName().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * {@link Element } - * {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} - * {@link Object } - * - * - */ - public List<Object> getX509IssuerSerialOrX509SKIOrX509SubjectName() { - if (x509IssuerSerialOrX509SKIOrX509SubjectName == null) { - x509IssuerSerialOrX509SKIOrX509SubjectName = new ArrayList<Object>(); - } - return this.x509IssuerSerialOrX509SKIOrX509SubjectName; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/X509IssuerSerialType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/X509IssuerSerialType.java deleted file mode 100644 index fc3c90d5..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/X509IssuerSerialType.java +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for X509IssuerSerialType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="X509IssuerSerialType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="X509IssuerName" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="X509SerialNumber" type="{http://www.w3.org/2001/XMLSchema}integer"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "X509IssuerSerialType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { - "x509IssuerName", - "x509SerialNumber" -}) -public class X509IssuerSerialType { - - @XmlElement(name = "X509IssuerName", required = true) - protected String x509IssuerName; - @XmlElement(name = "X509SerialNumber", required = true) - protected BigInteger x509SerialNumber; - - /** - * Gets the value of the x509IssuerName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getX509IssuerName() { - return x509IssuerName; - } - - /** - * Sets the value of the x509IssuerName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setX509IssuerName(String value) { - this.x509IssuerName = value; - } - - /** - * Gets the value of the x509SerialNumber property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getX509SerialNumber() { - return x509SerialNumber; - } - - /** - * Sets the value of the x509SerialNumber property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setX509SerialNumber(BigInteger value) { - this.x509SerialNumber = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/XMLContentType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/XMLContentType.java deleted file mode 100644 index da6a4708..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/XMLContentType.java +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - - -/** - * <p>Java class for XMLContentType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="XMLContentType"> - * <complexContent> - * <extension base="{http://reference.e-government.gv.at/namespace/moa/20020822#}AnyChildrenType"> - * <attribute ref="{http://www.w3.org/XML/1998/namespace}space"/> - * </extension> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "XMLContentType") -public class XMLContentType - extends AnyChildrenType -{ - - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - protected String space; - - /** - * Gets the value of the space property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getSpace() { - return space; - } - - /** - * Sets the value of the space property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setSpace(String value) { - this.space = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/XMLDataObjectAssociationType.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/XMLDataObjectAssociationType.java deleted file mode 100644 index 6615981c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/XMLDataObjectAssociationType.java +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package moaspss.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for XMLDataObjectAssociationType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="XMLDataObjectAssociationType"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="MetaInfo" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}MetaInfoType" minOccurs="0"/> - * <element name="Content" type="{http://reference.e-government.gv.at/namespace/moa/20020822#}ContentRequiredRefType"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "XMLDataObjectAssociationType", propOrder = { - "metaInfo", - "content" -}) -public class XMLDataObjectAssociationType { - - @XmlElement(name = "MetaInfo") - protected MetaInfoType metaInfo; - @XmlElement(name = "Content", required = true) - protected ContentRequiredRefType content; - - /** - * Gets the value of the metaInfo property. - * - * @return - * possible object is - * {@link MetaInfoType } - * - */ - public MetaInfoType getMetaInfo() { - return metaInfo; - } - - /** - * Sets the value of the metaInfo property. - * - * @param value - * allowed object is - * {@link MetaInfoType } - * - */ - public void setMetaInfo(MetaInfoType value) { - this.metaInfo = value; - } - - /** - * Gets the value of the content property. - * - * @return - * possible object is - * {@link ContentRequiredRefType } - * - */ - public ContentRequiredRefType getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is - * {@link ContentRequiredRefType } - * - */ - public void setContent(ContentRequiredRefType value) { - this.content = value; - } - -} diff --git a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/package-info.java b/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/package-info.java deleted file mode 100644 index aadb75fc..00000000 --- a/mocca-1.2.11/bkucommon/src/test/java/moaspss/generated/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package moaspss.generated; diff --git a/mocca-1.2.11/bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl b/mocca-1.2.11/bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl deleted file mode 100644 index 25accfce..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/MOA-SPSS-1.3.wsdl +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Web Service Description for MOA SP/SS 1.4 - modified for BKU2 testing ---> -<definitions name="MOA" - targetNamespace="http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#" - xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - <types> - <xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/wsdl/20020822#"> - <xsd:import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" schemaLocation="MOA-SPSS-1.3.xsd"/> - </xsd:schema> - </types> - - <message name="VerifyXMLSignatureInput"> - <part name="body" element="moa:VerifyXMLSignatureRequest"/> - </message> - <message name="VerifyXMLSignatureOutput"> - <part name="body" element="moa:VerifyXMLSignatureResponse"/> - </message> - <message name="MOAFault"> - <part name="body" element="moa:ErrorResponse"/> - </message> - <portType name="SignatureVerificationPortType"> - <operation name="verifyXMLSignature"> - <input message="tns:VerifyXMLSignatureInput"/> - <output message="tns:VerifyXMLSignatureOutput"/> - <fault name="MOAFault" message="tns:MOAFault"/> - </operation> - </portType> - <binding name="SignatureVerificationBinding" type="tns:SignatureVerificationPortType"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <operation name="verifyXMLSignature"> - <soap:operation soapAction="urn:VerifyXMLSignatureAction"/> - <input> - <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/> - </input> - <output> - <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/> - </output> - <fault name="MOAFault"> - <soap:fault name="MOAFault" use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/> - </fault> - </operation> - </binding> - <service name="SignatureVerificationService"> - <port name="SignatureVerificationPort" binding="tns:SignatureVerificationBinding"> - <soap:address location="http://localhost:8080/moa-spss/services/SignatureVerification"/> - </port> - </service> -</definitions> diff --git a/mocca-1.2.11/bkucommon/src/test/resources/MOA-SPSS-1.3.xsd b/mocca-1.2.11/bkucommon/src/test/resources/MOA-SPSS-1.3.xsd deleted file mode 100644 index 756b5127..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/MOA-SPSS-1.3.xsd +++ /dev/null @@ -1,469 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- MOA SP/SS 1.3 Schema
--->
-<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
- <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
- <!--########## Create XML Signature ###-->
- <!--### Create XML Signature Request ###-->
- <xsd:element name="CreateXMLSignatureRequest">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="CreateXMLSignatureRequestType"/>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:complexType name="CreateXMLSignatureRequestType">
- <xsd:sequence>
- <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
- <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="DataObjectInfoType">
- <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="CreateSignatureInfo" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
- <xsd:choice>
- <xsd:annotation>
- <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
- </xsd:annotation>
- <xsd:element ref="CreateSignatureEnvironmentProfile"/>
- <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
- </xsd:choice>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <!--### Create XML Signature Response ###-->
- <xsd:complexType name="CreateXMLSignatureResponseType">
- <xsd:choice maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
- </xsd:annotation>
- <xsd:element name="SignatureEnvironment">
- <xsd:annotation>
- <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:any namespace="##any" processContents="lax"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element ref="ErrorResponse"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
- <!--########## Verify CMS Signature ###-->
- <!--### Verifiy CMS Signature Request ###-->
- <xsd:element name="VerifyCMSSignatureRequest">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="VerifyCMSSignatureRequestType">
- <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:complexType name="VerifyCMSSignatureRequestType">
- <xsd:sequence>
- <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
- <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
- <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
- <xsd:element name="TrustProfileID" type="xsd:token">
- <xsd:annotation>
- <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <!--### Verify CMS Signature Response ###-->
- <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
- <xsd:complexType name="VerifyCMSSignatureResponseType">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
- <xsd:annotation>
- <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="SignatureCheck" type="CheckResultType"/>
- <xsd:element name="CertificateCheck" type="CheckResultType"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--########## Verify XML Signature ###-->
- <!--### Verify XML Signature Request ###-->
- <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
- <xsd:complexType name="VerifyXMLSignatureRequestType">
- <xsd:sequence>
- <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
- <xsd:element name="VerifySignatureInfo">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
- <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element ref="SupplementProfile"/>
- <xsd:element name="SupplementProfileID" type="xsd:string"/>
- </xsd:choice>
- <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="ReturnHashInputData" minOccurs="0"/>
- <xsd:element name="TrustProfileID" type="xsd:token">
- <xsd:annotation>
- <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <!--### Verify XML Signature Response ###-->
- <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
- <xsd:complexType name="VerifyXMLSignatureResponseType">
- <xsd:sequence>
- <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
- <xsd:annotation>
- <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
- <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
- <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="CertificateCheck" type="CheckResultType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="ProfileIdentifierType">
- <xsd:restriction base="xsd:token"/>
- </xsd:simpleType>
- <xsd:complexType name="InputDataType">
- <xsd:complexContent>
- <xsd:extension base="ContentExLocRefBaseType">
- <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
- <xsd:simpleType>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="SignedInfo"/>
- <xsd:enumeration value="XMLDSIGManifest"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="MetaInfoType">
- <xsd:sequence>
- <xsd:element name="MimeType" type="MimeTypeType"/>
- <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
- <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="FinalDataMetaInfoType">
- <xsd:complexContent>
- <xsd:extension base="MetaInfoType">
- <xsd:sequence>
- <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="DataObjectInfoType">
- <xsd:sequence>
- <xsd:element name="DataObject">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="ContentOptionalRefType"/>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:choice>
- <xsd:annotation>
- <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
- </xsd:annotation>
- <xsd:element ref="CreateTransformsInfoProfile"/>
- <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="Structure" use="required">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="detached"/>
- <xsd:enumeration value="enveloping"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- </xsd:complexType>
- <xsd:complexType name="TransformsInfoType">
- <xsd:sequence>
- <xsd:element ref="dsig:Transforms" minOccurs="0"/>
- <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="XMLDataObjectAssociationType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
- <xsd:element name="Content" type="ContentRequiredRefType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CMSDataObjectOptionalMetaType">
- <xsd:sequence>
- <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
- <xsd:element name="Content" type="CMSContentBaseType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CMSContentBaseType">
- <xsd:complexContent>
- <xsd:restriction base="ContentOptionalRefType">
- <xsd:choice minOccurs="0">
- <xsd:element name="Base64Content" type="xsd:base64Binary"/>
- </xsd:choice>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="CheckResultType">
- <xsd:sequence>
- <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
- <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="ReferencesCheckResultType">
- <xsd:complexContent>
- <xsd:restriction base="CheckResultType">
- <xsd:sequence>
- <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
- <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
- <xsd:complexContent mixed="true">
- <xsd:restriction base="AnyChildrenType">
- <xsd:sequence>
- <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="ManifestRefsCheckResultType">
- <xsd:complexContent>
- <xsd:restriction base="CheckResultType">
- <xsd:sequence>
- <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
- <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
- </xsd:sequence>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
- <xsd:complexContent mixed="true">
- <xsd:restriction base="AnyChildrenType">
- <xsd:sequence>
- <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
- </xsd:sequence>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <!--########## Error Response ###-->
- <xsd:element name="ErrorResponse" type="ErrorResponseType">
- <xsd:annotation>
- <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:complexType name="ErrorResponseType">
- <xsd:sequence>
- <xsd:element name="ErrorCode" type="xsd:integer"/>
- <xsd:element name="Info" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- <!--########## Auxiliary Types ###-->
- <xsd:simpleType name="KeyIdentifierType">
- <xsd:restriction base="xsd:string"/>
- </xsd:simpleType>
- <xsd:simpleType name="KeyStorageType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="Software"/>
- <xsd:enumeration value="Hardware"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="MimeTypeType">
- <xsd:restriction base="xsd:token"/>
- </xsd:simpleType>
- <xsd:complexType name="AnyChildrenType" mixed="true">
- <xsd:sequence>
- <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="XMLContentType" mixed="true">
- <xsd:complexContent mixed="true">
- <xsd:extension base="AnyChildrenType">
- <xsd:attribute ref="xml:space" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="ContentBaseType">
- <xsd:choice minOccurs="0">
- <xsd:element name="Base64Content" type="xsd:base64Binary"/>
- <xsd:element name="XMLContent" type="XMLContentType"/>
- <xsd:element name="LocRefContent" type="xsd:anyURI"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="ContentExLocRefBaseType">
- <xsd:complexContent>
- <xsd:restriction base="ContentBaseType">
- <xsd:choice minOccurs="0">
- <xsd:element name="Base64Content" type="xsd:base64Binary"/>
- <xsd:element name="XMLContent" type="XMLContentType"/>
- </xsd:choice>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="ContentOptionalRefType">
- <xsd:complexContent>
- <xsd:extension base="ContentBaseType">
- <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="ContentRequiredRefType">
- <xsd:complexContent>
- <xsd:restriction base="ContentOptionalRefType">
- <xsd:choice minOccurs="0">
- <xsd:element name="Base64Content" type="xsd:base64Binary"/>
- <xsd:element name="XMLContent" type="XMLContentType"/>
- <xsd:element name="LocRefContent" type="xsd:anyURI"/>
- </xsd:choice>
- <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="VerifyTransformsDataType">
- <xsd:choice maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
- </xsd:annotation>
- <xsd:element ref="VerifyTransformsInfoProfile"/>
- <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
- <xsd:annotation>
- <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- <xsd:element name="QualifiedCertificate"/>
- <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
- <xsd:complexType name="PublicAuthorityType">
- <xsd:sequence>
- <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="SignatoriesType">
- <xsd:union memberTypes="AllSignatoriesType">
- <xsd:simpleType>
- <xsd:list itemType="xsd:positiveInteger"/>
- </xsd:simpleType>
- </xsd:union>
- </xsd:simpleType>
- <xsd:simpleType name="AllSignatoriesType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="all"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="CreateSignatureLocationType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:token">
- <xsd:attribute name="Index" type="xsd:integer" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <xsd:complexType name="TransformParameterType">
- <xsd:choice minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
- </xsd:annotation>
- <xsd:element name="Base64Content" type="xsd:base64Binary">
- <xsd:annotation>
- <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="Hash">
- <xsd:annotation>
- <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="dsig:DigestMethod"/>
- <xsd:element ref="dsig:DigestValue"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
- </xsd:complexType>
- <xsd:element name="CreateSignatureEnvironmentProfile">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
- <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="VerifyTransformsInfoProfile">
- <xsd:annotation>
- <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="dsig:Transforms" minOccurs="0"/>
- <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
- <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
- <xsd:element name="CreateTransformsInfoProfile">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
- <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-</xsd:schema>
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/AccessControlConfig.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/AccessControlConfig.xml deleted file mode 100644 index 22f9e4a5..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/AccessControlConfig.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<AccessControl>
- <Chains>
- <Chain Id="Identification">
- <Rules>
- <Rule Id="rule-1">
- <AuthClass>certifiedGovAgency</AuthClass>
- <AnyPeer />
- <Action>
- <RuleAction>allow</RuleAction>
- </Action>
- <UserInteraction>confirm</UserInteraction>
- </Rule>
- <Rule Id="rule-2">
- <AuthClass>pseudoanonymous</AuthClass>
- <AnyPeer />
- <Action>
- <ChainRef>Command</ChainRef>
- </Action>
- <UserInteraction>none</UserInteraction>
- </Rule>
- <Rule Id="rule-3">
- <AuthClass>anonymous</AuthClass>
- <IPv4Address>127.0.0.1</IPv4Address>
- <Action>
- <ChainRef>Command</ChainRef>
- </Action>
- <UserInteraction>none</UserInteraction>
- </Rule>
- <Rule Id="rule-4">
- <AuthClass>anonymous</AuthClass>
- <DomainName>$.gv.at</DomainName>
- <Action>
- <RuleAction>allow</RuleAction>
- </Action>
- <UserInteraction>confirm</UserInteraction>
- </Rule>
- </Rules>
- </Chain>
- <Chain Id="Command">
- <Rules>
- <Rule Id="cmd-rule-1">
- <AuthClass>certified</AuthClass>
- <AnyPeer />
- <Command Name="Infobox*">
- <Param Name="InfoboxIdentifier">IdentityLink</Param>
- <Param Name="PersonIdentifier">.*</Param>
- </Command>
- <Action>
- <RuleAction>allow</RuleAction>
- </Action>
- <UserInteraction>confirm</UserInteraction>
- </Rule>
- <Rule Id="cmd-rule-2">
- <AuthClass>certified</AuthClass>
- <URL>https://finanzonline.bmf.gv.at/*</URL>
- <Command Name="InfoboxReadRequest">
- <Param Name="InfoboxIdentifier">Mandates</Param>
- <Param Name="PersonIdentifier">.*</Param>
- </Command>
- <Action>
- <RuleAction>allow</RuleAction>
- </Action>
- <UserInteraction>info</UserInteraction>
- </Rule>
- <Rule Id="cmd-rule-3">
- <AuthClass>certified</AuthClass>
- <AnyPeer />
- <Command Name="InfoboxReadRequest" />
- <Action>
- <RuleAction>allow</RuleAction>
- </Action>
- <UserInteraction>none</UserInteraction>
- </Rule>
- </Rules>
- </Chain>
- </Chains>
-</AccessControl>
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/SimpleChainTest.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/SimpleChainTest.xml deleted file mode 100644 index 92490fb2..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/SimpleChainTest.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<AccessControl>
- <Chains>
- <Chain Id="InputFilter">
- <Rules>
- <Rule Id="rule-IF1">
- <AuthClass>pseudoanonymous</AuthClass>
- <Action>
- <ChainRef>DelegateFilter</ChainRef>
- </Action>
- </Rule>
- </Rules>
- </Chain>
-
- <Chain Id="DelegateFilter">
- <Rules>
- <Rule Id="rule-DF1">
- <AuthClass>certified</AuthClass>
- <Command Name="Infobox.*">
- <Param Name="InfoboxIdentifier">IdentityLink</Param>
- <Param Name="PersonIdentifier">derived</Param>
- </Command>
- <Action>
- <RuleAction>allow</RuleAction>
- </Action>
- </Rule>
- <Rule Id="rule-DF2">
- <AuthClass>certified</AuthClass>
- <Command Name="Infobox.*">
- <Param Name="InfoboxIdentifier">IdentityLink</Param>
- </Command>
- <Action>
- <RuleAction>deny</RuleAction>
- </Action>
- </Rule>
- </Rules>
- </Chain>
- </Chains>
-</AccessControl>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/www.a-trust.at.crt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/www.a-trust.at.crt deleted file mode 100644 index 11cde026..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/accesscontroller/www.a-trust.at.crt +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE-----
-MIIEyjCCA7KgAwIBAgIDA4LFMA0GCSqGSIb3DQEBBQUAMIGHMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRYwFAYDVQQLDA1hLXNpZ24tU1NM
-LTAzMRYwFAYDVQQDDA1hLXNpZ24tU1NMLTAzMB4XDTA3MTIxMTExMTQ0NFoXDTEy
-MTIxMTExMTQ0NFowYTELMAkGA1UEBhMCQVQxEDAOBgNVBAoMB0EtVHJ1c3QxEDAO
-BgNVBAsMB0EtVHJ1c3QxFzAVBgNVBAMMDnd3dy5hLXRydXN0LmF0MRUwEwYDVQQF
-Eww2NDk2ODY0MDkzMzkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAK2oRtJ4
-R9ipr/NUH5F4p86cjWtzT1g+ytpjg1lwh4HNY+lTjdUcx/VKBrtf0N8qnMK1UHhA
-LLvvZeKTFi3L15i5or1WjZRi4RfH/4vcL0o1w/91liwMOKH3D30omnVceuxmQp2j
-V9QrGPbz0/IsP51cnBWCBTWGqgfBebB8v1FLAgMBAAGjggHmMIIB4jATBgNVHSME
-DDAKgAhAPqHTYrQD3TByBggrBgEFBQcBAQRmMGQwJwYIKwYBBQUHMAGGG2h0dHA6
-Ly9vY3NwLmEtdHJ1c3QuYXQvb2NzcDA5BggrBgEFBQcwAoYtaHR0cDovL3d3dy5h
-LXRydXN0LmF0L2NlcnRzL2Etc2lnbi1zc2wtMDMuY3J0MEsGA1UdIAREMEIwQAYG
-KigAEQEUMDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cuYS10cnVzdC5hdC9kb2Nz
-L2NwL2Etc2lnbi1zc2wwgY8GA1UdHwSBhzCBhDCBgaB/oH2Ge2xkYXA6Ly9sZGFw
-LmEtdHJ1c3QuYXQvb3U9YS1zaWduLVNTTC0wMyxvPUEtVHJ1c3QsYz1BVD9jZXJ0
-aWZpY2F0ZXJldm9jYXRpb25saXN0P2Jhc2U/b2JqZWN0Y2xhc3M9ZWlkQ2VydGlm
-aWNhdGlvbkF1dGhvcml0eTARBgNVHQ4ECgQIRu1a/pOZZpMwDgYDVR0PAQH/BAQD
-AgWgMEoGA1UdEQRDMEGBEW9mZmljZUBhLXRydXN0LmF0gg53d3cuYS10cnVzdC5h
-dIIcemRhLnNvemlhbHZlcnNpY2hlcnVuZy5ndi5hdDAJBgNVHRMEAjAAMA0GCSqG
-SIb3DQEBBQUAA4IBAQCQGheDpci0lnSEoKw/N3tbJqn/KG49/OWZcsw6XZiAEHsx
-Rx9TlNJhL2d/SqFXBmmqfR496gdzTb4823WJsmXtyBY2t5ZnmD9tY5oJi5bHKchO
-50QCd1x24HzH1mxPReCJzRxzLEM/znojEMdYqQ5Y+BZuj7n9BY+l2nY0Qnhn09FE
-dxXAfNcuZnZavLJgk7vTBg8OFkAh6DJ21ACxf/y+rN53gKFK4Jh+PodRu0J2tK8B
-wAZg7HlnT8U7tcEsf1JnsBhlzAWCHgZc6whgBbDHFs6WSFWuobKN+maU91g/Tvgk
-Obos/EhVNti54Zhu1PO9RSKpKkwzTJT4kmGtaOJN
------END CERTIFICATE-----
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Multipart.txt.bin b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Multipart.txt.bin deleted file mode 100644 index 6b00acc5..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Multipart.txt.bin +++ /dev/null @@ -1,337 +0,0 @@ -POST http://www.opinionatedgeek.com:80/dotnet/tools/Base64Encode/Default.aspx HTTP/1.1
-Host: www.opinionatedgeek.com
-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15
-Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
-Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
-Accept-Encoding: gzip,deflate
-Accept-Charset: UTF-8,*
-Keep-Alive: 300
-Proxy-Connection: keep-alive
-Referer: http://www.opinionatedgeek.com/dotnet/tools/Base64Encode/
-Cookie: __utma=87673542.1058874134.1202897575.1205922938.1215441720.3; __utmz=87673542.1215441720.3.3.utmccn=(organic)|utmcsr=google|utmctr=base64+encoder|utmcmd=organic; __utmb=87673542; __utmc=87673542
-Content-Type: multipart/form-data; boundary=---------------------------15671293698853
-Content-length: 11576
-
------------------------------15671293698853
-Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$ctl00_Hidden"
-
-False
------------------------------15671293698853
-Content-Disposition: form-data; name="__VIEWSTATE"
-
-/wEPDwUJNzM1NDA1ODc3D2QWAmYPZBYCZg9kFgJmD2QWAgIFD2QWAgIFD2QWAgIBD2QWAgIBDxYCHgdlbmN0eXBlBRNtdWx0aXBhcnQvZm9ybS1kYXRhFgICAQ9kFgICAw9kFgICAQ9kFgICAQ8PFCsDA2hoZ2QWBGYPDxYEHghDc3NDbGFzcwUPc3Vic2VjdGlvbnRpdGxlHgRfIVNCAgJkFgJmDw8WBB8BBQ9zdWJzZWN0aW9udGl0bGUfAgICZBYCZg8PFgQeC05hdmlnYXRlVXJsBQEjHgdUb29sVGlwBRhDbGljayB0byBleHBhbmQvY29sbGFwc2UWBh4Hb25jbGljawXCAXJldHVybiB0b2dnbGVfZXhjX29wZ2VlayAoJ2N0bDAwX2N0bDAwX2N0bDAwX1dob2xlQm9keV9Db250ZW50UGFuZV9Db250ZW50QXJlYV9jdGwwMV9jdGwwMV9Cb2R5X2N0bDAwX2N0bDAwJywgJ2N0bDAwJGN0bDAwJGN0bDAwJFdob2xlQm9keSRDb250ZW50UGFuZSRDb250ZW50QXJlYSRjdGwwMSRjdGwwMSRCb2R5JGN0bDAwX0hpZGRlbicpHgtvbm1vdXNlb3ZlcgU3d2luZG93LnN0YXR1cyA9ICdDbGljayB0byBleHBhbmQvY29sbGFwc2UnOyByZXR1cm4gdHJ1ZR4Kb25tb3VzZW91dAUfd2luZG93LnN0YXR1cyA9ICcnOyByZXR1cm4gdHJ1ZWQCAQ8PFgQfAQULc2VjdGlvbmJvZHkfAgICZBYCZg8PFgQfAQULc2VjdGlvbmJvZHkfAgICZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFSmN0bDAwJGN0bDAwJGN0bDAwJFdob2xlQm9keSRDb250ZW50UGFuZSRDb250ZW50QXJlYSRjdGwwMSRjdGwwMSRCb2R5JGN0bDAwm1Yd0S+llPVzX/xfKb3tdvK8fNQ=
------------------------------15671293698853
-Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$ctl00$ctl02"
-
-False
------------------------------15671293698853
-Content-Disposition: form-data; name="XMLRequest"; filename="project.xml"
-Content-Type: text/xml
-
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<project>
- <pomVersion>3</pomVersion>
-
- <name>FileUpload</name>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <currentVersion>1.3-SNAPSHOT</currentVersion>
- <inceptionYear>2002</inceptionYear>
- <shortDescription>File upload component for Java servlets</shortDescription>
- <description>
- The FileUpload component provides a simple yet flexible means of adding
- support for multipart file upload functionality to servlets and web
- applications.
- </description>
- <logo>/images/logo.png</logo>
-
- <url>http://commons.apache.org/${pom.artifactId.substring(8)}/</url>
- <package>org.apache.commons.${pom.artifactId.substring(8)}</package>
-
- <organization>
- <name>The Apache Software Foundation</name>
- <url>http://commons.apache.org/</url>
- <logo>http://commons.apache.org/images/logo.png</logo>
- </organization>
-
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>/LICENSE.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <gumpRepositoryId>commons</gumpRepositoryId>
- <issueTrackingUrl>http://issues.apache.org/jira/</issueTrackingUrl>
- <siteAddress>people.apache.org</siteAddress>
- <siteDirectory>/www/commons.apache.org/${pom.artifactId.substring(8)}/</siteDirectory>
- <distributionDirectory>/www/people.apache.org/builds/commons/${pom.artifactId.substring(8)}/</distributionDirectory>
-
- <repository>
- <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/${pom.artifactId.substring(8)}/trunk</connection>
- <url>http://svn.apache.org/repos/asf</url>
- </repository>
-
- <mailingLists>
- <mailingList>
- <name>Commons Dev List</name>
- <subscribe>dev-subscribe@commons.apache.org</subscribe>
- <unsubscribe>dev-unsubscribe@commons.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/commons-dev/</archive>
- </mailingList>
- <mailingList>
- <name>Commons User List</name>
- <subscribe>user-subscribe@commons.apache.org</subscribe>
- <unsubscribe>user-unsubscribe@commons.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/commons-user/</archive>
- </mailingList>
- </mailingLists>
-
-
- <versions>
- <version>
- <id>1.2.1</id>
- <name>1.2.1</name>
- <tag>commons-fileupload-1.2.1</tag>
- </version>
- <version>
- <id>1.2</id>
- <name>1.2</name>
- <tag>commons-fileupload-1.2</tag>
- </version>
- <version>
- <id>1.1.1</id>
- <name>1.1.1</name>
- <tag>FILEUPLOAD_1_1_1</tag>
- </version>
- <version>
- <id>1.1</id>
- <name>1.1</name>
- <tag>FILEUPLOAD_1_1</tag>
- </version>
- <version>
- <id>1.1-rc2</id>
- <name>1.1-rc2</name>
- <tag>FILEUPLOAD_1_1_RC2</tag>
- </version>
- <version>
- <id>1.1-rc1</id>
- <name>1.1-rc1</name>
- <tag>FILEUPLOAD_1_1_RC1</tag>
- </version>
- <version>
- <id>1.0</id>
- <name>1.0</name>
- <tag>FILEUPLOAD_1_0</tag>
- </version>
- <version>
- <id>1.0-rc1</id>
- <name>1.0-rc1</name>
- <tag>FILEUPLOAD_1_0_RC1</tag>
- </version>
- <version>
- <id>1.0-beta-1</id>
- <name>1.0-beta-1</name>
- <tag>FILEUPLOAD_1_0_B1</tag>
- </version>
- </versions>
-
- <developers>
- <developer>
- <name>Martin Cooper</name>
- <id>martinc</id>
- <email>martinc@apache.org</email>
- <organization>EMC</organization>
- </developer>
- <developer>
- <name>dIon Gillard</name>
- <id>dion</id>
- <email>dion@apache.org</email>
- <organization>Multitask Consulting</organization>
- </developer>
- <developer>
- <name>John McNally</name>
- <id>jmcnally</id>
- <email>jmcnally@collab.net</email>
- <organization>CollabNet</organization>
- </developer>
- <developer>
- <name>Daniel Rall</name>
- <id>dlr</id>
- <email>dlr@finemaltcoding.com</email>
- <organization>CollabNet</organization>
- </developer>
- <developer>
- <name>Jason van Zyl</name>
- <id>jvanzyl</id>
- <email>jason@zenplex.com</email>
- <organization>Zenplex</organization>
- </developer>
- <developer>
- <name>Robert Burrell Donkin</name>
- <id>rdonkin</id>
- <email>rdonkin@apache.org</email>
- <organization/>
- </developer>
- <developer>
- <name>Sean C. Sullivan</name>
- <id>sullis</id>
- <email>sean |at| seansullivan |dot| com</email>
- <organization></organization>
- </developer>
- <developer>
- <name>Jochen Wiedmann</name>
- <id>jochen</id>
- <email>jochen.wiedmann@gmail.com</email>
- <organization/>
- </developer>
- </developers>
-
- <dependencies>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3.2</version>
- <url>http://commons.apache.org/io/</url>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <url>http://java.sun.com/products/servlet/</url>
- <properties>
- <scope>provided</scope>
- </properties>
- </dependency>
- <dependency>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- <version>1.0</version>
- <url>http://portals.apache.org/pluto</url>
- <properties>
- <scope>provided</scope>
- <comment>
- Required only when using FileUpload in a portlet environment.
- </comment>
- </properties>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <url>http://www.junit.org/</url>
- <properties>
- <scope>test</scope>
- <comment>
- <strong>Test Only</strong> - required only for
- running the FileUpload unit tests.
- </comment>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>maven</groupId>
- <artifactId>maven-xdoc-plugin</artifactId>
- <version>1.9.2</version>
- <url>http://maven.apache.org/reference/plugins/xdoc/</url>
- <type>plugin</type>
- <properties>
- <comment>
- <strong>Site Only</strong> - v1.9.2 (minimum)
- required for building the FileUpload Site documentation.
- </comment>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>maven</groupId>
- <artifactId>maven-changelog-plugin</artifactId>
- <version>1.9.1</version>
- <url>http://maven.apache.org/reference/plugins/changelog/</url>
- <type>plugin</type>
- <properties>
- <comment>
- <strong>Site Only</strong> - v1.9.1 (minimum)
- required for building the FileUpload Site documentation.
- </comment>
- </properties>
- </dependency>
- </dependencies>
-
- <build>
- <nagEmailAddress>dev@commons.apache.org</nagEmailAddress>
- <sourceDirectory>src/java</sourceDirectory>
- <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
- <unitTest>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- <resources>
- <resource>
- <directory>${pom.build.unitTestSourceDirectory}</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </resource>
- </resources>
- </unitTest>
-
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>NOTICE.txt</include>
- </includes>
- </resource>
- </resources>
- </build>
-
- <reports>
- <report>maven-changes-plugin</report>
- <report>maven-changelog-plugin</report>
- <report>maven-checkstyle-plugin</report>
- <!--report>maven-clover-plugin</report-->
- <report>maven-developer-activity-plugin</report>
- <report>maven-faq-plugin</report>
- <report>maven-file-activity-plugin</report>
- <report>maven-javadoc-plugin</report>
- <report>maven-jdepend-plugin</report>
- <report>maven-junit-report-plugin</report>
- <report>maven-jxr-plugin</report>
- <report>maven-license-plugin</report>
- <!--report>maven-linkcheck-plugin</report-->
- <report>maven-pmd-plugin</report>
- <report>maven-simian-plugin</report>
- <report>maven-tasklist-plugin</report>
- </reports>
-
-</project>
-
------------------------------15671293698853
-Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$textToEncode"
-
-
------------------------------15671293698853
-Content-Disposition: form-data; name="ctl00$ctl00$ctl00$WholeBody$ContentPane$ContentArea$ctl01$ctl01$Body$butSubmit"
-
-Encode
------------------------------15671293698853--
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartEmpty.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartEmpty.txt deleted file mode 100644 index 97c29894..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartEmpty.txt +++ /dev/null @@ -1,17 +0,0 @@ -POST /http-security-layer-request HTTP/1.1
-User-Agent: Jakarta Commons-HttpClient/3.0
-Host: 127.0.0.1:13495
-Content-Length: 855
-Content-Type: multipart/form-data; boundary=uW10q_I9UeqKyw-1o5EW4jtEAaGs7-mC6o
-
---uW10q_I9UeqKyw-1o5EW4jtEAaGs7-mC6o
-Content-Disposition: form-data; name="XMLRequest"
-
-<?xml version="1.0" encoding="UTF-8"?><sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"><sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier><sl:DataObjectInfo Structure="detached"><sl:DataObject Reference="urn:Document"><sl:LocRefContent>formdata:fileupload</sl:LocRefContent></sl:DataObject><sl:TransformsInfo><sl:FinalDataMetaInfo><sl:MimeType>text/plain</sl:MimeType></sl:FinalDataMetaInfo></sl:TransformsInfo></sl:DataObjectInfo></sl:CreateXMLSignatureRequest>
---uW10q_I9UeqKyw-1o5EW4jtEAaGs7-mC6o
-Content-Disposition: form-data; name="fileupload"; filename="myfile.txt"
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: binary
-
-
---uW10q_I9UeqKyw-1o5EW4jtEAaGs7-mC6o--
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartFromTutorial.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartFromTutorial.txt deleted file mode 100644 index 7014b1cf..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/MultipartFromTutorial.txt +++ /dev/null @@ -1,37 +0,0 @@ -POST /http-security-layer-request HTTP/1.1
-Host: 127.0.0.1
-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
-Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
-Accept-Language: de-at,de;q=0.7,en;q=0.3
-Accept-Encoding: gzip,deflate
-Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
-Keep-Alive: 300
-Connection: keep-alive
-Content-Type: multipart/form-data; boundary=---------------------------2330864292941
-Content-Length: 1800
-
------------------------------2330864292941
-Content-Disposition: form-data; name="Vorname_"
-
-Thassilo
------------------------------2330864292941
-Content-Disposition: form-data; name="Nachname_"
-
-Tester
------------------------------2330864292941
-Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png"
-Content-Type: image/png
-
-‰PNG
- -
IHDR <Œ"¢ tRNS n¦‘ pHYs ÒÝ~ü tEXtComment ‰*? WIDATxœ”½NÂPÇ?qö|ŸÁ„÷18XB\HtpëÀ.nº
ƒpcÀ&°2ºº¢.LþšÓ\n/åzÁ›œ¶çãÿ竬¦õÅUŠ ˆ>ÔU6J0®Žd…¦RÖÖÑåsÓDT
”*[°jÜM?‚þ{”‚)?¯¶Sl»8X?ªàªÈh‚ÃZÏ&AÇc8röff#Ãì0Á¸Ð¼;ôQ@ÇÉËé#ÛAP0Ý}???û—v.LœkP÷ ÛV–†dvÖuV㬠€<?üƒ ÷-?€|
~€0¦ š‚ºšSèÄCwçq{øF½óó-M¦À~¢•?X G ….®SO»vJ?àí/P4@3ïí›?)6…SœÕôBÃÔìŒj'á,ðóc -{©À Oþ÷c®ÿä‚!ÿgÆäŠÙcÌÙ¯"¾Æç]u@{C¿Ií$õC¨ IEND®B`‚
------------------------------2330864292941
-Content-Disposition: form-data; name="XMLRequest"
-
-<?xml version="1.0" encoding="UTF-8"?><sl:CreateHashRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"> <sl:HashInfo RespondHashData="false"> <sl:HashData> <sl:MetaInfo> <sl:MimeType>application/octet-stream</sl:MimeType> </sl:MetaInfo> <sl:Content Reference="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/tutorial/examples/bindings/signattachments/Beilage.png"/> </sl:HashData> <sl:HashAlgorithm>http://www.w3.org/2000/09/xmldsig#sha1</sl:HashAlgorithm> <sl:FriendlyName>Beilage zum Formular 0815</sl:FriendlyName> </sl:HashInfo></sl:CreateHashRequest>
------------------------------2330864292941
-Content-Disposition: form-data; name="DataURL"
-
-http://localhost:18080/SL12Tutorial/SignAttachments;jsessionid=2BAF01A9069F6AF073A25B4D9B8E803E?use=sign
------------------------------2330864292941--
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt deleted file mode 100644 index fb8cc1c3..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NOPMultipartDataUrl.txt +++ /dev/null @@ -1,47 +0,0 @@ -POST /http-security-layer-request HTTP/1.1
-Host: 127.0.0.1
-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
-Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
-Accept-Language: de-at,de;q=0.7,en;q=0.3
-Accept-Encoding: gzip,deflate
-Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
-Keep-Alive: 300
-Connection: keep-alive
-Content-Type: multipart/form-data; boundary=---------------------------2330864292941
-Content-Length: 1800
-
------------------------------2330864292941
-Content-Disposition: form-data; name="Vorname_"
-Content-Type:text/xml;charset=UTF-8
-
-Thassilo
------------------------------2330864292941
-Content-Disposition: form-data; name="Nachname_"
-
-Tester
------------------------------2330864292941
-Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png"
-Content-Type: image/png
-
-�PNG
-
-
-IHDR <�"� tRNS n�� pHYs ��~� tEXtComment �*? WIDATx����N�P�?q�|�D�18XB\Htp��.n�
-�pc�&�2���.L���\n/�z[�����ç«ï¿½ï¿½ï¿½ï¿½U���>�U6J0��d��R����s�DT
-�*[�j�M?��{��)?��Sl�8X?���h��Z�&A�c8r�ff#��0xм;�Q@����#�AP0�}???�v.L�kP� �V��dv�uV� �<?� �-?�|
-~�0������S��Cw�q{�F����-M��~��?X G �.�SO�vJ?��/P4@3��?)6�S���B���j'�,��c
-{�� O��c���!�g���c�ٯ"���]u@{C�I�$�C� IEND�B`�
------------------------------2330864292941
-Content-Disposition: form-data; name="XMLRequest"
-
-<?xml version="1.0" encoding="UTF-8"?><sl:NullOperationRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"/>
------------------------------2330864292941
-Content-Disposition: form-data; name="WeitergabeHeader__";
-
-MyHeader:veryUgly
-
------------------------------2330864292941
-Content-Disposition: form-data; name="DataURL"
-
-http://localhost:8080/
------------------------------2330864292941--
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Nulloperation.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Nulloperation.xml deleted file mode 100644 index 29ab2d41..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Nulloperation.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><sl:NullOperationRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"/>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NulloperationRequest.txt.bin b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NulloperationRequest.txt.bin deleted file mode 100644 index 5ee5aee6..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/NulloperationRequest.txt.bin +++ /dev/null @@ -1 +0,0 @@ -XMLRequest=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3CNullOperationRequest+xmlns%3D%22http%3A%2F%2Fwww.buergerkarte.at%2Fnamespaces%2Fsecuritylayer%2F1.2%23%22%2F%3E&RedirectURL=https%3A%2F%2Fdemo.egiz.gv.at%2Fbku-erkennung%2Fv1.1%2Fbku-erkennung%2Fbku-erkennung_helper.html
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Statemachine1.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Statemachine1.txt deleted file mode 100644 index 92d75066..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Statemachine1.txt +++ /dev/null @@ -1,36 +0,0 @@ -
------------------------------2330864292941
-Content-Disposition: form-data; name="Vorname_"
-Content-Type:text/plain;charset=UTF-8
-
-Thassilo
------------------------------2330864292941
-Content-Disposition: form-data; name="Nachname_"
-
-Tester
------------------------------2330864292941
-Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png"
-Content-Type: image/png
-
-�PNG
-
-
-IHDR <�"� tRNS n�� pHYs ��~� tEXtComment �*? WIDATx����N�P�?q�|�D�18XB\Htp��.n�
-�pc�&�2���.L���\n/�z[�����ç«ï¿½ï¿½ï¿½ï¿½U���>�U6J0��d��R����s�DT
-�*[�j�M?��{��)?��Sl�8X?���h��Z�&A�c8r�ff#��0xм;�Q@����#�AP0�}???�v.L�kP� �V��dv�uV� �<?� �-?�|
-~�0������S��Cw�q{�F����-M��~��?X G �.�SO�vJ?��/P4@3��?)6�S���B���j'�,��c
-{�� O��c���!�g���c�ٯ"���]u@{C�I�$�C� IEND�B`�
------------------------------2330864292941
-Content-Disposition: form-data; name="XMLRequest"
-Content-Type:text/xml;charset=UTF-8
-
-<?xml version="1.0" encoding="UTF-8"?><sl:NullOperationRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"/>
------------------------------2330864292941
-Content-Disposition: form-data; name="WeitergabeHeader__";
-
-MyHeader:veryUgly
------------------------------2330864292941
-Content-Disposition: form-data; name="DataURL"
-
-http://localhost:8080/
------------------------------2330864292941--
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Stylesheet.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Stylesheet.txt deleted file mode 100644 index 71dbd103..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/Stylesheet.txt +++ /dev/null @@ -1,56 +0,0 @@ -
------------------------------2330864292941
-Content-Disposition: form-data; name="Vorname_"
-Content-Type:text/plain;charset=UTF-8
-
-Thassilo
------------------------------2330864292941
-Content-Disposition: form-data; name="Nachname_"
-
-Tester
------------------------------2330864292941
-Content-Disposition: form-data; name="StylesheetURL"
-
-formdata:Stylesheet
------------------------------2330864292941
-Content-Disposition: form-data; name="Beilage_"; filename="Beilage.png"
-Content-Type: image/png
-
-�PNG
-
-
-IHDR <�"� tRNS n�� pHYs ��~� tEXtComment �*? WIDATx����N�P�?q�|�D�18XB\Htp��.n�
-�pc�&�2���.L���\n/�z[�����ç«ï¿½ï¿½ï¿½ï¿½U���>�U6J0��d��R����s�DT
-�*[�j�M?��{��)?��Sl�8X?���h��Z�&A�c8r�ff#��0xм;�Q@����#�AP0�}???�v.L�kP� �V��dv�uV� �<?� �-?�|
-~�0������S��Cw�q{�F����-M��~��?X G �.�SO�vJ?��/P4@3��?)6�S���B���j'�,��c
-{�� O��c���!�g���c�ٯ"���]u@{C�I�$�C� IEND�B`�
------------------------------2330864292941
-Content-Disposition: form-data; name="XMLRequest"
-Content-Type:text/xml;charset=UTF-8
-
-<?xml version="1.0" encoding="UTF-8"?><sl:NullOperationRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"/>
------------------------------2330864292941
-Content-Disposition: form-data; name="Stylesheet";
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output media-type="text/html" encoding="ISO8859-1"/>
- <xsl:template match="/">
- <html>
- <body>
- <xsl:choose>
- <xsl:when test="ok">
- <h1>Alles Roger</h1>
- </xsl:when>
- <xsl:otherwise>
- <h1>Uuups</h1>
- </xsl:otherwise>
- </xsl:choose>
- </body>
- </html>
- </xsl:template>
-</xsl:stylesheet>
------------------------------2330864292941
-Content-Disposition: form-data; name="DataURL"
-
-http://localhost:8080/
------------------------------2330864292941--
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/XWWWFormUrlEncoded1.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/XWWWFormUrlEncoded1.txt deleted file mode 100644 index 32804c17..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/XWWWFormUrlEncoded1.txt +++ /dev/null @@ -1 +0,0 @@ -XMLRequest=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Csl%3ACreateXMLSignatureRequest+%0D%0A++xmlns%3Asl%3D%22http%3A%2F%2Fwww.buergerkarte.at%2Fnamespaces%2Fsecuritylayer%2F1.2%23%22%3E%0D%0A%3Csl%3AKeyboxIdentifier%3ESecureSignatureKeypair%3C%2Fsl%3AKeyboxIdentifier%3E%0D%0A++%3Csl%3ADataObjectInfo+Structure%3D%22enveloping%22%3E%0D%0A++++%3Csl%3ADataObject%3E%0D%0A++++++%3Csl%3AXMLContent%3ELorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Pellentesque+sed+dui+sed+enim+lobortis+ullamcorper+eu+sit+amet+libero.+Cras+mi+dolor%2C+ultrices+quis+tincidunt+non%2C+imperdiet+in+orci.+Nulla+placerat+sodales+nibh+sit+amet+ornare.+Suspendisse+potenti.+Duis+ultricies+metus+tortor%2C+id+mattis+nulla.+Proin+cursus+commodo+aliquet.+In+posuere%2C+lorem+sit+amet+egestas+consequat%2C+diam+ligula+accumsan+dui%2C+non+placerat+diam+nisl+id+tortor.+Aliquam+blandit+viverra+tellus%2C+vel+facilisis+eros+fermentum+ultrices.+Nullam+sodales+mattis+vulputate.+Suspendisse+luctus+dapibus+odio%2C+tincidunt+tempus+dui+sollicitudin+sed.%0D%0A%0D%0AMauris+auctor%2C+est+non+mattis+consequat%2C+ante+sem+tristique+sem%2C+eget+porttitor+nisl+magna+consectetur+tortor.+Sed+semper+diam+nec+leo+fermentum+dictum.+Suspendisse+sed+ipsum+orci.+Phasellus+rhoncus+odio+sed+lorem+rhoncus+et+tincidunt+mi+semper.+Etiam+accumsan+aliquam+augue%2C+id+aliquet+dui+lacinia+non.+Suspendisse+non+purus+a+turpis+imperdiet+vestibulum+id+in+nisi.+Sed+quis+leo+nec+massa+rhoncus+pharetra+ac+non+ipsum.+Proin+tristique+est+eget+dolor+euismod+vitae+rhoncus+metus+molestie.+Duis+volutpat+leo+libero%2C+molestie+fermentum+turpis.+Praesent+interdum+tellus+mattis+lorem+mollis+sit+amet+elementum+risus+cursus.+Nam+erat+nulla%2C+mollis+sit+amet+rutrum+ut%2C+pharetra+gravida+ligula.+In+hac+habitasse+platea+dictumst.+Maecenas+non+massa+ac+ipsum+eleifend+tempor.+Ut+sed+diam+nisi%2C+in+volutpat+libero.+Duis+vehicula+purus+eu+risus+ultricies+rutrum.+Duis+risus+mi%2C+aliquam+nec+venenatis+vel%2C+scelerisque+eget+eros.+Pellentesque+mollis+aliquet+nibh%2C+et+hendrerit+tortor+lobortis+sed.%0D%0A%0D%0AAenean+odio+sem%2C+pretium+eget+sagittis+sed%2C+rhoncus+a+nisi.+Nulla+cursus+diam+sit+amet+massa+iaculis+ultricies.+Aenean+odio+lorem%2C+bibendum+vitae+consequat+vel%2C+luctus+id+diam.+Proin+congue%2C+dui+non+eleifend+interdum%2C+lorem+lorem+semper+ligula%2C+in+condimentum+orci+enim+eget+tellus.+Aliquam+erat+volutpat.+Quisque+porttitor+volutpat+elit%2C+quis+ultricies+elit+imperdiet+at.+Donec+dictum+ultricies+ligula.+Aliquam+in+condimentum+quam.+Ut+placerat+suscipit+dolor%2C+a+aliquet+arcu+suscipit+ut.+Suspendisse+et+arcu+id+quam+vehicula+ultrices.+Duis+erat+leo%2C+tempor+vel+aliquet+eu%2C+feugiat+eget+erat.+Nulla+facilisi.+Nulla+sed+lorem+sapien.+Aliquam+ullamcorper+dui+sed+nisl+sollicitudin+tempus.+Donec+ipsum+quam%2C+placerat+at+tincidunt+et%2C+condimentum+sit+amet+sapien.+In+luctus+ullamcorper+molestie.+Cras+non+augue+elit.+Ut+cursus+volutpat+augue%2C+sed+condimentum+est+mollis+vitae.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Donec+consectetur+lacus+quis+turpis+semper+elementum+vitae+eleifend+dui.%0D%0A%0D%0APraesent+sed+libero+metus.+Nulla+est+nulla%2C+condimentum+non+volutpat+nec%2C+elementum+at+nisi.+Vivamus+posuere+dignissim+ultricies.+Fusce+massa+velit%2C+dignissim+quis+vehicula+in%2C+consequat+at+purus.+Duis+accumsan+lacinia+mattis.+Aliquam+eget+felis+eget+odio+viverra+ornare+ut+non+orci.+Vivamus+porta%2C+magna+sit+amet+ornare+lacinia%2C+sem+erat+porta+lectus%2C+at+porttitor+nisl+nisl+tincidunt+nisi.+Pellentesque+ornare+massa+ac+urna+feugiat+dignissim.+Ut+at+metus+nunc%2C+sit+amet+vulputate+arcu.+In+hac+habitasse+platea+dictumst.+Suspendisse+eget+elit+nec+erat+iaculis+accumsan+ac+nec+velit.+Aliquam+erat+volutpat.+Proin+id+nibh+odio.+Cras+ullamcorper%2C+dolor+a+rutrum+pharetra%2C+turpis+ligula+adipiscing+nisl%2C+a+tristique+tortor+lorem+in+dolor.+Proin+ac+ligula+felis%2C+et+malesuada+orci.+Aliquam+erat+volutpat.+Phasellus+faucibus+ipsum+quis+libero+posuere+vitae+accumsan+enim+mollis.+Cras+metus+odio%2C+eleifend+sed+suscipit+at%2C+gravida+quis+diam.%0D%0A%0D%0AEtiam+lorem+turpis%2C+consequat+sit+amet+vestibulum+faucibus%2C+accumsan+in+libero.+Nam+ornare+laoreet+placerat.+Nam+pellentesque+lectus+at+urna+tincidunt+facilisis.+Suspendisse+a+libero+in+arcu+eleifend+semper+vitae+sed+tortor.+Curabitur+ac+magna+a+eros+blandit+eleifend+vel+in+tortor.+Morbi+pretium+ullamcorper+ligula+rutrum+porta.+Pellentesque+vitae+viverra+erat.+Quisque+neque+orci%2C+condimentum+id+tempus+in%2C+porttitor+nec+nibh.+Donec+a+odio+a+lectus+dapibus+fermentum+a+sit+amet+sem.+Cras+risus+dolor%2C+ultricies+eget+suscipit+nec%2C+tempus+eget+justo.+Aenean+suscipit+fermentum+nisl%2C+vel+sodales+elit+euismod+ac.+In+non+laoreet+mi.+Morbi+aliquet+quam+id+nunc+aliquet+facilisis.+Nulla+elementum+fringilla+eleifend.+Sed+tristique+nunc+eget+turpis+ullamcorper+varius.+Pellentesque+non+diam+nec+lorem+mollis+vulputate.+In+hac+habitasse+platea+dictumst.+Aenean+pellentesque+leo+ac+augue+molestie+non+varius+nibh+consectetur.+Donec+quis+dui+eget+tortor+pharetra+convallis+vel+quis+orci.+Nulla+at+odio+nisi%2C+sit+amet+luctus+diam.%0D%0A%0D%0ANam+nisl+nibh%2C+faucibus+eu+aliquet+non%2C+elementum+vitae+quam.+Etiam+massa+massa%2C+gravida+ut+pharetra+non%2C+mollis+in+augue.+Integer+urna+quam%2C+tincidunt+et+lacinia+et%2C+vehicula+sit+amet+justo.+Nulla+dui+dui%2C+semper+eget+adipiscing+rutrum%2C+dignissim+a+mi.+Cras+sit+amet+mauris+ac+neque+pretium+ultricies+sit+amet+non+elit.+Praesent+viverra+vehicula+orci+ut+congue.+Quisque+fermentum+neque+eu+turpis+scelerisque+sit+amet+luctus+erat+imperdiet.+Nulla+volutpat+quam+ut+ante+eleifend+in+tempus+diam+laoreet.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Proin+et+lacus+ligula%2C+eget+fermentum+urna.+Ut+quis+urna+ac+nibh+molestie+sollicitudin.+Morbi+interdum+arcu+mauris.%0D%0A%0D%0ASed+posuere%2C+eros+eu+tempus+tempus%2C+nulla+felis+ultrices+tortor%2C+vel+fermentum+nunc+lectus+a+nisi.+Duis+enim+nisl%2C+facilisis+sit+amet+ullamcorper+nec%2C+imperdiet+vulputate+massa.+Nam+semper+aliquet+nunc%2C+vitae+malesuada+turpis+congue+a.+Proin+dolor+eros%2C+sollicitudin+eget+gravida+id%2C+adipiscing+a+risus.+Praesent+sed+mauris+ut+diam+mollis+tempus.+Curabitur+pulvinar+tortor+non+sapien+interdum+in+aliquet+metus+dignissim.+Aliquam+ut+orci+id+nunc+elementum+dapibus+non+ac+odio.+Etiam+nibh+ligula%2C+varius+sed+congue+et%2C+euismod+ac+dui.+Suspendisse+sit+amet+malesuada+ligula.+Aliquam+tempus+nunc+et+massa+mattis+iaculis.%0D%0A%0D%0ADonec+sit+amet+tincidunt+elit.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Aenean+id+ante+ligula.+Fusce+at+libero+sed+nisl+luctus+sagittis.+Vivamus+sodales+nibh+eros%2C+at+pulvinar+neque.+Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Proin+augue+libero%2C+euismod+nec+semper+quis%2C+sollicitudin+ut+nulla.+Suspendisse+egestas+sapien+et+ante+interdum+ac+sollicitudin+arcu+malesuada.+Nulla+posuere+pretium+felis+id+ultricies.+Curabitur+nec+porttitor+lectus.%0D%0A%0D%0ANam+consectetur+tempor+sapien.+Nam+lobortis+porttitor+bibendum.+Maecenas+ac+enim+at+magna+tempor+imperdiet.+Donec+sed+ligula+ligula.+Morbi+et+orci+tortor.+Nulla+egestas+enim+vitae+libero+tincidunt+quis+rhoncus+quam+aliquam.+Etiam+non+justo+orci%2C+sit+amet+aliquam+eros.+Proin+vestibulum+leo+convallis+velit+tincidunt+nec+egestas+odio+lacinia.+Quisque+pellentesque+tempus+nisl%2C+ut+porta+tellus+aliquet+in.+Vestibulum+mollis+dapibus+velit+non+egestas.+Proin+vel+viverra+sapien.+Aliquam+erat+volutpat.+Curabitur+enim+eros%2C+aliquam+nec+dictum+eu%2C+fermentum+quis+nibh.+Donec+eget+enim+in+velit+viverra+scelerisque+sit+amet+in+lectus.+Etiam+sit+amet+orci+nisi.+Maecenas+ullamcorper%2C+nibh+quis+eleifend+euismod%2C+enim+turpis+pretium+nibh%2C+nec+venenatis+velit+risus+eu+tellus.%0D%0A%0D%0APraesent+elementum+mattis+placerat.+Curabitur+at+interdum+nibh.+Quisque+ullamcorper+eleifend+nunc+a+mollis.+Cras+ut+nulla+risus%2C+et+suscipit+risus.+Aenean+erat+diam%2C+facilisis+at+placerat+id%2C+placerat+sed+est.+Ut+nibh+libero%2C+varius+eget+suscipit+sed%2C+ultrices+eget+nisl.+Aenean+dignissim+enim+eget+dui+malesuada+et+consectetur+lorem+ullamcorper.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Donec+at+nisl+ut+eros+facilisis+congue+nec+at+dui.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Proin+in+sem+nulla.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Integer+facilisis%2C+odio+vel+euismod+pretium%2C+libero+lorem+elementum+lorem%2C+at+accumsan+nisl+est+sed+nibh.+Etiam+blandit+diam+sed+tortor+molestie+at+rutrum+neque+viverra.%0D%0A%0D%0AUt+ultricies+pharetra+velit%2C+a+viverra+metus+elementum+vel.+Pellentesque+vitae+interdum+lorem.+Nam+tincidunt+nibh+eu+neque+rutrum+vehicula.+Vestibulum+vitae+arcu+vel+ante+commodo+blandit.+Sed+placerat+lobortis+nisi%2C+et+hendrerit+justo+ultrices+aliquam.+Suspendisse+eget+risus+vel+sapien+hendrerit+dignissim.+Sed+interdum+pellentesque+varius.+Nam+scelerisque%2C+mauris+ut+cursus+hendrerit%2C+purus+felis+rutrum+ante%2C+in+convallis+velit+urna+ornare+nisi.+Vestibulum+et+sapien+quis+justo+pretium+interdum.+Praesent+volutpat%2C+nisi+at+hendrerit+aliquet%2C+elit+libero+tincidunt+purus%2C+egestas+viverra+risus+magna+quis+risus.%0D%0A%0D%0ADonec+id+justo+sem.+Aenean+facilisis+pulvinar+est+ut+auctor.+Morbi+tincidunt+mollis+adipiscing.+Sed+pulvinar+lorem+neque.+Duis+eros+felis%2C+ultricies+eget+ultrices+ut%2C+dignissim+vitae+arcu.+Proin+quis+quam+mi.+Nunc+sagittis+ultricies+nibh%2C+eu+porttitor+urna+eleifend+in.+Sed+eget+lorem+eros.+Duis+non+tincidunt+sapien.+Vivamus+blandit+facilisis+ante.+Quisque+lectus+neque%2C+varius+vel+fringilla+eget%2C+vulputate+non+libero.%0D%0A%0D%0AClass+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Aenean+varius+congue+ultrices.+Phasellus+suscipit+vulputate+tristique.+Donec+nec+libero+vel+diam+sagittis+dignissim.+Donec+sed+dui+at+augue+sollicitudin+tristique+sollicitudin+in+nulla.+Nullam+id+magna+enim.+Etiam+convallis+mollis+urna+a+malesuada.+Duis+ac+iaculis+tellus.+Donec+scelerisque+eleifend+elit+ut+ornare.+Cras+vitae+sem+augue%2C+quis+lacinia+elit.+Pellentesque+sit+amet+nunc+metus%2C+luctus+lobortis+erat.+Nulla+lacus+lorem%2C+pharetra+ac+consectetur+at%2C+mattis+id+arcu.%0D%0A%0D%0ANunc+mi+est%2C+pharetra+vel+mattis+sit+amet%2C+faucibus+ut+tortor.+Morbi+ut+ante+eget+purus+gravida+dictum+in+sit+amet+ligula.+Aliquam+malesuada+metus+quis+nunc+placerat+lobortis.+Nulla+venenatis+vehicula+lacus%2C+sed+vestibulum+nibh+egestas+ornare.+Sed+a+lorem+nulla.+Donec+malesuada+dolor+congue+est+condimentum+eu+tincidunt+orci+ullamcorper.+Nam+porttitor+fermentum+purus+nec+molestie.+Nunc+porttitor+tincidunt+lobortis.+Nullam+vulputate+imperdiet+neque%2C+et+consectetur+lectus+molestie+vitae.+Nulla+facilisi.%0D%0A%0D%0APhasellus+laoreet+auctor+elit%2C+ac+sagittis+mi+tincidunt+eu.+Nunc+cursus+ipsum+eget+nulla+molestie+sollicitudin.+Vivamus+sapien+orci%2C+cursus+ut+fringilla+sed%2C+suscipit+id+libero.+Proin+convallis+lectus+et+mauris+suscipit+aliquet+non+quis+urna.+Donec+sit+amet+consequat+metus.+Praesent+lacus+ligula%2C+interdum+quis+rutrum+ut%2C+sodales+in+neque.+Donec+sed+nisi+nibh%2C+aliquet+volutpat+est.+Curabitur+volutpat+nunc+ante.+Nullam+pharetra+enim+at+eros+pulvinar+in+tincidunt+augue+interdum.+Maecenas+mi+quam%2C+placerat+nec+mollis+nec%2C+iaculis+eu+lorem.+Suspendisse+potenti.+Aenean+eu+neque+sit+amet+sapien+pulvinar+pretium.+Etiam+augue+quam%2C+malesuada+non+pretium+at%2C+feugiat+sit+amet+tortor.%0D%0A%0D%0ADonec+a+dui+in+augue+lacinia+pellentesque.+Praesent+vitae+tortor+sit+amet+velit+posuere+accumsan.+Phasellus+et+augue+ac+mauris+porttitor+tempus.+Pellentesque+non+odio+quis+nulla+dictum+facilisis.+Donec+blandit+odio+quam.+Mauris+quam+nunc%2C+semper+semper+posuere+eu%2C+pharetra+sed+diam.+Donec+tincidunt+ultrices+cursus.+Sed+venenatis+rhoncus+nisl%2C+nec+tempus+augue+imperdiet+non.+Nulla+facilisi.+Sed+rutrum+accumsan+velit+sit+amet+placerat.+Sed+rhoncus+quam+nec+enim+feugiat+ultricies.+Sed+et+lorem+elit.+Integer+semper+aliquam+nibh%2C+non+lobortis+lorem+fringilla+a.+Suspendisse+potenti.+Suspendisse+suscipit+est+mattis+massa+imperdiet+lacinia.+Integer+interdum+nisl+a+neque+posuere+porta.+Ut+eget+velit+ut+leo+elementum+vulputate.+Maecenas+congue+dignissim+bibendum.%0D%0A%0D%0ACurabitur+sed+cursus+nunc.+Pellentesque+aliquet+odio+et+augue+cursus+lacinia.+Nullam+molestie%2C+lorem+nec+gravida+aliquet%2C+augue+diam+vestibulum+tellus%2C+vitae+gravida+eros+ante+consequat+metus.+Donec+tempor+rhoncus+interdum.+Proin+laoreet+pretium+placerat.+Mauris+id+eros+eget+nisl+cursus+consequat+et+id+mauris.+Cras+non+nulla+a+tellus+sodales+eleifend+nec+quis+augue.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Nunc+blandit+est+nec+dolor+facilisis+eget+placerat+libero+imperdiet.+Cras+ultricies+mollis+nulla%2C+ut+ullamcorper+neque+bibendum+a.+Fusce+ullamcorper+orci+vitae+metus+auctor+tempor.+In+sit+amet+tellus+sed+libero+sagittis+consequat.+Aenean+posuere+nisi+id+sapien+tristique+a+malesuada+lorem+fermentum.+Quisque+pretium+malesuada+fermentum.+Sed+ut+nunc+ac+risus+consectetur+consequat+a+quis+dolor.+Cras+sit+amet+leo+felis.%0D%0A%0D%0ASed+vitae+justo+dolor%2C+eu+adipiscing+nibh.+Aliquam+ut+ultrices+ligula.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Ut+sed+porttitor+felis.+Etiam+lectus+dolor%2C+egestas+id+scelerisque+vitae%2C+tristique+sed+justo.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Suspendisse+eu+quam+vel+lorem+sollicitudin+mattis.+Nulla+dictum+consequat+convallis.+Morbi+convallis+ligula+ac+sem+pellentesque+consequat.+Nam+et+est+nec+diam+eleifend+blandit+at+ac+metus.+Duis+rutrum+elementum+consequat.+Sed+semper+accumsan+pharetra.+Suspendisse+volutpat+nisi+hendrerit+justo+tincidunt+tempus.+Ut+venenatis+tincidunt+pretium.+Phasellus+porta+diam+in+purus+pulvinar+et+iaculis+massa+mollis.+Nulla+facilisi.+Vivamus+justo+felis%2C+euismod+vel+volutpat+vel%2C+euismod+at+orci.+Morbi+cursus%2C+massa+nec+ornare+consequat%2C+quam+leo+laoreet+lectus%2C+non+placerat+tortor+enim+eu+tellus.+Sed+ut+purus+nibh%2C+eget+dictum+purus.%0D%0A%0D%0ADonec+nisl+est%2C+pretium+sit+amet+faucibus+id%2C+vestibulum+et+nisl.+Morbi+egestas+pulvinar+sollicitudin.+Duis+tincidunt+enim+id+nulla+commodo+nec+lobortis+lacus+tristique.+Mauris+iaculis+mattis+turpis+non+molestie.+Quisque+non+ante+sed+orci+dictum+egestas.+In+ac+enim+at+dolor+posuere+laoreet.+Morbi+tortor+libero%2C+iaculis+nec+rhoncus+id%2C+laoreet+at+elit.+Cras+orci+dui%2C+interdum+at+lacinia+non%2C+venenatis+a+elit.+Etiam+suscipit+massa+in+ante+auctor+faucibus.+Praesent+non+quam+a+diam+viverra+gravida+sit+amet+eu+eros.+Quisque+sit+amet+suscipit+turpis.%0D%0A%0D%0APhasellus+non+tellus+purus%2C+sed+tempor+elit.+Cras+rutrum+condimentum+congue.+Sed+nec+felis+nibh.+Nam+condimentum+nisi+et+nulla+eleifend+in+imperdiet+velit+imperdiet.+Cras+ut+leo+sed+lectus+interdum+vehicula+quis+in+erat.+Nulla+et+semper+risus.+Cras+velit+sem%2C+sagittis+sit+amet+scelerisque+ut%2C+cursus+vitae+quam.+Maecenas+neque+dui%2C+dictum+non+porttitor+sed%2C+adipiscing+at+massa.+Phasellus+pulvinar+dui+ut+turpis+sagittis+et+imperdiet+nisl+porttitor.+Curabitur+porttitor+velit+in+justo+luctus+vel+placerat+est+tristique.+Maecenas+non+nisi+eget+est+feugiat+blandit.+Proin+eget+dui+lorem.+Aenean+id+sem+non+velit+commodo+sagittis+eget+in+quam.+Mauris+vitae+diam+quam%2C+et+mattis+turpis.+Integer+a+fringilla+erat.+Nunc+ligula+enim%2C+varius+eget+varius+non%2C+consectetur+sit+amet+nibh.+In+interdum+justo+sollicitudin+ipsum+pulvinar+ornare.+Aenean+et+gravida+nunc.+Fusce+in+ipsum+quis+lectus+commodo+laoreet+eu+eget+lorem.%0D%0A%0D%0APhasellus+dui+justo%2C+pulvinar+scelerisque+consectetur+nec%2C+mollis+vitae+metus.+Integer+id+tortor+nec+dui+rhoncus+vulputate+sed+id+tellus.+Nulla+sodales+suscipit+dolor%2C+vitae+pharetra+lacus+sagittis+ullamcorper.+Aenean+convallis+dapibus+sapien%2C+eget+interdum+tellus+accumsan+eget.+Nulla+at+purus+vel+nulla+auctor+fermentum+sed+aliquet+odio.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Pellentesque+laoreet%2C+nunc+vitae+venenatis+viverra%2C+velit+purus+aliquam+neque%2C+vitae+luctus+risus+magna+a+ante.+Proin+et+lectus+odio%2C+id+pulvinar+sapien.+Maecenas+vulputate+gravida+laoreet.+Sed+ut+nisl+vel+risus+malesuada+auctor.+Aenean+viverra+fermentum+sem+nec+sodales.+Etiam+eget+arcu+nibh.+Sed+eget+euismod+massa.+Sed+feugiat+nibh+aliquam+odio+lobortis+vehicula.+Duis+vulputate+mattis+enim+at+semper.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Aenean+laoreet+ultricies+neque.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B%0D%0A%0D%0ACras+condimentum+magna+nec+mauris+viverra+eu+vulputate+nunc+feugiat.+Proin+lobortis+ultrices+mauris.+Sed+euismod%2C+nunc+et+ullamcorper+tincidunt%2C+eros+lectus+egestas+lectus%2C+eget+aliquam+elit+augue+in+eros.+Aenean+in+lorem+sed+tellus+porta+convallis.+Phasellus+sem+nunc%2C+facilisis+vel+luctus+ut%2C+mattis+vel+risus.+Donec+quis+feugiat+nulla.+Donec+eleifend+tempor+sodales.+Sed+mattis+congue+orci+non+tincidunt.+Fusce+massa+nisi%2C+pretium+ac+consequat+non%2C+sagittis+et+justo.+Phasellus+est+velit%2C+placerat+quis+posuere+et%2C+pellentesque+at+est.+Etiam+quis+lacus+a+nibh+eleifend+adipiscing.+Sed+vel+leo+arcu.+Fusce+porta+fringilla+felis+in+blandit.%0D%0A%0D%0ADonec+pretium%2C+eros+eget+auctor+elementum%2C+neque+tortor+placerat+urna%2C+id+dapibus+magna+lacus+sed+elit.+Quisque+auctor+molestie+turpis+et+mollis.+Nam+ipsum+metus%2C+lacinia+et+blandit+a%2C+egestas+aliquam+quam.+Suspendisse+potenti.+Morbi+tempus+lorem+eget+nibh+ultricies+congue.+Maecenas+in+enim+sed+odio+cursus+tincidunt.+Aliquam+erat+volutpat.+Fusce+fermentum+consectetur+bibendum.+Aenean+adipiscing+augue+non+ante+mattis+egestas.+Maecenas+porttitor+egestas+convallis.+Pellentesque+rhoncus+tincidunt+volutpat.+Aliquam+sed+sem+ac+augue+placerat+placerat+nec+sed+neque.%0D%0A%0D%0AMorbi+congue+eleifend+metus+at+pellentesque.+Maecenas+odio+mauris%2C+suscipit+eu+placerat+rutrum%2C+venenatis+ac+libero.+Duis+eleifend%2C+risus+placerat+congue+vestibulum%2C+neque+sem+varius+diam%2C+ultricies+auctor+nisi+massa+et+tellus.+Morbi+neque+odio%2C+suscipit+eleifend+dapibus+eget%2C+sodales+ac+massa.+Nullam+laoreet%2C+libero+sit+amet+ultricies+gravida%2C+neque+sem+eleifend+metus%2C+nec+consectetur+eros+lacus+ac+mauris.+Quisque+sollicitudin+consectetur+ante+non+lacinia.+Sed+quis+dolor+dolor%2C+eu+euismod+turpis.+In+posuere+metus+et+ligula+imperdiet+vitae+placerat+eros+bibendum.+Nullam+tincidunt+tincidunt+nisl+ac+mollis.+Mauris+at+augue+justo.+Nam+ac+vestibulum+justo.+In+id+elit+tortor.+Nunc+feugiat+molestie+orci%2C+in+molestie+elit+bibendum+eu.+Proin+libero+ipsum%2C+consectetur+sit+amet+facilisis+euismod%2C+bibendum+vel+felis.+Aliquam+posuere+quam+non+sapien+placerat+porttitor.%0D%0A%0D%0ANunc+volutpat%2C+arcu+sed+fringilla+blandit%2C+odio+risus+gravida+odio%2C+sollicitudin+tincidunt+lacus+odio+a+lectus.+Morbi+lacus+quam%2C+hendrerit+nec+facilisis+non%2C+luctus+ac+velit.+Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Proin+vitae+quam+orci%2C+quis+pellentesque+nisl.+Nullam+congue+risus+non+nisl+pulvinar+iaculis.+Integer+id+nisl+lorem%2C+eget+egestas+lacus.+Sed+nec+felis+eget+nisl+sagittis+sagittis.+Nunc+eu+laoreet+velit.+Vestibulum+quis+turpis+mi%2C+eget+tempor+ipsum.+Mauris+aliquet+tristique+feugiat.+Nulla+condimentum+bibendum+augue%2C+et+hendrerit+quam+porta+eget.+Etiam+imperdiet+tellus+nisl%2C+non+laoreet+neque.+Integer+sit+amet+pulvinar+lectus.+Cras+aliquam+turpis+at+urna+aliquam+vitae+dignissim+enim+tempor.+In+hac+habitasse+platea+dictumst.+Nulla+facilisi.+Integer+id+metus+orci.+Fusce+posuere+fermentum+scelerisque.+Praesent+non+facilisis+arcu.+Mauris+cursus+sem+sed+est+consequat+et+iaculis+orci+tincidunt.%0D%0A%0D%0ACurabitur+vulputate+faucibus+elit%2C+vitae+euismod+enim+condimentum+quis.+Aenean+pretium+cursus+odio%2C+in+interdum+magna+elementum+eu.+Donec+mi+lacus%2C+pulvinar+at+euismod+id%2C+mattis+sed+mi.+Vivamus+vehicula+dolor+id+arcu+commodo+scelerisque.+Nunc+ante+enim%2C+elementum+eu+sodales+pharetra%2C+placerat+id+orci.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Nam+porttitor+ornare+sapien%2C+sit+amet+ultrices+lorem+viverra+ac.+Nunc+nec+consequat+arcu.+Pellentesque+quis+pharetra+purus.+Vestibulum+consequat+sapien+non+velit+euismod+ultrices.+Donec+ultrices+mattis+metus%2C+id+suscipit+ipsum+tempus+vitae.+Duis+sodales%2C+arcu+et+tempor+molestie%2C+nibh+enim+ornare+dolor%2C+eu+rutrum+sapien+mauris+porttitor+sem.+Cras+at+convallis+dui.+Integer+sed+magna+turpis.+Morbi+congue+dictum+mauris%2C+ut+pellentesque+lorem+rhoncus+sit+amet.+Praesent+venenatis+purus+a+augue+rutrum+scelerisque.+Nulla+vitae+enim+quis+massa+mattis+malesuada+vitae+sed+purus.+Integer+luctus+posuere+arcu%2C+eu+lacinia+nunc+porttitor+vitae.+Curabitur+ullamcorper+consectetur+velit%2C+ut+porttitor+nulla+consequat+at.+Proin+quis+sapien+quis+lorem+venenatis+venenatis+sed+a+ante.%0D%0A%0D%0ANam+elementum+mauris+in+felis+accumsan+dignissim.+Etiam+sit+amet+elit+velit%2C+id+pellentesque+lorem.+Suspendisse+potenti.+Nam+imperdiet+interdum+lacus+et+facilisis.+Mauris+a+erat+leo%2C+posuere+dignissim+ante.+Pellentesque+at+turpis+sit+amet+odio+venenatis+accumsan+ut+in+diam.+Duis+vel+dolor+condimentum+erat+cursus+ornare.+Praesent+tempor+erat+vel+sapien+tempus+tincidunt.+Curabitur+consequat+lectus+lacus.+Suspendisse+ac+lectus+mauris%2C+ut+pharetra+diam.+Nam+massa+eros%2C+tincidunt+sit+amet+rhoncus+quis%2C+tincidunt+id+ipsum.+Aenean+tempus+porta+nibh+volutpat+iaculis.+Nulla+eleifend+laoreet+laoreet.+Aliquam+erat+volutpat.+Praesent+dolor+purus%2C+congue+eu+condimentum+sollicitudin%2C+posuere+ac+purus.+Sed+dolor+augue%2C+pretium+vel+mattis+sit+amet%2C+volutpat+eget+elit.%0D%0A%0D%0AAenean+sed+turpis+ac+odio+varius+bibendum.+Suspendisse+nulla+metus%2C+accumsan+non+euismod+nec%2C+fermentum+id+turpis.+Integer+venenatis+ante+et+odio+viverra+eget+condimentum+ipsum+blandit.+Morbi+convallis+venenatis+massa+ut+varius.+Vivamus+non+massa+sed+augue+pulvinar+porta.+Phasellus+sem+orci%2C+ultricies+et+lobortis+ac%2C+iaculis+non+libero.+Donec+non+magna+sit+amet+dolor+eleifend+pharetra+eu+eu+risus.+Duis+in+nisi+nulla%2C+sed+egestas+diam.+Morbi+at+nisl+metus%2C+in+tincidunt+tellus.+Mauris+a+rutrum+justo.+Proin+ligula+quam%2C+hendrerit+eu+viverra+non%2C+blandit+at+massa.+Praesent+ornare+nisi+et+dolor+vulputate+vel+porttitor+quam+varius.%0D%0A%0D%0ASuspendisse+tempor+pretium+luctus.+Nunc+cursus+sapien+rutrum+dolor+dictum+a+tincidunt+leo+pretium.+Ut+porta%2C+magna+bibendum+cursus+mollis%2C+lorem+augue+rhoncus+metus%2C+in+convallis+diam+elit+rhoncus+ante.+Integer+ut+condimentum+turpis.+Nulla+quis+erat+lectus.+Phasellus+volutpat+pulvinar+convallis.+Donec+quis+ante+sem%2C+ac+elementum+urna.+Suspendisse+ullamcorper+commodo+tortor%2C+a+venenatis+nisl+ullamcorper+a.+Integer+euismod+lobortis+purus%2C+non+fringilla+nunc+aliquam+vitae.+Sed+sit+amet+dolor+dui.+Donec+ultricies+bibendum+condimentum.+Nunc+mi+elit%2C+viverra+vitae+volutpat+blandit%2C+laoreet+id+diam.%0D%0A%0D%0AAenean+at+venenatis+nisi.+Morbi+vulputate+elit+sit+amet+felis+placerat+nec+bibendum+erat+aliquam.+Nullam+dignissim+nulla+sit+amet+tortor+dictum+pulvinar+ut+at+massa.+Sed+a+feugiat+nisi.+Quisque+ultricies+egestas+dui%2C+imperdiet+accumsan+leo+rhoncus+eget.+Mauris+molestie+diam+eget+nulla+sollicitudin+ut+lobortis+purus+rhoncus.+Aenean+ut+ligula+et+lacus+iaculis+ullamcorper.+Mauris+non+felis+sed+massa+imperdiet+mollis.+Proin+tristique+lorem+id+sem+placerat+ac+egestas+ipsum+vestibulum.+Maecenas+enim+nisl%2C+sollicitudin+quis+consequat+eu%2C+mollis+quis+ipsum.+Proin+leo+mauris%2C+pulvinar+sit+amet+vestibulum+ac%2C+pulvinar+ac+quam.%0D%0A%0D%0AFusce+sem+odio%2C+pretium+non+bibendum+nec%2C+suscipit+nec+tortor.+Donec+elit+odio%2C+sollicitudin+vitae+pretium+in%2C+ultricies+sit+amet+turpis.+Curabitur+at+justo+nunc.+Sed+in+consectetur+magna.+Cras+imperdiet+felis+a+turpis+ultricies+blandit.+In+aliquam+dictum+ante+eget+vehicula.+Aliquam+erat+volutpat.+Nulla+interdum+purus+dolor.+Nullam+convallis+hendrerit+commodo.+Donec+consectetur+nulla+ac+ligula+suscipit+dignissim.+Pellentesque+eget+mauris+nec+orci+pharetra+tempus+at+eu+quam.+Phasellus+neque+massa%2C+convallis+sed+interdum+et%2C+iaculis+vel+tellus.%0D%0A%0D%0ADonec+tincidunt+nulla+sed+orci+tempor+eget+pretium+magna+ultrices.+Fusce+vestibulum+lacus+vel+ante+hendrerit+fringilla.+Donec+risus+felis%2C+varius+sit+amet+semper+a%2C+porttitor+at+metus.+Curabitur+dui+nulla%2C+convallis+in+posuere+eget%2C+iaculis+non+arcu.+In+facilisis+erat+vitae+ligula+rhoncus+eget+mollis+nibh+tempor.+Nunc+posuere+pretium+lacinia.+Sed+condimentum+bibendum+fringilla.+Donec+sit+amet+purus+id+odio+venenatis+pulvinar.+Nam+vitae+risus+sed+libero+luctus+blandit.+In+eget+massa+sit+amet+mi+tempor+semper+in+quis+nisi.+Fusce+nec+semper+ligula.+Aliquam+a+orci+id+lectus+adipiscing+bibendum+eget+non+nulla.+Morbi+vitae+ornare+lorem.+Nunc+faucibus%2C+enim+vel+vehicula+faucibus%2C+ligula+nibh+interdum+ipsum%2C+ut+eleifend+nisl+dolor+nec+nisi.%0D%0A%0D%0AIn+et+venenatis+ligula.+Quisque+pulvinar%2C+tellus+sed+molestie+vulputate%2C+lacus+odio+ultrices+lorem%2C+a+ornare+tortor+sapien+ac+sem.+Vestibulum+nibh+enim%2C+auctor+at+condimentum+ut%2C+tincidunt+at+orci.+Phasellus+placerat+sem+id+purus+consequat+non+venenatis+dui+consequat.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Vivamus+aliquam+rutrum+diam+at+rutrum.+Vivamus+a+nunc+eros.+Donec+aliquam+turpis+facilisis+lorem+aliquam+sit+amet+euismod+augue+lacinia.+Duis+ligula+orci%2C+dictum+sed+venenatis+vitae%2C+elementum+scelerisque+neque.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Curabitur+imperdiet+tincidunt+auctor.+Integer+ut+tellus+sed+justo+blandit+congue+sit+amet+malesuada+diam.+Aenean+egestas+congue+augue+ac+mattis.+Nam+vestibulum+dapibus+mattis.+Morbi+elit+metus%2C+sagittis+quis+faucibus+sit+amet%2C+varius+in+elit.+Maecenas+eu+ante+et+arcu+sagittis+sodales+at+in+volutpat.%3C%2Fsl%3AXMLContent%3E%0D%0A++++%3C%2Fsl%3ADataObject%3E%0D%0A+++%3Csl%3ATransformsInfo%3E%0D%0A+++++%3Csl%3AFinalDataMetaInfo%3E%0D%0A++++++%3Csl%3AMimeType%3Etext%2Fplain%3C%2Fsl%3AMimeType%3E%0D%0A++++++%3C%2Fsl%3AFinalDataMetaInfo%3E%0D%0A+++%3C%2Fsl%3ATransformsInfo%3E%0D%0A+%3C%2Fsl%3ADataObjectInfo%3E%0D%0A%3C%2Fsl%3ACreateXMLSignatureRequest%3E
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/XWWWFormUrlEncoded2.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/XWWWFormUrlEncoded2.txt deleted file mode 100644 index de63c03c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/XWWWFormUrlEncoded2.txt +++ /dev/null @@ -1 +0,0 @@ -XMLRequest=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Csl%3ACreateXMLSignatureRequest+%0D%0A++xmlns%3Asl%3D%22http%3A%2F%2Fwww.buergerkarte.at%2Fnamespaces%2Fsecuritylayer%2F1.2%23%22%3E%0D%0A%3Csl%3AKeyboxIdentifier%3ESecureSignatureKeypair%3C%2Fsl%3AKeyboxIdentifier%3E%0D%0A++%3Csl%3ADataObjectInfo+Structure%3D%22enveloping%22%3E%0D%0A++++%3Csl%3ADataObject%3E%0D%0A++++++%3Csl%3AXMLContent%3ELorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Pellentesque+sed+dui+sed+enim+lobortis+ullamcorper+eu+sit+amet+libero.+Cras+mi+dolor%2C+ultrices+quis+tincidunt+non%2C+imperdiet+in+orci.+Nulla+placerat+sodales+nibh+sit+amet+ornare.+Suspendisse+potenti.+Duis+ultricies+metus+tortor%2C+id+mattis+nulla.+Proin+cursus+commodo+aliquet.+In+posuere%2C+lorem+sit+amet+egestas+consequat%2C+diam+ligula+accumsan+dui%2C+non+placerat+diam+nisl+id+tortor.+Aliquam+blandit+viverra+tellus%2C+vel+facilisis+eros+fermentum+ultrices.+Nullam+sodales+mattis+vulputate.+Suspendisse+luctus+dapibus+odio%2C+tincidunt+tempus+dui+sollicitudin+sed.%0D%0A%0D%0AMauris+auctor%2C+est+non+mattis+consequat%2C+ante+sem+tristique+sem%2C+eget+porttitor+nisl+magna+consectetur+tortor.+Sed+semper+diam+nec+leo+fermentum+dictum.+Suspendisse+sed+ipsum+orci.+Phasellus+rhoncus+odio+sed+lorem+rhoncus+et+tincidunt+mi+semper.+Etiam+accumsan+aliquam+augue%2C+id+aliquet+dui+lacinia+non.+Suspendisse+non+purus+a+turpis+imperdiet+vestibulum+id+in+nisi.+Sed+quis+leo+nec+massa+rhoncus+pharetra+ac+non+ipsum.+Proin+tristique+est+eget+dolor+euismod+vitae+rhoncus+metus+molestie.+Duis+volutpat+leo+libero%2C+molestie+fermentum+turpis.+Praesent+interdum+tellus+mattis+lorem+mollis+sit+amet+elementum+risus+cursus.+Nam+erat+nulla%2C+mollis+sit+amet+rutrum+ut%2C+pharetra+gravida+ligula.+In+hac+habitasse+platea+dictumst.+Maecenas+non+massa+ac+ipsum+eleifend+tempor.+Ut+sed+diam+nisi%2C+in+volutpat+libero.+Duis+vehicula+purus+eu+risus+ultricies+rutrum.+Duis+risus+mi%2C+aliquam+nec+venenatis+vel%2C+scelerisque+eget+eros.+Pellentesque+mollis+aliquet+nibh%2C+et+hendrerit+tortor+lobortis+sed.%0D%0A%0D%0AAenean+odio+sem%2C+pretium+eget+sagittis+sed%2C+rhoncus+a+nisi.+Nulla+cursus+diam+sit+amet+massa+iaculis+ultricies.+Aenean+odio+lorem%2C+bibendum+vitae+consequat+vel%2C+luctus+id+diam.+Proin+congue%2C+dui+non+eleifend+interdum%2C+lorem+lorem+semper+ligula%2C+in+condimentum+orci+enim+eget+tellus.+Aliquam+erat+volutpat.+Quisque+porttitor+volutpat+elit%2C+quis+ultricies+elit+imperdiet+at.+Donec+dictum+ultricies+ligula.+Aliquam+in+condimentum+quam.+Ut+placerat+suscipit+dolor%2C+a+aliquet+arcu+suscipit+ut.+Suspendisse+et+arcu+id+quam+vehicula+ultrices.+Duis+erat+leo%2C+tempor+vel+aliquet+eu%2C+feugiat+eget+erat.+Nulla+facilisi.+Nulla+sed+lorem+sapien.+Aliquam+ullamcorper+dui+sed+nisl+sollicitudin+tempus.+Donec+ipsum+quam%2C+placerat+at+tincidunt+et%2C+condimentum+sit+amet+sapien.+In+luctus+ullamcorper+molestie.+Cras+non+augue+elit.+Ut+cursus+volutpat+augue%2C+sed+condimentum+est+mollis+vitae.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Donec+consectetur+lacus+quis+turpis+semper+elementum+vitae+eleifend+dui.%0D%0A%0D%0APraesent+sed+libero+metus.+Nulla+est+nulla%2C+condimentum+non+volutpat+nec%2C+elementum+at+nisi.+Vivamus+posuere+dignissim+ultricies.+Fusce+massa+velit%2C+dignissim+quis+vehicula+in%2C+consequat+at+purus.+Duis+accumsan+lacinia+mattis.+Aliquam+eget+felis+eget+odio+viverra+ornare+ut+non+orci.+Vivamus+porta%2C+magna+sit+amet+ornare+lacinia%2C+sem+erat+porta+lectus%2C+at+porttitor+nisl+nisl+tincidunt+nisi.+Pellentesque+ornare+massa+ac+urna+feugiat+dignissim.+Ut+at+metus+nunc%2C+sit+amet+vulputate+arcu.+In+hac+habitasse+platea+dictumst.+Suspendisse+eget+elit+nec+erat+iaculis+accumsan+ac+nec+velit.+Aliquam+erat+volutpat.+Proin+id+nibh+odio.+Cras+ullamcorper%2C+dolor+a+rutrum+pharetra%2C+turpis+ligula+adipiscing+nisl%2C+a+tristique+tortor+lorem+in+dolor.+Proin+ac+ligula+felis%2C+et+malesuada+orci.+Aliquam+erat+volutpat.+Phasellus+faucibus+ipsum+quis+libero+posuere+vitae+accumsan+enim+mollis.+Cras+metus+odio%2C+eleifend+sed+suscipit+at%2C+gravida+quis+diam.%0D%0A%0D%0AEtiam+lorem+turpis%2C+consequat+sit+amet+vestibulum+faucibus%2C+accumsan+in+libero.+Nam+ornare+laoreet+placerat.+Nam+pellentesque+lectus+at+urna+tincidunt+facilisis.+Suspendisse+a+libero+in+arcu+eleifend+semper+vitae+sed+tortor.+Curabitur+ac+magna+a+eros+blandit+eleifend+vel+in+tortor.+Morbi+pretium+ullamcorper+ligula+rutrum+porta.+Pellentesque+vitae+viverra+erat.+Quisque+neque+orci%2C+condimentum+id+tempus+in%2C+porttitor+nec+nibh.+Donec+a+odio+a+lectus+dapibus+fermentum+a+sit+amet+sem.+Cras+risus+dolor%2C+ultricies+eget+suscipit+nec%2C+tempus+eget+justo.+Aenean+suscipit+fermentum+nisl%2C+vel+sodales+elit+euismod+ac.+In+non+laoreet+mi.+Morbi+aliquet+quam+id+nunc+aliquet+facilisis.+Nulla+elementum+fringilla+eleifend.+Sed+tristique+nunc+eget+turpis+ullamcorper+varius.+Pellentesque+non+diam+nec+lorem+mollis+vulputate.+In+hac+habitasse+platea+dictumst.+Aenean+pellentesque+leo+ac+augue+molestie+non+varius+nibh+consectetur.+Donec+quis+dui+eget+tortor+pharetra+convallis+vel+quis+orci.+Nulla+at+odio+nisi%2C+sit+amet+luctus+diam.%0D%0A%0D%0ANam+nisl+nibh%2C+faucibus+eu+aliquet+non%2C+elementum+vitae+quam.+Etiam+massa+massa%2C+gravida+ut+pharetra+non%2C+mollis+in+augue.+Integer+urna+quam%2C+tincidunt+et+lacinia+et%2C+vehicula+sit+amet+justo.+Nulla+dui+dui%2C+semper+eget+adipiscing+rutrum%2C+dignissim+a+mi.+Cras+sit+amet+mauris+ac+neque+pretium+ultricies+sit+amet+non+elit.+Praesent+viverra+vehicula+orci+ut+congue.+Quisque+fermentum+neque+eu+turpis+scelerisque+sit+amet+luctus+erat+imperdiet.+Nulla+volutpat+quam+ut+ante+eleifend+in+tempus+diam+laoreet.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Proin+et+lacus+ligula%2C+eget+fermentum+urna.+Ut+quis+urna+ac+nibh+molestie+sollicitudin.+Morbi+interdum+arcu+mauris.%0D%0A%0D%0ASed+posuere%2C+eros+eu+tempus+tempus%2C+nulla+felis+ultrices+tortor%2C+vel+fermentum+nunc+lectus+a+nisi.+Duis+enim+nisl%2C+facilisis+sit+amet+ullamcorper+nec%2C+imperdiet+vulputate+massa.+Nam+semper+aliquet+nunc%2C+vitae+malesuada+turpis+congue+a.+Proin+dolor+eros%2C+sollicitudin+eget+gravida+id%2C+adipiscing+a+risus.+Praesent+sed+mauris+ut+diam+mollis+tempus.+Curabitur+pulvinar+tortor+non+sapien+interdum+in+aliquet+metus+dignissim.+Aliquam+ut+orci+id+nunc+elementum+dapibus+non+ac+odio.+Etiam+nibh+ligula%2C+varius+sed+congue+et%2C+euismod+ac+dui.+Suspendisse+sit+amet+malesuada+ligula.+Aliquam+tempus+nunc+et+massa+mattis+iaculis.%0D%0A%0D%0ADonec+sit+amet+tincidunt+elit.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Aenean+id+ante+ligula.+Fusce+at+libero+sed+nisl+luctus+sagittis.+Vivamus+sodales+nibh+eros%2C+at+pulvinar+neque.+Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Proin+augue+libero%2C+euismod+nec+semper+quis%2C+sollicitudin+ut+nulla.+Suspendisse+egestas+sapien+et+ante+interdum+ac+sollicitudin+arcu+malesuada.+Nulla+posuere+pretium+felis+id+ultricies.+Curabitur+nec+porttitor+lectus.%0D%0A%0D%0ANam+consectetur+tempor+sapien.+Nam+lobortis+porttitor+bibendum.+Maecenas+ac+enim+at+magna+tempor+imperdiet.+Donec+sed+ligula+ligula.+Morbi+et+orci+tortor.+Nulla+egestas+enim+vitae+libero+tincidunt+quis+rhoncus+quam+aliquam.+Etiam+non+justo+orci%2C+sit+amet+aliquam+eros.+Proin+vestibulum+leo+convallis+velit+tincidunt+nec+egestas+odio+lacinia.+Quisque+pellentesque+tempus+nisl%2C+ut+porta+tellus+aliquet+in.+Vestibulum+mollis+dapibus+velit+non+egestas.+Proin+vel+viverra+sapien.+Aliquam+erat+volutpat.+Curabitur+enim+eros%2C+aliquam+nec+dictum+eu%2C+fermentum+quis+nibh.+Donec+eget+enim+in+velit+viverra+scelerisque+sit+amet+in+lectus.+Etiam+sit+amet+orci+nisi.+Maecenas+ullamcorper%2C+nibh+quis+eleifend+euismod%2C+enim+turpis+pretium+nibh%2C+nec+venenatis+velit+risus+eu+tellus.%0D%0A%0D%0APraesent+elementum+mattis+placerat.+Curabitur+at+interdum+nibh.+Quisque+ullamcorper+eleifend+nunc+a+mollis.+Cras+ut+nulla+risus%2C+et+suscipit+risus.+Aenean+erat+diam%2C+facilisis+at+placerat+id%2C+placerat+sed+est.+Ut+nibh+libero%2C+varius+eget+suscipit+sed%2C+ultrices+eget+nisl.+Aenean+dignissim+enim+eget+dui+malesuada+et+consectetur+lorem+ullamcorper.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Donec+at+nisl+ut+eros+facilisis+congue+nec+at+dui.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Proin+in+sem+nulla.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Integer+facilisis%2C+odio+vel+euismod+pretium%2C+libero+lorem+elementum+lorem%2C+at+accumsan+nisl+est+sed+nibh.+Etiam+blandit+diam+sed+tortor+molestie+at+rutrum+neque+viverra.%0D%0A%0D%0AUt+ultricies+pharetra+velit%2C+a+viverra+metus+elementum+vel.+Pellentesque+vitae+interdum+lorem.+Nam+tincidunt+nibh+eu+neque+rutrum+vehicula.+Vestibulum+vitae+arcu+vel+ante+commodo+blandit.+Sed+placerat+lobortis+nisi%2C+et+hendrerit+justo+ultrices+aliquam.+Suspendisse+eget+risus+vel+sapien+hendrerit+dignissim.+Sed+interdum+pellentesque+varius.+Nam+scelerisque%2C+mauris+ut+cursus+hendrerit%2C+purus+felis+rutrum+ante%2C+in+convallis+velit+urna+ornare+nisi.+Vestibulum+et+sapien+quis+justo+pretium+interdum.+Praesent+volutpat%2C+nisi+at+hendrerit+aliquet%2C+elit+libero+tincidunt+purus%2C+egestas+viverra+risus+magna+quis+risus.%0D%0A%0D%0ADonec+id+justo+sem.+Aenean+facilisis+pulvinar+est+ut+auctor.+Morbi+tincidunt+mollis+adipiscing.+Sed+pulvinar+lorem+neque.+Duis+eros+felis%2C+ultricies+eget+ultrices+ut%2C+dignissim+vitae+arcu.+Proin+quis+quam+mi.+Nunc+sagittis+ultricies+nibh%2C+eu+porttitor+urna+eleifend+in.+Sed+eget+lorem+eros.+Duis+non+tincidunt+sapien.+Vivamus+blandit+facilisis+ante.+Quisque+lectus+neque%2C+varius+vel+fringilla+eget%2C+vulputate+non+libero.%0D%0A%0D%0AClass+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Aenean+varius+congue+ultrices.+Phasellus+suscipit+vulputate+tristique.+Donec+nec+libero+vel+diam+sagittis+dignissim.+Donec+sed+dui+at+augue+sollicitudin+tristique+sollicitudin+in+nulla.+Nullam+id+magna+enim.+Etiam+convallis+mollis+urna+a+malesuada.+Duis+ac+iaculis+tellus.+Donec+scelerisque+eleifend+elit+ut+ornare.+Cras+vitae+sem+augue%2C+quis+lacinia+elit.+Pellentesque+sit+amet+nunc+metus%2C+luctus+lobortis+erat.+Nulla+lacus+lorem%2C+pharetra+ac+consectetur+at%2C+mattis+id+arcu.%0D%0A%0D%0ANunc+mi+est%2C+pharetra+vel+mattis+sit+amet%2C+faucibus+ut+tortor.+Morbi+ut+ante+eget+purus+gravida+dictum+in+sit+amet+ligula.+Aliquam+malesuada+metus+quis+nunc+placerat+lobortis.+Nulla+venenatis+vehicula+lacus%2C+sed+vestibulum+nibh+egestas+ornare.+Sed+a+lorem+nulla.+Donec+malesuada+dolor+congue+est+condimentum+eu+tincidunt+orci+ullamcorper.+Nam+porttitor+fermentum+purus+nec+molestie.+Nunc+porttitor+tincidunt+lobortis.+Nullam+vulputate+imperdiet+neque%2C+et+consectetur+lectus+molestie+vitae.+Nulla+facilisi.%0D%0A%0D%0APhasellus+laoreet+auctor+elit%2C+ac+sagittis+mi+tincidunt+eu.+Nunc+cursus+ipsum+eget+nulla+molestie+sollicitudin.+Vivamus+sapien+orci%2C+cursus+ut+fringilla+sed%2C+suscipit+id+libero.+Proin+convallis+lectus+et+mauris+suscipit+aliquet+non+quis+urna.+Donec+sit+amet+consequat+metus.+Praesent+lacus+ligula%2C+interdum+quis+rutrum+ut%2C+sodales+in+neque.+Donec+sed+nisi+nibh%2C+aliquet+volutpat+est.+Curabitur+volutpat+nunc+ante.+Nullam+pharetra+enim+at+eros+pulvinar+in+tincidunt+augue+interdum.+Maecenas+mi+quam%2C+placerat+nec+mollis+nec%2C+iaculis+eu+lorem.+Suspendisse+potenti.+Aenean+eu+neque+sit+amet+sapien+pulvinar+pretium.+Etiam+augue+quam%2C+malesuada+non+pretium+at%2C+feugiat+sit+amet+tortor.%0D%0A%0D%0ADonec+a+dui+in+augue+lacinia+pellentesque.+Praesent+vitae+tortor+sit+amet+velit+posuere+accumsan.+Phasellus+et+augue+ac+mauris+porttitor+tempus.+Pellentesque+non+odio+quis+nulla+dictum+facilisis.+Donec+blandit+odio+quam.+Mauris+quam+nunc%2C+semper+semper+posuere+eu%2C+pharetra+sed+diam.+Donec+tincidunt+ultrices+cursus.+Sed+venenatis+rhoncus+nisl%2C+nec+tempus+augue+imperdiet+non.+Nulla+facilisi.+Sed+rutrum+accumsan+velit+sit+amet+placerat.+Sed+rhoncus+quam+nec+enim+feugiat+ultricies.+Sed+et+lorem+elit.+Integer+semper+aliquam+nibh%2C+non+lobortis+lorem+fringilla+a.+Suspendisse+potenti.+Suspendisse+suscipit+est+mattis+massa+imperdiet+lacinia.+Integer+interdum+nisl+a+neque+posuere+porta.+Ut+eget+velit+ut+leo+elementum+vulputate.+Maecenas+congue+dignissim+bibendum.%0D%0A%0D%0ACurabitur+sed+cursus+nunc.+Pellentesque+aliquet+odio+et+augue+cursus+lacinia.+Nullam+molestie%2C+lorem+nec+gravida+aliquet%2C+augue+diam+vestibulum+tellus%2C+vitae+gravida+eros+ante+consequat+metus.+Donec+tempor+rhoncus+interdum.+Proin+laoreet+pretium+placerat.+Mauris+id+eros+eget+nisl+cursus+consequat+et+id+mauris.+Cras+non+nulla+a+tellus+sodales+eleifend+nec+quis+augue.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+himenaeos.+Nunc+blandit+est+nec+dolor+facilisis+eget+placerat+libero+imperdiet.+Cras+ultricies+mollis+nulla%2C+ut+ullamcorper+neque+bibendum+a.+Fusce+ullamcorper+orci+vitae+metus+auctor+tempor.+In+sit+amet+tellus+sed+libero+sagittis+consequat.+Aenean+posuere+nisi+id+sapien+tristique+a+malesuada+lorem+fermentum.+Quisque+pretium+malesuada+fermentum.+Sed+ut+nunc+ac+risus+consectetur+consequat+a+quis+dolor.+Cras+sit+amet+leo+felis.%0D%0A%0D%0ASed+vitae+justo+dolor%2C+eu+adipiscing+nibh.+Aliquam+ut+ultrices+ligula.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Ut+sed+porttitor+felis.+Etiam+lectus+dolor%2C+egestas+id+scelerisque+vitae%2C+tristique+sed+justo.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Suspendisse+eu+quam+vel+lorem+sollicitudin+mattis.+Nulla+dictum+consequat+convallis.+Morbi+convallis+ligula+ac+sem+pellentesque+consequat.+Nam+et+est+nec+diam+eleifend+blandit+at+ac+metus.+Duis+rutrum+elementum+consequat.+Sed+semper+accumsan+pharetra.+Suspendisse+volutpat+nisi+hendrerit+justo+tincidunt+tempus.+Ut+venenatis+tincidunt+pretium.+Phasellus+porta+diam+in+purus+pulvinar+et+iaculis+massa+mollis.+Nulla+facilisi.+Vivamus+justo+felis%2C+euismod+vel+volutpat+vel%2C+euismod+at+orci.+Morbi+cursus%2C+massa+nec+ornare+consequat%2C+quam+leo+laoreet+lectus%2C+non+placerat+tortor+enim+eu+tellus.+Sed+ut+purus+nibh%2C+eget+dictum+purus.%0D%0A%0D%0ADonec+nisl+est%2C+pretium+sit+amet+faucibus+id%2C+vestibulum+et+nisl.+Morbi+egestas+pulvinar+sollicitudin.+Duis+tincidunt+enim+id+nulla+commodo+nec+lobortis+lacus+tristique.+Mauris+iaculis+mattis+turpis+non+molestie.+Quisque+non+ante+sed+orci+dictum+egestas.+In+ac+enim+at+dolor+posuere+laoreet.+Morbi+tortor+libero%2C+iaculis+nec+rhoncus+id%2C+laoreet+at+elit.+Cras+orci+dui%2C+interdum+at+lacinia+non%2C+venenatis+a+elit.+Etiam+suscipit+massa+in+ante+auctor+faucibus.+Praesent+non+quam+a+diam+viverra+gravida+sit+amet+eu+eros.+Quisque+sit+amet+suscipit+turpis.%0D%0A%0D%0APhasellus+non+tellus+purus%2C+sed+tempor+elit.+Cras+rutrum+condimentum+congue.+Sed+nec+felis+nibh.+Nam+condimentum+nisi+et+nulla+eleifend+in+imperdiet+velit+imperdiet.+Cras+ut+leo+sed+lectus+interdum+vehicula+quis+in+erat.+Nulla+et+semper+risus.+Cras+velit+sem%2C+sagittis+sit+amet+scelerisque+ut%2C+cursus+vitae+quam.+Maecenas+neque+dui%2C+dictum+non+porttitor+sed%2C+adipiscing+at+massa.+Phasellus+pulvinar+dui+ut+turpis+sagittis+et+imperdiet+nisl+porttitor.+Curabitur+porttitor+velit+in+justo+luctus+vel+placerat+est+tristique.+Maecenas+non+nisi+eget+est+feugiat+blandit.+Proin+eget+dui+lorem.+Aenean+id+sem+non+velit+commodo+sagittis+eget+in+quam.+Mauris+vitae+diam+quam%2C+et+mattis+turpis.+Integer+a+fringilla+erat.+Nunc+ligula+enim%2C+varius+eget+varius+non%2C+consectetur+sit+amet+nibh.+In+interdum+justo+sollicitudin+ipsum+pulvinar+ornare.+Aenean+et+gravida+nunc.+Fusce+in+ipsum+quis+lectus+commodo+laoreet+eu+eget+lorem.%0D%0A%0D%0APhasellus+dui+justo%2C+pulvinar+scelerisque+consectetur+nec%2C+mollis+vitae+metus.+Integer+id+tortor+nec+dui+rhoncus+vulputate+sed+id+tellus.+Nulla+sodales+suscipit+dolor%2C+vitae+pharetra+lacus+sagittis+ullamcorper.+Aenean+convallis+dapibus+sapien%2C+eget+interdum+tellus+accumsan+eget.+Nulla+at+purus+vel+nulla+auctor+fermentum+sed+aliquet+odio.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Pellentesque+laoreet%2C+nunc+vitae+venenatis+viverra%2C+velit+purus+aliquam+neque%2C+vitae+luctus+risus+magna+a+ante.+Proin+et+lectus+odio%2C+id+pulvinar+sapien.+Maecenas+vulputate+gravida+laoreet.+Sed+ut+nisl+vel+risus+malesuada+auctor.+Aenean+viverra+fermentum+sem+nec+sodales.+Etiam+eget+arcu+nibh.+Sed+eget+euismod+massa.+Sed+feugiat+nibh+aliquam+odio+lobortis+vehicula.+Duis+vulputate+mattis+enim+at+semper.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Aenean+laoreet+ultricies+neque.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B%0D%0A%0D%0ACras+condimentum+magna+nec+mauris+viverra+eu+vulputate+nunc+feugiat.+Proin+lobortis+ultrices+mauris.+Sed+euismod%2C+nunc+et+ullamcorper+tincidunt%2C+eros+lectus+egestas+lectus%2C+eget+aliquam+elit+augue+in+eros.+Aenean+in+lorem+sed+tellus+porta+convallis.+Phasellus+sem+nunc%2C+facilisis+vel+luctus+ut%2C+mattis+vel+risus.+Donec+quis+feugiat+nulla.+Donec+eleifend+tempor+sodales.+Sed+mattis+congue+orci+non+tincidunt.+Fusce+massa+nisi%2C+pretium+ac+consequat+non%2C+sagittis+et+justo.+Phasellus+est+velit%2C+placerat+quis+posuere+et%2C+pellentesque+at+est.+Etiam+quis+lacus+a+nibh+eleifend+adipiscing.+Sed+vel+leo+arcu.+Fusce+porta+fringilla+felis+in+blandit.%0D%0A%0D%0ADonec+pretium%2C+eros+eget+auctor+elementum%2C+neque+tortor+placerat+urna%2C+id+dapibus+magna+lacus+sed+elit.+Quisque+auctor+molestie+turpis+et+mollis.+Nam+ipsum+metus%2C+lacinia+et+blandit+a%2C+egestas+aliquam+quam.+Suspendisse+potenti.+Morbi+tempus+lorem+eget+nibh+ultricies+congue.+Maecenas+in+enim+sed+odio+cursus+tincidunt.+Aliquam+erat+volutpat.+Fusce+fermentum+consectetur+bibendum.+Aenean+adipiscing+augue+non+ante+mattis+egestas.+Maecenas+porttitor+egestas+convallis.+Pellentesque+rhoncus+tincidunt+volutpat.+Aliquam+sed+sem+ac+augue+placerat+placerat+nec+sed+neque.%0D%0A%0D%0AMorbi+congue+eleifend+metus+at+pellentesque.+Maecenas+odio+mauris%2C+suscipit+eu+placerat+rutrum%2C+venenatis+ac+libero.+Duis+eleifend%2C+risus+placerat+congue+vestibulum%2C+neque+sem+varius+diam%2C+ultricies+auctor+nisi+massa+et+tellus.+Morbi+neque+odio%2C+suscipit+eleifend+dapibus+eget%2C+sodales+ac+massa.+Nullam+laoreet%2C+libero+sit+amet+ultricies+gravida%2C+neque+sem+eleifend+metus%2C+nec+consectetur+eros+lacus+ac+mauris.+Quisque+sollicitudin+consectetur+ante+non+lacinia.+Sed+quis+dolor+dolor%2C+eu+euismod+turpis.+In+posuere+metus+et+ligula+imperdiet+vitae+placerat+eros+bibendum.+Nullam+tincidunt+tincidunt+nisl+ac+mollis.+Mauris+at+augue+justo.+Nam+ac+vestibulum+justo.+In+id+elit+tortor.+Nunc+feugiat+molestie+orci%2C+in+molestie+elit+bibendum+eu.+Proin+libero+ipsum%2C+consectetur+sit+amet+facilisis+euismod%2C+bibendum+vel+felis.+Aliquam+posuere+quam+non+sapien+placerat+porttitor.%0D%0A%0D%0ANunc+volutpat%2C+arcu+sed+fringilla+blandit%2C+odio+risus+gravida+odio%2C+sollicitudin+tincidunt+lacus+odio+a+lectus.+Morbi+lacus+quam%2C+hendrerit+nec+facilisis+non%2C+luctus+ac+velit.+Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Proin+vitae+quam+orci%2C+quis+pellentesque+nisl.+Nullam+congue+risus+non+nisl+pulvinar+iaculis.+Integer+id+nisl+lorem%2C+eget+egestas+lacus.+Sed+nec+felis+eget+nisl+sagittis+sagittis.+Nunc+eu+laoreet+velit.+Vestibulum+quis+turpis+mi%2C+eget+tempor+ipsum.+Mauris+aliquet+tristique+feugiat.+Nulla+condimentum+bibendum+augue%2C+et+hendrerit+quam+porta+eget.+Etiam+imperdiet+tellus+nisl%2C+non+laoreet+neque.+Integer+sit+amet+pulvinar+lectus.+Cras+aliquam+turpis+at+urna+aliquam+vitae+dignissim+enim+tempor.+In+hac+habitasse+platea+dictumst.+Nulla+facilisi.+Integer+id+metus+orci.+Fusce+posuere+fermentum+scelerisque.+Praesent+non+facilisis+arcu.+Mauris+cursus+sem+sed+est+consequat+et+iaculis+orci+tincidunt.%0D%0A%0D%0ACurabitur+vulputate+faucibus+elit%2C+vitae+euismod+enim+condimentum+quis.+Aenean+pretium+cursus+odio%2C+in+interdum+magna+elementum+eu.+Donec+mi+lacus%2C+pulvinar+at+euismod+id%2C+mattis+sed+mi.+Vivamus+vehicula+dolor+id+arcu+commodo+scelerisque.+Nunc+ante+enim%2C+elementum+eu+sodales+pharetra%2C+placerat+id+orci.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Nam+porttitor+ornare+sapien%2C+sit+amet+ultrices+lorem+viverra+ac.+Nunc+nec+consequat+arcu.+Pellentesque+quis+pharetra+purus.+Vestibulum+consequat+sapien+non+velit+euismod+ultrices.+Donec+ultrices+mattis+metus%2C+id+suscipit+ipsum+tempus+vitae.+Duis+sodales%2C+arcu+et+tempor+molestie%2C+nibh+enim+ornare+dolor%2C+eu+rutrum+sapien+mauris+porttitor+sem.+Cras+at+convallis+dui.+Integer+sed+magna+turpis.+Morbi+congue+dictum+mauris%2C+ut+pellentesque+lorem+rhoncus+sit+amet.+Praesent+venenatis+purus+a+augue+rutrum+scelerisque.+Nulla+vitae+enim+quis+massa+mattis+malesuada+vitae+sed+purus.+Integer+luctus+posuere+arcu%2C+eu+lacinia+nunc+porttitor+vitae.+Curabitur+ullamcorper+consectetur+velit%2C+ut+porttitor+nulla+consequat+at.+Proin+quis+sapien+quis+lorem+venenatis+venenatis+sed+a+ante.%0D%0A%0D%0ANam+elementum+mauris+in+felis+accumsan+dignissim.+Etiam+sit+amet+elit+velit%2C+id+pellentesque+lorem.+Suspendisse+potenti.+Nam+imperdiet+interdum+lacus+et+facilisis.+Mauris+a+erat+leo%2C+posuere+dignissim+ante.+Pellentesque+at+turpis+sit+amet+odio+venenatis+accumsan+ut+in+diam.+Duis+vel+dolor+condimentum+erat+cursus+ornare.+Praesent+tempor+erat+vel+sapien+tempus+tincidunt.+Curabitur+consequat+lectus+lacus.+Suspendisse+ac+lectus+mauris%2C+ut+pharetra+diam.+Nam+massa+eros%2C+tincidunt+sit+amet+rhoncus+quis%2C+tincidunt+id+ipsum.+Aenean+tempus+porta+nibh+volutpat+iaculis.+Nulla+eleifend+laoreet+laoreet.+Aliquam+erat+volutpat.+Praesent+dolor+purus%2C+congue+eu+condimentum+sollicitudin%2C+posuere+ac+purus.+Sed+dolor+augue%2C+pretium+vel+mattis+sit+amet%2C+volutpat+eget+elit.%0D%0A%0D%0AAenean+sed+turpis+ac+odio+varius+bibendum.+Suspendisse+nulla+metus%2C+accumsan+non+euismod+nec%2C+fermentum+id+turpis.+Integer+venenatis+ante+et+odio+viverra+eget+condimentum+ipsum+blandit.+Morbi+convallis+venenatis+massa+ut+varius.+Vivamus+non+massa+sed+augue+pulvinar+porta.+Phasellus+sem+orci%2C+ultricies+et+lobortis+ac%2C+iaculis+non+libero.+Donec+non+magna+sit+amet+dolor+eleifend+pharetra+eu+eu+risus.+Duis+in+nisi+nulla%2C+sed+egestas+diam.+Morbi+at+nisl+metus%2C+in+tincidunt+tellus.+Mauris+a+rutrum+justo.+Proin+ligula+quam%2C+hendrerit+eu+viverra+non%2C+blandit+at+massa.+Praesent+ornare+nisi+et+dolor+vulputate+vel+porttitor+quam+varius.%0D%0A%0D%0ASuspendisse+tempor+pretium+luctus.+Nunc+cursus+sapien+rutrum+dolor+dictum+a+tincidunt+leo+pretium.+Ut+porta%2C+magna+bibendum+cursus+mollis%2C+lorem+augue+rhoncus+metus%2C+in+convallis+diam+elit+rhoncus+ante.+Integer+ut+condimentum+turpis.+Nulla+quis+erat+lectus.+Phasellus+volutpat+pulvinar+convallis.+Donec+quis+ante+sem%2C+ac+elementum+urna.+Suspendisse+ullamcorper+commodo+tortor%2C+a+venenatis+nisl+ullamcorper+a.+Integer+euismod+lobortis+purus%2C+non+fringilla+nunc+aliquam+vitae.+Sed+sit+amet+dolor+dui.+Donec+ultricies+bibendum+condimentum.+Nunc+mi+elit%2C+viverra+vitae+volutpat+blandit%2C+laoreet+id+diam.%0D%0A%0D%0AAenean+at+venenatis+nisi.+Morbi+vulputate+elit+sit+amet+felis+placerat+nec+bibendum+erat+aliquam.+Nullam+dignissim+nulla+sit+amet+tortor+dictum+pulvinar+ut+at+massa.+Sed+a+feugiat+nisi.+Quisque+ultricies+egestas+dui%2C+imperdiet+accumsan+leo+rhoncus+eget.+Mauris+molestie+diam+eget+nulla+sollicitudin+ut+lobortis+purus+rhoncus.+Aenean+ut+ligula+et+lacus+iaculis+ullamcorper.+Mauris+non+felis+sed+massa+imperdiet+mollis.+Proin+tristique+lorem+id+sem+placerat+ac+egestas+ipsum+vestibulum.+Maecenas+enim+nisl%2C+sollicitudin+quis+consequat+eu%2C+mollis+quis+ipsum.+Proin+leo+mauris%2C+pulvinar+sit+amet+vestibulum+ac%2C+pulvinar+ac+quam.%0D%0A%0D%0AFusce+sem+odio%2C+pretium+non+bibendum+nec%2C+suscipit+nec+tortor.+Donec+elit+odio%2C+sollicitudin+vitae+pretium+in%2C+ultricies+sit+amet+turpis.+Curabitur+at+justo+nunc.+Sed+in+consectetur+magna.+Cras+imperdiet+felis+a+turpis+ultricies+blandit.+In+aliquam+dictum+ante+eget+vehicula.+Aliquam+erat+volutpat.+Nulla+interdum+purus+dolor.+Nullam+convallis+hendrerit+commodo.+Donec+consectetur+nulla+ac+ligula+suscipit+dignissim.+Pellentesque+eget+mauris+nec+orci+pharetra+tempus+at+eu+quam.+Phasellus+neque+massa%2C+convallis+sed+interdum+et%2C+iaculis+vel+tellus.%0D%0A%0D%0ADonec+tincidunt+nulla+sed+orci+tempor+eget+pretium+magna+ultrices.+Fusce+vestibulum+lacus+vel+ante+hendrerit+fringilla.+Donec+risus+felis%2C+varius+sit+amet+semper+a%2C+porttitor+at+metus.+Curabitur+dui+nulla%2C+convallis+in+posuere+eget%2C+iaculis+non+arcu.+In+facilisis+erat+vitae+ligula+rhoncus+eget+mollis+nibh+tempor.+Nunc+posuere+pretium+lacinia.+Sed+condimentum+bibendum+fringilla.+Donec+sit+amet+purus+id+odio+venenatis+pulvinar.+Nam+vitae+risus+sed+libero+luctus+blandit.+In+eget+massa+sit+amet+mi+tempor+semper+in+quis+nisi.+Fusce+nec+semper+ligula.+Aliquam+a+orci+id+lectus+adipiscing+bibendum+eget+non+nulla.+Morbi+vitae+ornare+lorem.+Nunc+faucibus%2C+enim+vel+vehicula+faucibus%2C+ligula+nibh+interdum+ipsum%2C+ut+eleifend+nisl+dolor+nec+nisi.%0D%0A%0D%0AIn+et+venenatis+ligula.+Quisque+pulvinar%2C+tellus+sed+molestie+vulputate%2C+lacus+odio+ultrices+lorem%2C+a+ornare+tortor+sapien+ac+sem.+Vestibulum+nibh+enim%2C+auctor+at+condimentum+ut%2C+tincidunt+at+orci.+Phasellus+placerat+sem+id+purus+consequat+non+venenatis+dui+consequat.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Vivamus+aliquam+rutrum+diam+at+rutrum.+Vivamus+a+nunc+eros.+Donec+aliquam+turpis+facilisis+lorem+aliquam+sit+amet+euismod+augue+lacinia.+Duis+ligula+orci%2C+dictum+sed+venenatis+vitae%2C+elementum+scelerisque+neque.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Curabitur+imperdiet+tincidunt+auctor.+Integer+ut+tellus+sed+justo+blandit+congue+sit+amet+malesuada+diam.+Aenean+egestas+congue+augue+ac+mattis.+Nam+vestibulum+dapibus+mattis.+Morbi+elit+metus%2C+sagittis+quis+faucibus+sit+amet%2C+varius+in+elit.+Maecenas+eu+ante+et+arcu+sagittis+sodales+at+in+volutpat.%3C%2Fsl%3AXMLContent%3E%0D%0A++++%3C%2Fsl%3ADataObject%3E%0D%0A+++%3Csl%3ATransformsInfo%3E%0D%0A+++++%3Csl%3AFinalDataMetaInfo%3E%0D%0A++++++%3Csl%3AMimeType%3Etext%2Fplain%3C%2Fsl%3AMimeType%3E%0D%0A++++++%3C%2Fsl%3AFinalDataMetaInfo%3E%0D%0A+++%3C%2Fsl%3ATransformsInfo%3E%0D%0A+%3C%2Fsl%3ADataObjectInfo%3E%0D%0A%3C%2Fsl%3ACreateXMLSignatureRequest%3E&EmptyParam=&TransferParam__=%21%22%23%24%25%26%27%28%29*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%C2%A1%C2%A2%C2%A3%C2%A4%C2%A5%C2%A6%C2%A7%C2%A8%C2%A9%C2%AA%C2%AB%C2%AC+%C2%AE%C2%AF%C2%B0%C2%B1%C2%B2%C2%B3%C2%B4%C2%B5%C2%B6%C2%B7%C2%B8%C2%B9%C2%BA%C2%BB%C2%BC%C2%BD%C2%BE%C2%BF%C3%80%C3%81%C3%82%C3%83%C3%84%C3%85%C3%86%C3%87%C3%88%C3%89%C3%8A%C3%8B%C3%8C%C3%8D%C3%8E%C3%8F%C3%90%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%9B%C3%9C%C3%9D%C3%9E%C3%9F%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%A8%C3%A9%C3%AA%C3%AB%C3%AC%C3%AD%C3%AE%C3%AF%C3%B0%C3%B1%C3%B2%C3%B3%C3%B4%C3%B5%C3%B6%C3%B7%C3%B8%C3%B9%C3%BA%C3%BB%C3%BC%C3%BD%C3%BE%C3%BF%CE%8E%CE%8F%CE%90%CE%91%CE%92%CE%93%CE%94%CE%95%CE%96%CE%97%CE%98%CE%99%CE%9A%CE%9B%CE%9C%CE%9D%CE%9E%CE%9F%CE%A0%CE%A1%CE%A3%CE%A4%CE%A5%CE%A6%CE%A7%CE%A8%CE%A9%CE%AA%CE%AB%CE%AC%CE%AD%CE%AE%CE%AF%CE%B0%CE%B1%CE%B2%CE%B3%CE%B4%CE%B5%CE%B6%CE%B7%CE%B8%CE%B9%CE%BA%CE%BB%CE%BC%CE%BD%CE%BE%CE%BF%CF%80%CF%81%CF%82%CF%83%CF%84%CF%85%CF%86%CF%87%CF%88%CF%89%CF%8A%CF%8B%CF%8C%CF%8D%CF%8E%CF%90%CF%91%CF%92%CF%93%CF%94%CF%95%CF%96%CF%97%CF%98%CF%99%CF%9A%CF%9B%CF%9C%CF%9D%CF%9E%CF%9F%CF%A0%CF%A1%D0%80%D0%81%D0%82%D0%83%D0%84%D0%85%D0%86%D0%87%D0%88%D0%89%D0%8A%D0%8B%D0%8C%D0%8D%D0%8E%D0%8F%D0%90%D0%91%D0%92%D0%93%D0%94%D0%95%D0%96%D0%97%D0%98%D0%99%D0%9A%D0%9B%D0%9C%D0%9D%D0%9E%D0%9F%D0%A0%D0%A1%D0%A2%D0%A3%D0%A4%D0%A5%D0%A6%D0%A7%D0%A8%D0%A9%D0%AA%D0%AB%D0%AC%D0%AD%D0%AE%D0%AF%D0%B0%D0%B1%D0%B2%D0%B3%D0%B4%D0%B5%D0%B6%D0%B7%D0%B8%D0%B9%D0%BA%D0%BB%D0%BC%D0%BD%D0%BE%D0%BF%D1%80%D1%81%D1%82%D1%83%D1%84%D1%85%D1%86%D1%87%D1%88%D1%89%D1%8A%D1%8B%D1%8C%D1%8D%D1%8E%D1%8F%D1%90%D1%91%D1%92%D1%93%D1%94%D1%95%D1%96%D1%97%D1%98%D1%99%D1%9A%D1%9B%D1%9C%D1%9D%D1%9E%D1%9F%D2%90%D2%91%D2%92%D2%93%D2%94%D2%95%D2%96%D2%97%D2%98%D2%99%D2%9A%D2%9B%D2%B0%D2%B1%D2%B2%D2%B3%D3%80%D3%81%D3%82%D3%83%D3%84%D3%90%D3%91%D3%92%D3%93%D3%94%D3%95%D3%96%D3%97%D3%98%D3%99%D3%9A%D3%9B%D3%9C%D3%9D%D3%9E%D3%9F%D3%A0%D3%A1%D3%A2%D3%A3%D3%A4%D3%A5%D3%A6%D3%A7%D3%A8%D3%A9%D3%AA%D3%AB%D3%AC%D3%AD%D3%AE%D3%AF%D3%B0%D3%B1%D3%B2%D3%B3%D3%B4%D3%B5%D3%B6%D3%B7%D3%B8%D3%B9
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/stylesheet.xslt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/stylesheet.xslt deleted file mode 100644 index bc1abc19..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/binding/stylesheet.xslt +++ /dev/null @@ -1,16 +0,0 @@ -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sl12="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
- <xsl:output media-type="text/html"/>
- <xsl:template match="/">
- <html>
- <body>
- <xsl:apply-templates/>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="ok">
- Alles Roger
- </xsl:template>
- <xsl:template match="/sl12:NullOperationResponse">
- NullKommaJosef
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-01a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-01a.cer Binary files differdeleted file mode 100644 index f9fef65f..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-01a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-02a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-02a.cer Binary files differdeleted file mode 100644 index 36a442b8..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-02a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-03a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-03a.cer Binary files differdeleted file mode 100644 index ab9e0cd7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-Qual-03a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-nQual-01a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-nQual-01a.cer Binary files differdeleted file mode 100644 index efa28178..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-nQual-01a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-nQual-03.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-nQual-03.cer Binary files differdeleted file mode 100644 index 33e77636..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/CACerts/A-Trust-nQual-03.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-01a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-01a.cer Binary files differdeleted file mode 100644 index f9fef65f..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-01a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-02a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-02a.cer Binary files differdeleted file mode 100644 index 36a442b8..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-02a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-03a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-03a.cer Binary files differdeleted file mode 100644 index ab9e0cd7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-Qual-03a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-nQual-01a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-nQual-01a.cer Binary files differdeleted file mode 100644 index efa28178..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-nQual-01a.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-nQual-03.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-nQual-03.cer Binary files differdeleted file mode 100644 index 33e77636..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/A-Trust-nQual-03.cer +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-SSL-03.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-SSL-03.cer deleted file mode 100644 index ee859434..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-SSL-03.cer +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE-----
-MIIEdzCCA1+gAwIBAgIDAmU4MA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5R
-dWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAzMB4XDTA2MDgxNjIyMDAw
-MFoXDTE2MDgxNjIyMDAwMFowgYcxCzAJBgNVBAYTAkFUMUgwRgYDVQQKDD9BLVRy
-dXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0ZW52
-ZXJrZWhyIEdtYkgxFjAUBgNVBAsMDWEtc2lnbi1TU0wtMDMxFjAUBgNVBAMMDWEt
-c2lnbi1TU0wtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDMjPM6
-PqgdPBPV4Efudpytt2Y4GZJfjeRdZo5SCuULDvvL+23xxBWnR3scFvfE1ekHN/YK
-k+2/qhU2B2ntoSNJSyDchNM8YPc9Lx67zZyhQTZgbBzh3IZAVb/hwuRRRV68JCBj
-r3r6v7IbwjH5XcVISdB4szx0z93aAQyKW9QkV+tD5a1vWFETvdHsZeVmDzfqcdsG
-AznPJw+9HrImCsswCWYUgPcFRkPNjj2r2NoyckVN781aWmNTAqJPf/Ckj9l9pUIt
-Vjhy8XNJW4iVDBkkykBXcGSkIau0ypJrRjsD1jKqUTIRZ/y2HlyltmwWi8OuyBLd
-LaHDbjc0b6JmqoivAgMBAAGjgeMwgeAwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4E
-CgQIQD6h02K0A90wEwYDVR0jBAwwCoAIRGqVZ1V5EU8wDgYDVR0PAQH/BAQDAgEG
-MIGUBgNVHR8EgYwwgYkwgYaggYOggYCGfmxkYXA6Ly9sZGFwLmEtdHJ1c3QuYXQv
-b3U9QS1UcnVzdC1uUXVhbC0wMyxvPUEtVHJ1c3QsYz1BVD9jZXJ0aWZpY2F0ZXJl
-dm9jYXRpb25saXN0P2Jhc2U/b2JqZWN0Y2xhc3M9ZWlkQ2VydGlmaWNhdGlvbkF1
-dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAQEAHKlnV3R9sbXojtONugyazkZCEzmC
-nZF1Dz4cOL0vPzzvS8MVWtG43zAgVI1NT/0ETSWsXD3YfzRi+f+/CxrGn0gwZX2t
-VGx+Z9w5ufiy1vuhxDUPmpos1TbJ4Wv3Une0E7iuHmNLg5qVlKeHWpcU8t1Y0nCt
-eRz34Qm87AVAykta33XST1fYvGoPKsDtn3qx9ye/pcbDvWjPwmqF2UUoql+d5hmJ
-Umgzwezqk4I+FS98BrnaPgC5UVFHg+yUjiUDLjYy7UvDZ5Led6kkLXuzVhQolLvr
-KTrGp5k42PG2MMkw8f6GMF/6yePXgzFMCRN8ReR7J5Htv33SytLRmFRd8g==
------END CERTIFICATE-----
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-03.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-03.cer deleted file mode 100644 index 7e67be95..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-03.cer +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE-----
-MIIEgzCCA2ugAwIBAgIDAarsMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5R
-dWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAzMB4XDTA1MTExMzIzMDAw
-MFoXDTE1MTExMzIzMDAwMFowgZMxCzAJBgNVBAYTAkFUMUgwRgYDVQQKDD9BLVRy
-dXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0ZW52
-ZXJrZWhyIEdtYkgxHDAaBgNVBAsME2Etc2lnbi1jb3Jwb3JhdGUtMDMxHDAaBgNV
-BAMME2Etc2lnbi1jb3Jwb3JhdGUtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQCp44qY+AiVXlcnHoKvch9s3ujoWFNktvcteIPwK7s0mb/uxTUW9UIF
-Die9n3AbyTsJE6R3nZYSJVHHi+1DKD72/WEo/B5NOOtd6KUMfJgca1tDmcsIwhFn
-82qkZrbNQwdIIdLe6+nDmjd9UBIaKv7yy1kq20jh09HOK3/bWhafVQE7EAgDfNrn
-8f0JfnnF0EA/La5kkg878L22fh9lRzt8H21THqJPtK4/e9SttjrJnPhFk2/MjAGS
-uaDufG6BV5Hnn7klR5qm5q32ypleLA6Zi4m9jRCVtPd4jRPYM40XpRkrJuFw+lxp
-rejfEZt/SRh1eQXiXDUgtgX8OaIylH9pAgMBAAGjgeMwgeAwDwYDVR0TAQH/BAUw
-AwEB/zARBgNVHQ4ECgQIQj75YZ1a5XIwEwYDVR0jBAwwCoAIRGqVZ1V5EU8wDgYD
-VR0PAQH/BAQDAgEGMIGUBgNVHR8EgYwwgYkwgYaggYOggYCGfmxkYXA6Ly9sZGFw
-LmEtdHJ1c3QuYXQvb3U9QS1UcnVzdC1uUXVhbC0wMyxvPUEtVHJ1c3QsYz1BVD9j
-ZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0P2Jhc2U/b2JqZWN0Y2xhc3M9ZWlkQ2Vy
-dGlmaWNhdGlvbkF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAQEARu7e1SyBRjlA
-g/thtFwtKQRvopTZKWj2LWpEdvPvwThOvf8Depnas+ly5af8r8YzsqJzfX3XWvhN
-qOOI24g5FmXfCUTq/kbtaeTq/AqV94793IJfcilPnpMOEHMqXNDiRUoAgR/9EVj8
-mDVvL2lLlJzeAltqOD5Bi9QwguaD2/3/E5ymFnqkf1dnlXbo8AhcwPEzReNKn1eM
-Ilg4FwP1bP0HUK3Fyz1UQ/Hncg+MS7c+SkjpNEd4sH7/GdxuQs5Sk7IRwot1+sbX
-3CkkPhSqiUzig9raxJYrtbb2kyiUO8+d5HzRyoP4BNzsdZdPc0gDYweXg5qarHOQ
-16IEOtBmKg==
------END CERTIFICATE-----
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-01a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-01a.cer deleted file mode 100644 index 0c68e593..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-01a.cer +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEJjCCAw6gAwIBAgIDAOJEMA0GCSqGSIb3DQEBBQUAMFUxCzAJBgNVBAYTAkFUMRAwDgYDVQQK -EwdBLVRydXN0MRkwFwYDVQQLExBBLVRydXN0LW5RdWFsLTAxMRkwFwYDVQQDExBBLVRydXN0LW5R -dWFsLTAxMB4XDTA0MTEzMDIzMDAwMFoXDTA4MTEzMDIzMDAwMFowgZ8xCzAJBgNVBAYTAkFUMUgw -RgYDVQQKEz9BLVRydXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0 -ZW52ZXJrZWhyIEdtYkgxIjAgBgNVBAsTGWEtc2lnbi1jb3Jwb3JhdGUtbGlnaHQtMDExIjAgBgNV -BAMTGWEtc2lnbi1jb3Jwb3JhdGUtbGlnaHQtMDEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK -AoIBAQDGC65v8rni63DojEBriynPwRqNCp14/SkN5ROkTUGNvLSabfSJV4PKGLTzasPAaChwX0g/ -kebahFM3R7nIyeVx2YB8VRvC4I/spP/mCs5+6pf1N+6Kiq4NcswgNBBfqAteaQIylBMy6HDkjoXY -X/c+SxjyrqAkeZCK+SHMOraXCO1PZHWbYwleKXf4R2Z6ayEfJ2XWeVuqqon76WHp/POI0RADBchA -6Vm1ROzSAHz39bay1TZunQXSs3VQ9cE3uQPjN+80efmf0ZgNF0sXsDTssoZg2feTANSOkTGM1bMC -5xe1hWFL8MZNe4yZ+NSgFN2fofb8BPvyQAW0no2PNA6PAgMBAAGjgbMwgbAwDwYDVR0TAQH/BAUw -AwEB/zARBgNVHQ4ECgQITp5/1C/JHx8wEwYDVR0jBAwwCoAITlnOxwIyhzAwDgYDVR0PAQH/BAQD -AgEGMGUGA1UdHwReMFwwWqBYoFaGVGxkYXA6Ly9sZGFwLmEtdHJ1c3QuYXQvb3U9QS1UcnVzdC1u -UXVhbC0wMSxvPUEtVHJ1c3QsYz1BVD9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0PzANBgkqhkiG -9w0BAQUFAAOCAQEAOtuz2GqnTibk/poCLrdYKpZSrLyfWFsJJpfBYA9HMasnfpJBCHgRHJud6DAO -xD900Vhmwy66D8dqsN3+fR8Bx8ZMKspnFN1B2Wz7LWOxMaKqP3JolJ/oVwzJRm0afcUMAfAumkc5 -Yqu0nC5qCF9zYY9YbJklh84uEzEg9j85kuRBHOCUc+5MVrnv7WPbirx6c95YFqXBQ0arA5QE9zYq -MDO8aUYPOWEHgtrVI+kMwELYHqLDX7i9VqsXhgFPeVz1wIV7s/i3budGeHMS6hjnyIc30FqM7CTY -fcvqVNZliErbjD1k1W1gMgvjLJowNvQC0W7K9/yoQhwTqtNMR4WZwA== ------END CERTIFICATE----- diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-02a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-02a.cer deleted file mode 100644 index c300891d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-02a.cer +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE-----
-MIIEizCCA3OgAwIBAgIDAOSoMA0GCSqGSIb3DQEBBQUAMIGLMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRgwFgYDVQQLDA9BLVRydXN0LVF1
-YWwtMDIxGDAWBgNVBAMMD0EtVHJ1c3QtUXVhbC0wMjAeFw0wNDEyMTQyMzAwMDBa
-Fw0xNDEyMTMyMzAwMDBaMIGfMQswCQYDVQQGEwJBVDFIMEYGA1UECgw/QS1UcnVz
-dCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBpbSBlbGVrdHIuIERhdGVudmVy
-a2VociBHbWJIMSIwIAYDVQQLDBlhLXNpZ24tY29ycG9yYXRlLWxpZ2h0LTAyMSIw
-IAYDVQQDDBlhLXNpZ24tY29ycG9yYXRlLWxpZ2h0LTAyMIIBIjANBgkqhkiG9w0B
-AQEFAAOCAQ8AMIIBCgKCAQEAk6V4oEauvXgEICqgjTbGHaiDhBVo2nosX23osoKM
-LTkkO/nOCgpdCYpLKgURxwrgHgVh9XT99yxhy6lDwt2rASajj0sQ1fY5BmWVyrXS
-dQ78ISMPb73XaG4M8H7PJFcsVEo9n8veVQwnMY5mSWy0r1IO8n93Bjbmmi4Zt8oS
-p9olWo5/8ByYW8S/AKZuQx+q+bFJv7geuApVjK2iVFe8yQqHhAgDsAsDlMvxDAQ/
-vhrGwHRv8N3sLsjirnbf5S2dGLDjASOMUFvwfLQd7gHH7PV37Xa+aQqa97eE6O4O
-sIhcGRYhoLk/tWTBDapcgHJ0yTtrftuwORVteLUAy0gBNwIDAQABo4HhMIHeMA8G
-A1UdEwEB/wQFMAMBAf8wEQYDVR0OBAoECEkcWDpP6A0DMBMGA1UdIwQMMAqACEI9
-KySmwUXOMA4GA1UdDwEB/wQEAwIBBjCBkgYDVR0fBIGKMIGHMIGEoIGBoH+GfWxk
-YXA6Ly9sZGFwLmEtdHJ1c3QuYXQvb3U9QS1UcnVzdC1RdWFsLTAyLG89QS1UcnVz
-dCxjPUFUP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3Q/YmFzZT9vYmplY3RjbGFz
-cz1laWRDZXJ0aWZpY2F0aW9uQXV0aG9yaXR5MA0GCSqGSIb3DQEBBQUAA4IBAQBH
-opWG7LKmPBvuGjZnRV4KGKzzUYVuxSRS1E0VIUPbVLf5xW2r5uUpR8ud5EpiPrcw
-k6K0dzu2Vb4ZbMIP+6J16S/0qvTp/3A/3q87+nJ+ot+IT8GZFJfSw18th2WmZdzR
-ShbM6sgViPtGsFROCdWeiHl248w2+zG+09sf8Bu3UyvwLRAiiKaxuwVdQ9kc0TL3
-gvv+K5eisWWthQOX2IF2jGSEqoAVwfHhl7bc9Vt7XnJSpQFebHnsIVuV4Mv6w4ww
-86hQPCLLvvV7wWDiBQ8l2FWneX0pNH3Wg+A1TRUoptc+pPDdpoP272MDm4fXyPKV
-7QgIaIK+gXNUj2GGt1K9
------END CERTIFICATE-----
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-03.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-03.cer deleted file mode 100644 index 2251ca22..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-light-03.cer +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE-----
-MIIEjzCCA3egAwIBAgIDAartMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5R
-dWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAzMB4XDTA1MTExMzIzMDAw
-MFoXDTE1MTExMzIzMDAwMFowgZ8xCzAJBgNVBAYTAkFUMUgwRgYDVQQKDD9BLVRy
-dXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0ZW52
-ZXJrZWhyIEdtYkgxIjAgBgNVBAsMGWEtc2lnbi1jb3Jwb3JhdGUtbGlnaHQtMDMx
-IjAgBgNVBAMMGWEtc2lnbi1jb3Jwb3JhdGUtbGlnaHQtMDMwggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQC359oitbHkkEgdErRPeBdkcYRK2DLdxfcnn+SI
-umSEYzWVscRTchPKSzb7f1a6EHPbB5WZsGJaUDX9KfTqsJNMo+7bASKk3gsLVxNZ
-qY2t2G+y8HvREYYejDOIzjAkcBQrt+nvuBUlGYVJQjEuyAn18f2vG0Y3VNvZFGKn
-PK8AVycUMk0Uw21RbK3vX5tbbPgQ/kcZkN4czi5VHepMvf6hAwwLoJj+KL9zxm8j
-yPK88qCBKAjMNCpZKsEhyanw1CjYbVmHs45Q5W6FBtqDcS6Iq4mC6TtUPGtCTuoH
-7/JLuhEp075ohp87v3fSlzeLJjBpkUDP9U8Tv7l2euD0t1UVAgMBAAGjgeMwgeAw
-DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIQZFpHL+t2JgwEwYDVR0jBAwwCoAI
-RGqVZ1V5EU8wDgYDVR0PAQH/BAQDAgEGMIGUBgNVHR8EgYwwgYkwgYaggYOggYCG
-fmxkYXA6Ly9sZGFwLmEtdHJ1c3QuYXQvb3U9QS1UcnVzdC1uUXVhbC0wMyxvPUEt
-VHJ1c3QsYz1BVD9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0P2Jhc2U/b2JqZWN0
-Y2xhc3M9ZWlkQ2VydGlmaWNhdGlvbkF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOC
-AQEADTRIaQtPwoPS6/TpyBhOw4wAHk/RM4gkLT76URPY2sUHihxqy+8qEElN+f5l
-I61myCP3IFTClflcHVR1QCoMg0ZI5/EcQTI8Dgd5iQkXuVjh3wCj87Ka2Tu7d1K+
-i9VJ4BR/ph/qmPKR7Lx/PtATw/vWo4k2rbt5o1QwixZ7CPt+BF9xCaAC4uL0bB0M
-9M3i9W2ePmqX6WIB3jMkT9FQC0KihPPfw/17KddNi4rFMMEiTyKvJTtTqDnIAwWW
-TqsL1G7oxMMtnnYaKWMQ6gQiOiRzCY7efcAi/3YwUX6ULW5zxqapNs1vqEbSGsQE
-l1eFl67HBZHYAPdoHGUnZF0KaQ==
------END CERTIFICATE-----
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-medium-01a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-medium-01a.cer deleted file mode 100644 index 2d7f1a03..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-medium-01a.cer +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEKDCCAxCgAwIBAgIDAOKKMA0GCSqGSIb3DQEBBQUAMFUxCzAJBgNVBAYTAkFUMRAwDgYDVQQK -EwdBLVRydXN0MRkwFwYDVQQLExBBLVRydXN0LW5RdWFsLTAxMRkwFwYDVQQDExBBLVRydXN0LW5R -dWFsLTAxMB4XDTA0MTIwNTIzMDAwMFoXDTA4MTEzMDIzMDAwMFowgaExCzAJBgNVBAYTAkFUMUgw -RgYDVQQKEz9BLVRydXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0 -ZW52ZXJrZWhyIEdtYkgxIzAhBgNVBAsTGmEtc2lnbi1jb3Jwb3JhdGUtbWVkaXVtLTAxMSMwIQYD -VQQDExphLXNpZ24tY29ycG9yYXRlLW1lZGl1bS0wMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBANEbZyIMIXZYBjTj/+3TrNGssRKNNdTedQlWB3vJQWLzeG89Kzmhy1WDX8IqDrMtvpXH -5w6urK3ZT7HGu2Jldrib8rkEOdE9+uNGRtkP8Kuz//CvdXCbIDvBLqgvWn9a3Sl/rUicPqKwcEcN -bP2Q0iU6NvvALmoqs93PymfTZlkGOwzUe+O88huXkauGWT/DkJd4JYDNJ0wlaGrJa+OorT4Izk1J -EipqqedUjsAj4Gq3SKrZKG/H/CkoH9uWTzrzFgg8zQhCES4AClo84XVk//EIv3ABDw4hr+lqV1nF -eXch9o4mLIe5u045471YLJLmyuCPDopb8U2VUoyldpMx+Y8CAwEAAaOBszCBsDAPBgNVHRMBAf8E -BTADAQH/MBEGA1UdDgQKBAhOuHKxmCmfZDATBgNVHSMEDDAKgAhOWc7HAjKHMDAOBgNVHQ8BAf8E -BAMCAQYwZQYDVR0fBF4wXDBaoFigVoZUbGRhcDovL2xkYXAuYS10cnVzdC5hdC9vdT1BLVRydXN0 -LW5RdWFsLTAxLG89QS1UcnVzdCxjPUFUP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3Q/MA0GCSqG -SIb3DQEBBQUAA4IBAQDaukYSeJVxWAh8QShqGqA6Plp9aXCTzwl9hE2gb+/xGPASo+NVQi/sUa0+ -bx29oSJaW6lKzdHQLAx4dwW9XTpJ+0mebB4fQfYHH0lGc1O4au/4O9k+C3SrD6x4WeY9k/SpUFu1 -qjzH+tjta81UWtU7Jve1BhckNwdOFx7cR8fdW+pUQSDV9XnPJfyb+gb9KWhvX+XAbgJoXW1HjJOO -P5sx6mFhMb3UqAfKQVoAuGbl4+uxIThBTqpICkaaD8WLdukqQjomUMDRbWIf6SblPuOEpPi1G/WM -qkTkpqX77Wkj08QY/yj5DDrsYJ5NymnWvu7jcoxCFCKvEQ8Q4g7AYKnG ------END CERTIFICATE----- diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-medium-02a.cer b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-medium-02a.cer deleted file mode 100644 index 194d4d7c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/certStore/a-sign-corporate-medium-02a.cer +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE-----
-MIIEjTCCA3WgAwIBAgIDAOSpMA0GCSqGSIb3DQEBBQUAMIGLMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRgwFgYDVQQLDA9BLVRydXN0LVF1
-YWwtMDIxGDAWBgNVBAMMD0EtVHJ1c3QtUXVhbC0wMjAeFw0wNDEyMTQyMzAwMDBa
-Fw0xNDEyMTMyMzAwMDBaMIGhMQswCQYDVQQGEwJBVDFIMEYGA1UECgw/QS1UcnVz
-dCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBpbSBlbGVrdHIuIERhdGVudmVy
-a2VociBHbWJIMSMwIQYDVQQLDBphLXNpZ24tY29ycG9yYXRlLW1lZGl1bS0wMjEj
-MCEGA1UEAwwaYS1zaWduLWNvcnBvcmF0ZS1tZWRpdW0tMDIwggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQCuaTBb6rHd5JZqAdvpmGIl5ne0Hg6GbpJvBeCI
-U6l9Rs8ebMY6aIS++qJOE9rnJHdfZNzLzduuoWEzEuwm9a/azQThM+eT+xlG/Vcf
-NuOQTTjAuXHLvYQ7WxSrBIT/kmAyqJgq/DEPvdX4jmCtVkuZ1gbxYIChLOVBWkVC
-FCK49BuXECtNy5fzK/GyfouZOVoQgiQ1YfecqzibcwO0t+f68Pvp/s6HESAH5tXY
-PdENDw4c/W/qKaeR87jPq98AJ8Lr4bmjWLjK8/ITtGglnJy8osFz22oR7f6fbWl6
-5LdhJ3giM68WEabQcZkw8cx3RDOzbnL2Kn+PVNHHyp3Wh849AgMBAAGjgeEwgd4w
-DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISoLnpz/+q98wEwYDVR0jBAwwCoAI
-Qj0rJKbBRc4wDgYDVR0PAQH/BAQDAgEGMIGSBgNVHR8EgYowgYcwgYSggYGgf4Z9
-bGRhcDovL2xkYXAuYS10cnVzdC5hdC9vdT1BLVRydXN0LVF1YWwtMDIsbz1BLVRy
-dXN0LGM9QVQ/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdD9iYXNlP29iamVjdGNs
-YXNzPWVpZENlcnRpZmljYXRpb25BdXRob3JpdHkwDQYJKoZIhvcNAQEFBQADggEB
-ABqg1oRs/TZ0hJLJRV/xJglFzgn2fDAXeoVvWnAE09F1d0n+ZorKAKbMfiZ2CuKs
-M0AhU23/5zM90DdrtYWXpa+P8ONALZtHJIqGfVuRKYJq7jY5TpE3yRkTcrp47smp
-WqTwUgG+0aBeU9m+ZtGUFOsBkq+MudD8IZGc7VcLd1n4ltND9ITjX20hu01ju56c
-YC69vFa5hmIccXg/Q3dGEV5Amx8MTQJluG3QvqBOY74yrAFICvK1zsvu+vOGvJQj
-i+PxKlbQdehrV82VDxyfSjpEUADWMGRfE5vg4YBGgfRosh4w7a6ThD2LMLFPmIhy
-P6+VGUBCm2tMDDOo9DVkXFs=
------END CERTIFICATE-----
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/testCerts/www.a-trust.at.der b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/testCerts/www.a-trust.at.der Binary files differdeleted file mode 100644 index 61ce8dff..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/conf/certs/testCerts/www.a-trust.at.der +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml deleted file mode 100644 index e8622526..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/createxmlsignaturerequest/CreateXMLSignatureRequest.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:KeyboxIdentifier>CertifiedKeypair</sl:KeyboxIdentifier>
- <sl:DataObjectInfo Structure="enveloping">
- <sl:DataObject>
- <sl:XMLContent>Von der Signatur umschlossene Daten.</sl:XMLContent>
- </sl:DataObject>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/plain</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
- <sl:SignatureInfo>
- <sl:SignatureEnvironment Reference="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/tutorial/examples/interface/common/XMLDocument.withSchemaHint.xml"/>
- <sl:SignatureLocation Index="4" xmlns:doc="urn:document">/doc:XMLDocument</sl:SignatureLocation>
- <sl:Supplement>
- <sl:Content Reference="urn:XMLDocument.xsd">
- <sl:LocRefContent>http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/tutorial/examples/interface/common/XMLDocument.xsd</sl:LocRefContent>
- </sl:Content>
- </sl:Supplement>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Cert.p12 b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Cert.p12 Binary files differdeleted file mode 100644 index 7d42c4b3..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Cert.p12 +++ /dev/null diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.bin b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.bin deleted file mode 100644 index 34cace45..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.bin +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<doc:XMLDocument xmlns:doc="urn:document" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document urn:XMLDocument.xsd">
- <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
- <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
-Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
-</doc:XMLDocument>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.txt b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.txt deleted file mode 100644 index 7448a1e3..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.txt +++ /dev/null @@ -1 +0,0 @@ -Ich bin ein einfacher Text.
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.xml deleted file mode 100644 index 92a106b7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObject1.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<doc:XMLDocument xmlns:doc="urn:document" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document urn:XMLDocument.xsd">
- <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
- <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
-Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
-</doc:XMLDocument>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Base64Content_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Base64Content_1.xml deleted file mode 100644 index a76308ae..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Base64Content_1.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="enveloping">
- <sl:DataObject>
- <sl:Base64Content>SWNoIGJpbiBlaW4gZWluZmFjaGVyIFRleHQu</sl:Base64Content>
- </sl:DataObject>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/plain</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_1.xml deleted file mode 100644 index 72e16347..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_1.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="detached">
- <sl:DataObject Reference=""/>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/xml</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_Base64Content.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_Base64Content.xml deleted file mode 100644 index 61fb446d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_Base64Content.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="detached">
- <sl:DataObject Reference="testlocal:DataObject1.xml">
- <sl:Base64Content>SWNoIGJpbiBlaW4gZWluZmFjaGVyIFRleHQu</sl:Base64Content>
- </sl:DataObject>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/xml</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_LocRefContent.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_LocRefContent.xml deleted file mode 100644 index 75f45ff0..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Detached_LocRefContent.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="detached">
- <sl:DataObject Reference="http://example.com/path/filenameNoExt#fragmentNoExt">
- <sl:LocRefContent>testlocal:DataObject1.bin</sl:LocRefContent>
- </sl:DataObject>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>application/octet-stream</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_1.xml deleted file mode 100644 index 65bafc0c..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_1.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="enveloping">
- <sl:DataObject Reference="testlocal:DataObject1.xml"/>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/xml</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_2.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_2.xml deleted file mode 100644 index a94f51b6..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_LocRefContent_2.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="enveloping">
- <sl:DataObject>
- <sl:LocRefContent>testlocal:DataObject1.bin</sl:LocRefContent>
- </sl:DataObject>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>application/octet-stream</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Reference_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Reference_1.xml deleted file mode 100644 index 7bcb5113..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_Reference_1.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="enveloping">
- <sl:DataObject>
- <sl:LocRefContent>testlocal:DataObject1.txt</sl:LocRefContent>
- </sl:DataObject>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/plain</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_1.xml deleted file mode 100644 index 2adda980..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_1.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="enveloping">
- <sl:DataObject>
- <sl:XMLContent>I am a simple <funny>funny</funny> text.</sl:XMLContent>
- </sl:DataObject>
- <sl:TransformsInfo>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/xml</sl:MimeType>
- <sl:Description>I am a fancy description.</sl:Description>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_2.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_2.xml deleted file mode 100644 index cad96fc8..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/DataObjectInfo_XMLContent_2.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:DataObjectInfo Structure="enveloping">
- <sl:DataObject>
- <sl:XMLContent>I am a simple <funny>funny</funny> text.</sl:XMLContent>
- </sl:DataObject>
- <sl:TransformsInfo>
- <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:Transform>
- </dsig:Transforms>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/xml</sl:MimeType>
- <sl:Description>I am a fancy description.</sl:Description>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Document.dtd b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Document.dtd deleted file mode 100644 index b645cef9..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/Document.dtd +++ /dev/null @@ -1,3 +0,0 @@ -<!ELEMENT XMLDocument (#PCDATA | Paragraph)*> -<!ELEMENT Paragraph (#PCDATA)> -<!ATTLIST Paragraph ParaId CDATA #IMPLIED> diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureEnvironment1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureEnvironment1.xml deleted file mode 100644 index 91fd7ccb..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureEnvironment1.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<doc:XMLDocument xmlns:doc="urn:document" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document urn:XMLDocument.xsd">
- <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
- <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
-Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
-</doc:XMLDocument>
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_1.xml deleted file mode 100644 index dac81be7..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_1.xml +++ /dev/null @@ -1,23 +0,0 @@ -<!--
-
-SignatureEnvironment:
-
-<?xml version="1.0" encoding="UTF-8"?>
-<doc:XMLDocument xmlns:doc="urn:document">
- <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
- <doc:Paragraph>Und ich bin der zweite Absatz in diesem Dokument.</doc:Paragraph>
-</doc:XMLDocument>
-
- -->
-<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:SignatureInfo>
- <sl:SignatureEnvironment>
- <sl:Base64Content>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxkb2M6WE1MRG9jdW1lbnQg
-eG1sbnM6ZG9jPSJ1cm46ZG9jdW1lbnQiPg0KICA8ZG9jOlBhcmFncmFwaD5JY2ggYmluIGRlciBl
-cnN0ZSBBYnNhdHogaW4gZGllc2VtIERva3VtZW50LjwvZG9jOlBhcmFncmFwaD4NCiAgPGRvYzpQ
-YXJhZ3JhcGg+VW5kIGljaCBiaW4gZGVyIHp3ZWl0ZSBBYnNhdHogaW4gZGllc2VtIERva3VtZW50
-LjwvZG9jOlBhcmFncmFwaD4NCjwvZG9jOlhNTERvY3VtZW50Pg0K</sl:Base64Content>
- </sl:SignatureEnvironment>
- <sl:SignatureLocation xmlns:doc="urn:document" Index="2">/doc:XMLDocument</sl:SignatureLocation>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_2.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_2.xml deleted file mode 100644 index 7d8c7c01..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_2.xml +++ /dev/null @@ -1,18 +0,0 @@ -<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:SignatureInfo>
- <sl:SignatureEnvironment>
- <sl:Base64Content>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQRSBYTUxEb2N1
-bWVudCBTWVNURU0gInVybjpEb2N1bWVudC5kdGQiPg0KPFhNTERvY3VtZW50Pg0KICAgIDxQYXJh
-Z3JhcGg+SWNoIGJpbiBkZXIgZXJzdGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC48L1BhcmFn
-cmFwaD4NCiAgICA8UGFyYWdyYXBoIFBhcmFJZD0iUGFyYTIiPlVuZCBpY2ggYmluIGRlciB6d2Vp
-dGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC4NCiAgICBJY2ggaGFiZSB3ZWl0ZXJzIGVpbiBl
-aWdlbmVucyBJRC1BdHRyaWJ1dCBiZWtvbW1lbi48L1BhcmFncmFwaD4NCjwvWE1MRG9jdW1lbnQ+</sl:Base64Content>
- </sl:SignatureEnvironment>
- <sl:SignatureLocation xmlns:doc="urn:document" Index="2">/XMLDocument</sl:SignatureLocation>
- <sl:Supplement>
- <sl:Content Reference="urn:Document.dtd">
- <sl:LocRefContent>testlocal:Document.dtd</sl:LocRefContent>
- </sl:Content>
- </sl:Supplement>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_3.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_3.xml deleted file mode 100644 index 91425a93..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Base64_3.xml +++ /dev/null @@ -1,20 +0,0 @@ -<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:SignatureInfo>
- <sl:SignatureEnvironment>
- <sl:Base64Content>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQRSBYTUxEb2N1
-bWVudCBTWVNURU0gInVybjpEb2N1bWVudC5kdGQiPg0KPFhNTERvY3VtZW50Pg0KICAgIDxQYXJh
-Z3JhcGg+SWNoIGJpbiBkZXIgZXJzdGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC48L1BhcmFn
-cmFwaD4NCiAgICA8UGFyYWdyYXBoIFBhcmFJZD0iUGFyYTIiPlVuZCBpY2ggYmluIGRlciB6d2Vp
-dGUgQWJzYXR6IGluIGRpZXNlbSBEb2t1bWVudC4NCiAgICBJY2ggaGFiZSB3ZWl0ZXJzIGVpbiBl
-aWdlbmVucyBJRC1BdHRyaWJ1dCBiZWtvbW1lbi48L1BhcmFncmFwaD4NCjwvWE1MRG9jdW1lbnQ+</sl:Base64Content>
- </sl:SignatureEnvironment>
- <sl:SignatureLocation xmlns:doc="urn:document" Index="2">/XMLDocument</sl:SignatureLocation>
- <sl:Supplement>
- <sl:Content Reference="urn:Document.dtd">
- <sl:Base64Content>PCFFTEVNRU5UIFhNTERvY3VtZW50ICgjUENEQVRBIHwgUGFyYWdyYXBoKSo+DQo8IUVMRU1FTlQg
-UGFyYWdyYXBoICgjUENEQVRBKT4NCjwhQVRUTElTVCBQYXJhZ3JhcGggUGFyYUlkIENEQVRBICNJ
-TVBMSUVEPg==</sl:Base64Content>
- </sl:Content>
- </sl:Supplement>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Reference_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Reference_1.xml deleted file mode 100644 index d1589f24..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_Reference_1.xml +++ /dev/null @@ -1,11 +0,0 @@ -<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:SignatureInfo>
- <sl:SignatureEnvironment Reference="testlocal:SignatureEnvironment1.xml"/>
- <sl:SignatureLocation Index="0" xmlns:doc="urn:document">id("Para2")</sl:SignatureLocation>
- <sl:Supplement>
- <sl:Content Reference="urn:XMLDocument.xsd">
- <sl:LocRefContent>testlocal:XMLDocument.xsd</sl:LocRefContent>
- </sl:Content>
- </sl:Supplement>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_XMLContent_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_XMLContent_1.xml deleted file mode 100644 index 79e91992..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/SignatureInfo_XMLContent_1.xml +++ /dev/null @@ -1,13 +0,0 @@ -<sl:CreateXMLSignatureRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <sl:SignatureInfo>
- <sl:SignatureEnvironment>
- <sl:XMLContent>
- <doc:Whole xmlns:doc="urn:document">
- <doc:Part1>Text in Teil 1</doc:Part1>
- <doc:Part2>Text in Teil 2</doc:Part2>
- </doc:Whole>
- </sl:XMLContent>
- </sl:SignatureEnvironment>
- <sl:SignatureLocation xmlns:doc="urn:document" Index="4">/doc:Whole</sl:SignatureLocation>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_1.xml deleted file mode 100644 index 7631534e..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_1.xml +++ /dev/null @@ -1,304 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?>
-<sl:CreateXMLSignatureRequest xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
- xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
- <sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier>
- <sl:DataObjectInfo Structure="detached">
- <sl:DataObject Reference=""/>
- <sl:TransformsInfo>
- <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
- <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
- xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">
- <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
- <html>
- <head>
- <title>Signatur der Anmeldedaten</title>
- <style type="text/css" media="screen">
- .boldstyle { font-weight: bold; }
- .italicstyle { font-style: italic; }
- .annotationstyle { font-size: 0.8em; }
- </style>
- </head>
- <body>
- <h1>Signatur der Anmeldedaten</h1>
- <p/>
- <h4>Mit meiner elektronischen Signatur beantrage ich, <span
- class="boldstyle">
- <xsl:value-of select="//@Issuer"/>
- </span>, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"
- />, <xsl:if
- test="//saml:Attribute[@AttributeName='OIDTextualDescription']"
- > in der Rolle als <xsl:value-of
- select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"
- /> (OID***= <xsl:value-of
- select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"
- />), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
- <p/>
- <h4>Datum und Uhrzeit: <xsl:value-of
- select="substring(//@IssueInstant,9,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,6,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,1,4)"/>, <xsl:value-of
- select="substring(//@IssueInstant,12,2)"/>:
- <xsl:value-of select="substring(//@IssueInstant,15,2)"
- />: <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
- </h4>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <h4>HPI(**): <xsl:value-of
- select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <h4>wbPK(*): <xsl:value-of
- select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
- <hr/>
- <h4>Ich bin weiters ermächtigt als <xsl:value-of
- select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"
- /> von <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']"
- >, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"
- />
- </xsl:if>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']"
- >, <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"
- />
- </xsl:if>, in deren Auftrag zu handeln. <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorWbpk']">
- <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"
- /></h4>
- </xsl:if>
- </h4>
- <p/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="//saml:Attribute[@AttributeName='OID']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
- <p/>
- <hr/>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <div class="annotationstyle">(*) wbPK: Das <span
- class="italicstyle">wirtschaftsbereichsspezifische
- Personenkennzeichen</span> wird aus den jeweiligen
- Stammzahlen des Bürgers und des Wirtschaftsunternehmens
- berechnet und ermöglicht eine eindeutige Zuordnung des
- Bürgers zum Wirtschaftsunternehmen.</div>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <div class="annotationstyle">(**) HPI: Der <span
- class="italicstyle">eHealth Professional
- Identifier</span> wird aus den jeweiligen Stammzahlen
- der Gesundheitsdiensteanbieterinnen /
- Gesundheitsdiensteanbieter berechnet und ermöglicht eine
- eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
- des Gesundheitsdiensteanbieters im
- Gesundheitsbereich.</div>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='OID']">
- <div class="annotationstyle">(***) OID: <span
- class="italicstyle">Object Identifier</span> sind
- standardisierte Objekt-Bezeichner und beschreiben
- eindeutig die Rollen des GDA-Token Inhabers.</div>
- </xsl:if>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </dsig:Transform>
- <dsig:Transform
- Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
- </dsig:Transforms>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>application/xhtml+xml</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- <sl:TransformsInfo>
- <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
- <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
- xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
- <html>
- <head>
- <title>Signatur der Anmeldedaten</title>
- </head>
- <body>
- <h1>Signatur der Anmeldedaten</h1>
- <p/>
- <h4>Mit meiner elektronischen Signatur beantrage ich, <b>
- <xsl:value-of select="//@Issuer"/>
- </b>, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"
- />, <xsl:if
- test="//saml:Attribute[@AttributeName='OIDTextualDescription']"
- > in der Rolle als <xsl:value-of
- select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"
- /> (OID***= <xsl:value-of
- select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"
- />), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
- <p/>
- <h4>Datum und Uhrzeit: <xsl:value-of
- select="substring(//@IssueInstant,9,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,6,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,1,4)"/>, <xsl:value-of
- select="substring(//@IssueInstant,12,2)"/>:
- <xsl:value-of select="substring(//@IssueInstant,15,2)"
- />: <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
- </h4>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <h4>HPI(**): <xsl:value-of
- select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <h4>wbPK(*): <xsl:value-of
- select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
- <hr/>
- <h4>Ich bin weiters ermächtigt als <xsl:value-of
- select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"
- /> von <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']"
- >, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"
- />
- </xsl:if>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']"
- >, <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"
- />
- </xsl:if>, in deren Auftrag zu handeln. <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorWbpk']">
- <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"
- /></h4>
- </xsl:if>
- </h4>
- <p/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="//saml:Attribute[@AttributeName='OID']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
- <p/>
- <hr/>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <h6>(*) wbPK: Das <i>wirtschaftsbereichsspezifische
- Personenkennzeichen</i> wird aus den jeweiligen
- Stammzahlen des Bürgers und des Wirtschaftsunternehmens
- berechnet und ermöglicht eine eindeutige Zuordnung des
- Bürgers zum Wirtschaftsunternehmen.</h6>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <h6>(**) HPI: Der <i>eHealth Professional Identifier</i>
- wird aus den jeweiligen Stammzahlen der
- Gesundheitsdiensteanbieterinnen /
- Gesundheitsdiensteanbieter berechnet und ermöglicht eine
- eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
- des Gesundheitsdiensteanbieters im
- Gesundheitsbereich.</h6>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='OID']">
- <h6>(***) OID: <i>Object Identifier</i> sind standardisierte
- Objekt-Bezeichner und beschreiben eindeutig die Rollen
- des GDA-Token Inhabers.</h6>
- </xsl:if>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </dsig:Transform>
- <dsig:Transform
- Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
- </dsig:Transforms>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/html</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
- <sl:SignatureInfo>
- <sl:SignatureEnvironment>
- <sl:XMLContent>
- <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
- xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#"
- MajorVersion="1" MinorVersion="0" AssertionID="any" Issuer="Klämens Örthäçké"
- IssueInstant="2008-06-05T11:26:10+02:00">
- <saml:AttributeStatement>
- <saml:Subject>
- <saml:NameIdentifier>https://demo.egiz.gv.at/exchange-moa-id-auth/</saml:NameIdentifier>
- </saml:Subject>
- <saml:Attribute AttributeName="wbPK"
- AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
- <saml:AttributeValue>
- <pr:Identification>
- <pr:Value>LTpz8VYzns2jrx0J8Gm/R/nAhxA=</pr:Value>
- <pr:Type>urn:publicid:gv.at:wbpk+FN+TODO</pr:Type>
- </pr:Identification>
- </saml:AttributeValue>
- </saml:Attribute>
- <saml:Attribute AttributeName="OA"
- AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
- <saml:AttributeValue>https://apps.egiz.gv.at/urlaubsschein-frontend/moaid-login</saml:AttributeValue>
- </saml:Attribute>
- <saml:Attribute AttributeName="Geburtsdatum"
- AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
- <saml:AttributeValue>1971-11-10</saml:AttributeValue>
- </saml:Attribute>
- </saml:AttributeStatement>
- </saml:Assertion>
- </sl:XMLContent>
- </sl:SignatureEnvironment>
- <sl:SignatureLocation Index="2" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">/saml:Assertion</sl:SignatureLocation>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_2.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_2.xml deleted file mode 100644 index f43dc61a..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/TransformsInfo_2.xml +++ /dev/null @@ -1,397 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?>
-<sl:CreateXMLSignatureRequest xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
- xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
- <sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier>
- <sl:DataObjectInfo Structure="detached">
- <sl:DataObject Reference=""/>
- <sl:TransformsInfo>
- <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
- <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
- xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">
- <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
- <html>
- <head>
- <title>Signatur der Anmeldedaten</title>
- <style type="text/css" media="screen">
- .boldstyle { font-weight: bold; }
- .italicstyle { font-style: italic; }
- .annotationstyle { font-size: 0.8em; }
- </style>
- </head>
- <body>
- <h1>Signatur der Anmeldedaten</h1>
- <p/>
- <h4>Mit meiner elektronischen Signatur beantrage ich, <span
- class="boldstyle">
- <xsl:value-of select="//@Issuer"/>
- </span>, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"
- />, <xsl:if
- test="//saml:Attribute[@AttributeName='OIDTextualDescription']"
- > in der Rolle als <xsl:value-of
- select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"
- /> (OID***= <xsl:value-of
- select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"
- />), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
- <p/>
- <h4>Datum und Uhrzeit: <xsl:value-of
- select="substring(//@IssueInstant,9,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,6,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,1,4)"/>, <xsl:value-of
- select="substring(//@IssueInstant,12,2)"/>:
- <xsl:value-of select="substring(//@IssueInstant,15,2)"
- />: <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
- </h4>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <h4>HPI(**): <xsl:value-of
- select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <h4>wbPK(*): <xsl:value-of
- select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
- <hr/>
- <h4>Ich bin weiters ermächtigt als <xsl:value-of
- select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"
- /> von <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']"
- >, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"
- />
- </xsl:if>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']"
- >, <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"
- />
- </xsl:if>, in deren Auftrag zu handeln. <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorWbpk']">
- <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"
- /></h4>
- </xsl:if>
- </h4>
- <p/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="//saml:Attribute[@AttributeName='OID']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
- <p/>
- <hr/>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <div class="annotationstyle">(*) wbPK: Das <span
- class="italicstyle">wirtschaftsbereichsspezifische
- Personenkennzeichen</span> wird aus den jeweiligen
- Stammzahlen des Bürgers und des Wirtschaftsunternehmens
- berechnet und ermöglicht eine eindeutige Zuordnung des
- Bürgers zum Wirtschaftsunternehmen.</div>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <div class="annotationstyle">(**) HPI: Der <span
- class="italicstyle">eHealth Professional
- Identifier</span> wird aus den jeweiligen Stammzahlen
- der Gesundheitsdiensteanbieterinnen /
- Gesundheitsdiensteanbieter berechnet und ermöglicht eine
- eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
- des Gesundheitsdiensteanbieters im
- Gesundheitsbereich.</div>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='OID']">
- <div class="annotationstyle">(***) OID: <span
- class="italicstyle">Object Identifier</span> sind
- standardisierte Objekt-Bezeichner und beschreiben
- eindeutig die Rollen des GDA-Token Inhabers.</div>
- </xsl:if>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </dsig:Transform>
- <dsig:Transform
- Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
- </dsig:Transforms>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>application/xhtml+xml</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- <sl:TransformsInfo>
- <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
- <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
- <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
- xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
- <html>
- <head>
- <title>Signatur der Anmeldedaten</title>
- </head>
- <body>
- <h1>Signatur der Anmeldedaten</h1>
- <p/>
- <h4>Mit meiner elektronischen Signatur beantrage ich, <b>
- <xsl:value-of select="//@Issuer"/>
- </b>, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"
- />, <xsl:if
- test="//saml:Attribute[@AttributeName='OIDTextualDescription']"
- > in der Rolle als <xsl:value-of
- select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"
- /> (OID***= <xsl:value-of
- select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"
- />), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
- <p/>
- <h4>Datum und Uhrzeit: <xsl:value-of
- select="substring(//@IssueInstant,9,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,6,2)"/>. <xsl:value-of
- select="substring(//@IssueInstant,1,4)"/>, <xsl:value-of
- select="substring(//@IssueInstant,12,2)"/>:
- <xsl:value-of select="substring(//@IssueInstant,15,2)"
- />: <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
- </h4>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <h4>HPI(**): <xsl:value-of
- select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <h4>wbPK(*): <xsl:value-of
- select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"
- /></h4>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
- <hr/>
- <h4>Ich bin weiters ermächtigt als <xsl:value-of
- select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"
- /> von <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']"
- >, geboren am <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"
- />. <xsl:value-of
- select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"
- />
- </xsl:if>
- <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']"
- >, <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"
- />
- </xsl:if>, in deren Auftrag zu handeln. <xsl:if
- test="//saml:Attribute[@AttributeName='MandatorWbpk']">
- <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of
- select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"
- /></h4>
- </xsl:if>
- </h4>
- <p/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="//saml:Attribute[@AttributeName='OID']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
- <p/>
- <hr/>
- </xsl:when>
- <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
- <p/>
- <hr/>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <h6>(*) wbPK: Das <i>wirtschaftsbereichsspezifische
- Personenkennzeichen</i> wird aus den jeweiligen
- Stammzahlen des Bürgers und des Wirtschaftsunternehmens
- berechnet und ermöglicht eine eindeutige Zuordnung des
- Bürgers zum Wirtschaftsunternehmen.</h6>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <h6>(**) HPI: Der <i>eHealth Professional Identifier</i>
- wird aus den jeweiligen Stammzahlen der
- Gesundheitsdiensteanbieterinnen /
- Gesundheitsdiensteanbieter berechnet und ermöglicht eine
- eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
- des Gesundheitsdiensteanbieters im
- Gesundheitsbereich.</h6>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='OID']">
- <h6>(***) OID: <i>Object Identifier</i> sind standardisierte
- Objekt-Bezeichner und beschreiben eindeutig die Rollen
- des GDA-Token Inhabers.</h6>
- </xsl:if>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </dsig:Transform>
- <dsig:Transform
- Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
- </dsig:Transforms>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/html</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- <sl:TransformsInfo>
- <dsig:Transforms> <!-- xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"-->
- <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" exclude-result-prefixes="pr saml">
- <xsl:output method="xml" xml:space="default"/>
- <xsl:template match="/" xmlns="">
- <text>
- <xsl:text>Mit meiner elektronischen Signatur beantrage ich, </xsl:text>
- <xsl:value-of select="//@Issuer"/>
- <xsl:text>, geboren am </xsl:text>
- <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"/>
- <xsl:text>, </xsl:text>
- <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
- <xsl:text>in der Rolle als </xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"/>
- <xsl:text>(OID***= </xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"/>)
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:text>den Zugang zur gesicherten Anwendung.</xsl:text>
- <xsl:text>

Datum und Uhrzeit: </xsl:text>
- <xsl:value-of select="substring(//@IssueInstant,9,2)"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="substring(//@IssueInstant,6,2)"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="substring(//@IssueInstant,1,4)"/>
- <xsl:text>, </xsl:text>
- <xsl:value-of select="substring(//@IssueInstant,12,2)"/>
- <xsl:text>:</xsl:text>
- <xsl:value-of select="substring(//@IssueInstant,15,2)"/>
- <xsl:text>:</xsl:text>
- <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
-
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <xsl:text>

HPI(**): </xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"/>
- </xsl:if>
-
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <xsl:text>

wbPK(*): </xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
- </xsl:if>
-
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
- <xsl:text>

Ich bin weiters ermächtigt als </xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"/>
- <xsl:text>von </xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']">
- <xsl:text>, geboren am </xsl:text>
- <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"/>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']">
- <xsl:text>,</xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"/>
- </xsl:if>
- <xsl:text>, in deren Auftrag zu handeln.</xsl:text>
-
- <xsl:if test="//saml:Attribute[@AttributeName='MandatorWbpk']">
- <xsl:text>

wbPK(*) des Vollmachtgebers: </xsl:text>
- <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"/>
- </xsl:if>
- </xsl:if>
-
- <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
- <xsl:text>

(*) wbPK: Das wirtschaftsbereichsspezifische Personenkennzeichen wird aus den jeweiligen Stammzahlen des Bürgers und des Wirtschaftsunternehmens berechnet und ermöglicht eine eindeutige Zuordnung des Bürgers zum Wirtschaftsunternehmen.</xsl:text>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
- <xsl:text>

(**) HPI: Der eHealth Professional Identifier wird aus den jeweiligen Stammzahlen der Gesundheitsdiensteanbieterinnen / Gesundheitsdiensteanbieter berechnet und ermöglicht eine eindeutige Zuordnung der Gesundheitsdiensteanbieterin / des Gesundheitsdiensteanbieters im Gesundheitsbereich.</xsl:text>
- </xsl:if>
- <xsl:if test="//saml:Attribute[@AttributeName='OID']">
- <xsl:text>

(***) OID: Object Identifier sind standardisierte Objekt-Bezeichner und beschreiben eindeutig die Rollen des GDA-Token Inhabers.</xsl:text>
- </xsl:if>
- </text>
- </xsl:template>
- </xsl:stylesheet>
- </dsig:Transform>
- <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
- <dsig:XPath>not(text())</dsig:XPath>
- </dsig:Transform>
- </dsig:Transforms>
- <sl:FinalDataMetaInfo>
- <sl:MimeType>text/plain</sl:MimeType>
- </sl:FinalDataMetaInfo>
- </sl:TransformsInfo>
- </sl:DataObjectInfo>
- <sl:SignatureInfo>
- <sl:SignatureEnvironment>
- <sl:XMLContent>
- <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
- xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#"
- MajorVersion="1" MinorVersion="0" AssertionID="any" Issuer="Klämens Örthäçké"
- IssueInstant="2008-06-05T11:26:10+02:00">
- <saml:AttributeStatement>
- <saml:Subject>
- <saml:NameIdentifier>https://demo.egiz.gv.at/exchange-moa-id-auth/</saml:NameIdentifier>
- </saml:Subject>
- <saml:Attribute AttributeName="wbPK"
- AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
- <saml:AttributeValue>
- <pr:Identification>
- <pr:Value>LTpz8VYzns2jrx0J8Gm/R/nAhxA=</pr:Value>
- <pr:Type>urn:publicid:gv.at:wbpk+FN+TODO</pr:Type>
- </pr:Identification>
- </saml:AttributeValue>
- </saml:Attribute>
- <saml:Attribute AttributeName="OA"
- AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
- <saml:AttributeValue>https://apps.egiz.gv.at/urlaubsschein-frontend/moaid-login</saml:AttributeValue>
- </saml:Attribute>
- <saml:Attribute AttributeName="Geburtsdatum"
- AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
- <saml:AttributeValue>1971-11-10</saml:AttributeValue>
- </saml:Attribute>
- </saml:AttributeStatement>
- </saml:Assertion>
- </sl:XMLContent>
- </sl:SignatureEnvironment>
- <sl:SignatureLocation Index="2" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">/saml:Assertion</sl:SignatureLocation>
- </sl:SignatureInfo>
-</sl:CreateXMLSignatureRequest>
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd deleted file mode 100644 index a2930f1d..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/impl/XMLDocument.xsd +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema targetNamespace="urn:document" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:document" elementFormDefault="qualified" attributeFormDefault="unqualified">
- <xs:element name="XMLDocument">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Paragraph" maxOccurs="unbounded">
- <xs:complexType mixed="true">
- <xs:attribute name="ParaId" type="xs:ID" use="optional"/>
- </xs:complexType>
- </xs:element>
- <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-</xs:schema>
diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml deleted file mode 100644 index 1a2857da..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-1.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
<sl:InfoboxReadRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
<sl:InfoboxIdentifier>IdentityLink</sl:InfoboxIdentifier>
<sl:AssocArrayParameters>
<sl:ReadKeys SearchString="*"/>
</sl:AssocArrayParameters>
</sl:InfoboxReadRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml deleted file mode 100644 index 96311ff6..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.Invalid-2.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
<sl:InfoboxReadRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
<sl:InfoboxIdentifier>IdentityLink</sl:InfoboxIdentifier>
<sl:BinaryFileParameters ContentIsXMLEntity="true"/>
<sl:BoxSpecificParameters>
<sl:ReadValue Key="SecureSignatureKeyPair"/>
</sl:BoxSpecificParameters>
</sl:InfoboxReadRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml deleted file mode 100644 index 10964e06..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/infoboxreadcommand/IdentityLink.Binary.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
<sl:InfoboxReadRequest xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
<sl:InfoboxIdentifier>IdentityLink</sl:InfoboxIdentifier>
<sl:BinaryFileParameters ContentIsXMLEntity="true"/>
<sl:BoxSpecificParameters>
<sl:IdentityLinkDomainIdentifier>urn:publicid:gv.at:wbpk+FN+468924i</sl:IdentityLinkDomainIdentifier>
</sl:BoxSpecificParameters>
</sl:InfoboxReadRequest>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/testApplicationContext.xml b/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/testApplicationContext.xml deleted file mode 100644 index a7b588aa..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/at/gv/egiz/bku/slcommands/testApplicationContext.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
- <!--
- Copyright 2008 Federal Chancellery Austria and Graz University of
- Technology Licensed under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance with the
- License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- CONDITIONS OF ANY KIND, either express or implied. See the License for
- the specific language governing permissions and limitations under the
- License.
- --> -<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="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#: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.CardChannel" />
- --></map>
- </property>
- </bean>
-
-</beans>
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/commons-logging.properties b/mocca-1.2.11/bkucommon/src/test/resources/commons-logging.properties deleted file mode 100644 index 29292562..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/commons-logging.properties +++ /dev/null @@ -1 +0,0 @@ -org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger diff --git a/mocca-1.2.11/bkucommon/src/test/resources/log4j.properties b/mocca-1.2.11/bkucommon/src/test/resources/log4j.properties deleted file mode 100644 index 053eac17..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/log4j.properties +++ /dev/null @@ -1,19 +0,0 @@ -# loglever DEBUG, appender STDOUT -log4j.rootLogger=TRACE, STDOUT -#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT - -# STDOUT appender -log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender -log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout -#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n -#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n -log4j.appender.STDOUT.layout.ConversionPattern=%-5p |%d | %t | %c %x- %m%n - -### FILE appender -#log4j.appender.file=org.apache.log4j.RollingFileAppender -#log4j.appender.file.maxFileSize=100KB -#log4j.appender.file.maxBackupIndex=9 -#log4j.appender.file.File=egovbus_ca.log -#log4j.appender.file.threshold=info -#log4j.appender.file.layout=org.apache.log4j.PatternLayout -#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
\ No newline at end of file diff --git a/mocca-1.2.11/bkucommon/src/test/resources/moaspss/CreateXMLSignatureRequest.xml b/mocca-1.2.11/bkucommon/src/test/resources/moaspss/CreateXMLSignatureRequest.xml deleted file mode 100644 index 586b1494..00000000 --- a/mocca-1.2.11/bkucommon/src/test/resources/moaspss/CreateXMLSignatureRequest.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<sl:CreateXMLSignatureRequest - xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"> -<sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier> - <sl:DataObjectInfo Structure="enveloping"> - <sl:DataObject> - <sl:XMLContent>I'm a simple text.</sl:XMLContent> - </sl:DataObject> - <sl:TransformsInfo> - <sl:FinalDataMetaInfo> - <sl:MimeType>text/plain</sl:MimeType> - </sl:FinalDataMetaInfo> - </sl:TransformsInfo> - </sl:DataObjectInfo> -</sl:CreateXMLSignatureRequest> -
\ No newline at end of file |