aboutsummaryrefslogtreecommitdiff
path: root/moaSig/moa-asic/src
diff options
context:
space:
mode:
Diffstat (limited to 'moaSig/moa-asic/src')
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ASiCManifestType.java132
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/AnyType.java85
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/CanonicalizationMethodType.java109
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DSAKeyValueType.java227
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DataObjectReferenceType.java207
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DigestMethodType.java111
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionType.java59
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionsListType.java76
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyInfoType.java142
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyValueType.java92
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ManifestType.java111
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectFactory.java665
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectType.java171
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/PGPDataType.java105
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RSAKeyValueType.java93
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ReferenceType.java214
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RetrievalMethodType.java127
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SPKIDataType.java83
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SigReferenceType.java94
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureMethodType.java115
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertiesType.java111
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertyType.java144
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureType.java195
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureValueType.java99
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignedInfoType.java167
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformType.java116
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformsType.java76
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509DataType.java100
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509IssuerSerialType.java98
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/XAdESSignaturesType.java76
-rw-r--r--moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/package-info.java9
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiC.java13
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCConstants.java9
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCEntry.java38
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFactory.java159
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFormat.java9
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerificationResult.java40
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerifier.java16
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/exceptions/ASiCException.java7
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCBaseFormatFactory.java134
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCContainer.java22
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCExtendedFormatFactory.java51
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCImpl.java73
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCMOAVerifier.java87
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCSimpleFormatFactory.java54
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/EntryHandler.java14
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/Verifier.java18
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ZipCommentReaderStream.java180
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/AllDataHandler.java28
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/BaseHandler.java27
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/CAdESHandler.java20
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceERSRecordHandler.java18
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceXMLRecordHandler.java15
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCCAdESHandler.java13
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCXAdESHandler.java11
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceERSRecordHandler.java11
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceXMLRecordHandler.java11
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/HandlerSorter.java16
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MetaInfHandler.java33
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MimefileHandler.java36
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SignatureHandler.java36
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCCAdESHandler.java13
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCXAdESHandler.java13
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceERSRecordHandler.java13
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceXMLRecordHandler.java13
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/XAdESHandler.java17
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/BaseVerifier.java61
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/CAdESVerifier.java43
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedCAdESVerifier.java168
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedXAdESVerifier.java184
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleCAdESVerifier.java45
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleXAdESVerifier.java128
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/XAdESVerifier.java54
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureRequestParser.java112
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureResponseBuilder.java177
-rw-r--r--moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASiCRequest.java46
-rw-r--r--moaSig/moa-asic/src/main/resources/schemas/asic.xsd71
-rw-r--r--moaSig/moa-asic/src/test/java/at/gv/egiz/asic/dev/Main.java238
-rw-r--r--moaSig/moa-asic/src/test/resources/META-INF/aop.xml11
-rw-r--r--moaSig/moa-asic/src/test/resources/log4j.properties16
80 files changed, 6830 insertions, 1 deletions
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ASiCManifestType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ASiCManifestType.java
new file mode 100644
index 0000000..49d8509
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ASiCManifestType.java
@@ -0,0 +1,132 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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 ASiCManifestType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="ASiCManifestType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://uri.etsi.org/02918/v1.2.1#}SigReference"/>
+ * &lt;element ref="{http://uri.etsi.org/02918/v1.2.1#}DataObjectReference" maxOccurs="unbounded"/>
+ * &lt;element name="ASiCManifestExtensions" type="{http://uri.etsi.org/02918/v1.2.1#}ExtensionsListType" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ASiCManifestType", namespace = "http://uri.etsi.org/02918/v1.2.1#", propOrder = {
+ "sigReference",
+ "dataObjectReference",
+ "aSiCManifestExtensions"
+})
+public class ASiCManifestType {
+
+ @XmlElement(name = "SigReference", required = true)
+ protected SigReferenceType sigReference;
+ @XmlElement(name = "DataObjectReference", required = true)
+ protected List<DataObjectReferenceType> dataObjectReference;
+ @XmlElement(name = "ASiCManifestExtensions")
+ protected ExtensionsListType aSiCManifestExtensions;
+
+ /**
+ * Gets the value of the sigReference property.
+ *
+ * @return
+ * possible object is
+ * {@link SigReferenceType }
+ *
+ */
+ public SigReferenceType getSigReference() {
+ return sigReference;
+ }
+
+ /**
+ * Sets the value of the sigReference property.
+ *
+ * @param value
+ * allowed object is
+ * {@link SigReferenceType }
+ *
+ */
+ public void setSigReference(SigReferenceType value) {
+ this.sigReference = value;
+ }
+
+ /**
+ * Gets the value of the dataObjectReference 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 dataObjectReference property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getDataObjectReference().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link DataObjectReferenceType }
+ *
+ *
+ */
+ public List<DataObjectReferenceType> getDataObjectReference() {
+ if (dataObjectReference == null) {
+ dataObjectReference = new ArrayList<DataObjectReferenceType>();
+ }
+ return this.dataObjectReference;
+ }
+
+ /**
+ * Gets the value of the aSiCManifestExtensions property.
+ *
+ * @return
+ * possible object is
+ * {@link ExtensionsListType }
+ *
+ */
+ public ExtensionsListType getASiCManifestExtensions() {
+ return aSiCManifestExtensions;
+ }
+
+ /**
+ * Sets the value of the aSiCManifestExtensions property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ExtensionsListType }
+ *
+ */
+ public void setASiCManifestExtensions(ExtensionsListType value) {
+ this.aSiCManifestExtensions = value;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/AnyType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/AnyType.java
new file mode 100644
index 0000000..5c96005
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/AnyType.java
@@ -0,0 +1,85 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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 AnyType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="AnyType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence maxOccurs="unbounded" minOccurs="0">
+ * &lt;any processContents='lax'/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AnyType", namespace = "http://uri.etsi.org/02918/v1.2.1#", propOrder = {
+ "content"
+})
+@XmlSeeAlso({
+ ExtensionType.class
+})
+public class AnyType {
+
+ @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 Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getContent() {
+ if (content == null) {
+ content = new ArrayList<Object>();
+ }
+ return this.content;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/CanonicalizationMethodType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/CanonicalizationMethodType.java
new file mode 100644
index 0000000..721ba32
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/CanonicalizationMethodType.java
@@ -0,0 +1,109 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="CanonicalizationMethodType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;any maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "CanonicalizationMethodType", 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 String }
+ * {@link Object }
+ *
+ *
+ */
+ 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DSAKeyValueType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DSAKeyValueType.java
new file mode 100644
index 0000000..57c5748
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DSAKeyValueType.java
@@ -0,0 +1,227 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="DSAKeyValueType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;sequence minOccurs="0">
+ * &lt;element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ * &lt;element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ * &lt;/sequence>
+ * &lt;element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ * &lt;element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ * &lt;element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
+ * &lt;sequence minOccurs="0">
+ * &lt;element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ * &lt;element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ * &lt;/sequence>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DSAKeyValueType", 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 = 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 = 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 = 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 = 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 = 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 = 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 = value;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DataObjectReferenceType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DataObjectReferenceType.java
new file mode 100644
index 0000000..f6d0399
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DataObjectReferenceType.java
@@ -0,0 +1,207 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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 DataObjectReferenceType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="DataObjectReferenceType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+ * &lt;element name="DataObjectReferenceExtensions" type="{http://uri.etsi.org/02918/v1.2.1#}ExtensionsListType" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;attribute name="URI" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * &lt;attribute name="Rootfile" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataObjectReferenceType", namespace = "http://uri.etsi.org/02918/v1.2.1#", propOrder = {
+ "digestMethod",
+ "digestValue",
+ "dataObjectReferenceExtensions"
+})
+public class DataObjectReferenceType {
+
+ @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;
+ @XmlElement(name = "DataObjectReferenceExtensions")
+ protected ExtensionsListType dataObjectReferenceExtensions;
+ @XmlAttribute(name = "URI", required = true)
+ @XmlSchemaType(name = "anyURI")
+ protected String uri;
+ @XmlAttribute(name = "MimeType")
+ protected String mimeType;
+ @XmlAttribute(name = "Rootfile")
+ protected Boolean rootfile;
+
+ /**
+ * 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 = value;
+ }
+
+ /**
+ * Gets the value of the dataObjectReferenceExtensions property.
+ *
+ * @return
+ * possible object is
+ * {@link ExtensionsListType }
+ *
+ */
+ public ExtensionsListType getDataObjectReferenceExtensions() {
+ return dataObjectReferenceExtensions;
+ }
+
+ /**
+ * Sets the value of the dataObjectReferenceExtensions property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ExtensionsListType }
+ *
+ */
+ public void setDataObjectReferenceExtensions(ExtensionsListType value) {
+ this.dataObjectReferenceExtensions = 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 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 rootfile property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isRootfile() {
+ return rootfile;
+ }
+
+ /**
+ * Sets the value of the rootfile property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setRootfile(Boolean value) {
+ this.rootfile = value;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DigestMethodType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DigestMethodType.java
new file mode 100644
index 0000000..bfa4f8d
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/DigestMethodType.java
@@ -0,0 +1,111 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="DigestMethodType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DigestMethodType", 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 Element }
+ * {@link Object }
+ *
+ *
+ */
+ 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionType.java
new file mode 100644
index 0000000..551dd5f
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionType.java
@@ -0,0 +1,59 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ExtensionType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="ExtensionType">
+ * &lt;complexContent>
+ * &lt;extension base="{http://uri.etsi.org/02918/v1.2.1#}AnyType">
+ * &lt;attribute name="Critical" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * &lt;/extension>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ExtensionType", namespace = "http://uri.etsi.org/02918/v1.2.1#")
+public class ExtensionType
+ extends AnyType
+{
+
+ @XmlAttribute(name = "Critical", required = true)
+ protected boolean critical;
+
+ /**
+ * Gets the value of the critical property.
+ *
+ */
+ public boolean isCritical() {
+ return critical;
+ }
+
+ /**
+ * Sets the value of the critical property.
+ *
+ */
+ public void setCritical(boolean value) {
+ this.critical = value;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionsListType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionsListType.java
new file mode 100644
index 0000000..8d841fb
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ExtensionsListType.java
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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 ExtensionsListType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="ExtensionsListType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://uri.etsi.org/02918/v1.2.1#}Extension" maxOccurs="unbounded"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ExtensionsListType", namespace = "http://uri.etsi.org/02918/v1.2.1#", propOrder = {
+ "extension"
+})
+public class ExtensionsListType {
+
+ @XmlElement(name = "Extension", required = true)
+ protected List<ExtensionType> extension;
+
+ /**
+ * Gets the value of the extension 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 extension property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getExtension().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ExtensionType }
+ *
+ *
+ */
+ public List<ExtensionType> getExtension() {
+ if (extension == null) {
+ extension = new ArrayList<ExtensionType>();
+ }
+ return this.extension;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyInfoType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyInfoType.java
new file mode 100644
index 0000000..f750cdd
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyInfoType.java
@@ -0,0 +1,142 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="KeyInfoType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;choice maxOccurs="unbounded">
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}KeyName"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}KeyValue"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}X509Data"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}PGPData"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SPKIData"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}MgmtData"/>
+ * &lt;any processContents='lax' namespace='##other'/>
+ * &lt;/choice>
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "KeyInfoType", propOrder = {
+ "content"
+})
+public class KeyInfoType {
+
+ @XmlElementRefs({
+ @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
+ })
+ @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 JAXBElement }{@code <}{@link PGPDataType }{@code >}
+ * {@link String }
+ * {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >}
+ * {@link JAXBElement }{@code <}{@link String }{@code >}
+ * {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >}
+ * {@link Element }
+ * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >}
+ * {@link JAXBElement }{@code <}{@link X509DataType }{@code >}
+ * {@link Object }
+ *
+ *
+ */
+ 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyValueType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyValueType.java
new file mode 100644
index 0000000..e6fee6f
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/KeyValueType.java
@@ -0,0 +1,92 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="KeyValueType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;choice>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue"/>
+ * &lt;any processContents='lax' namespace='##other'/>
+ * &lt;/choice>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "KeyValueType", propOrder = {
+ "content"
+})
+public class KeyValueType {
+
+ @XmlElementRefs({
+ @XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
+ })
+ @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 JAXBElement }{@code <}{@link RSAKeyValueType }{@code >}
+ * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >}
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getContent() {
+ if (content == null) {
+ content = new ArrayList<Object>();
+ }
+ return this.content;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ManifestType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ManifestType.java
new file mode 100644
index 0000000..2c14726
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ManifestType.java
@@ -0,0 +1,111 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="ManifestType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ManifestType", 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectFactory.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectFactory.java
new file mode 100644
index 0000000..cc1d90e
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectFactory.java
@@ -0,0 +1,665 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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 at.gv.egiz.asic 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 _SPKIData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKIData");
+ private final static QName _DataObjectReference_QNAME = new QName("http://uri.etsi.org/02918/v1.2.1#", "DataObjectReference");
+ private final static QName _KeyInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyInfo");
+ private final static QName _XAdESSignatures_QNAME = new QName("http://uri.etsi.org/02918/v1.2.1#", "XAdESSignatures");
+ private final static QName _SignatureValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureValue");
+ private final static QName _ASiCManifest_QNAME = new QName("http://uri.etsi.org/02918/v1.2.1#", "ASiCManifest");
+ private final static QName _KeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyValue");
+ private final static QName _Transforms_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transforms");
+ private final static QName _DigestMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestMethod");
+ private final static QName _X509Data_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Data");
+ private final static QName _SignatureProperty_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperty");
+ private final static QName _KeyName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyName");
+ private final static QName _RSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RSAKeyValue");
+ private final static QName _Signature_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Signature");
+ private final static QName _MgmtData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "MgmtData");
+ private final static QName _Extension_QNAME = new QName("http://uri.etsi.org/02918/v1.2.1#", "Extension");
+ private final static QName _SignatureMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureMethod");
+ private final static QName _Object_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Object");
+ private final static QName _SignatureProperties_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperties");
+ private final static QName _Transform_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transform");
+ private final static QName _PGPData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPData");
+ private final static QName _Reference_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Reference");
+ private final static QName _RetrievalMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RetrievalMethod");
+ private final static QName _DSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DSAKeyValue");
+ private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue");
+ private final static QName _CanonicalizationMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod");
+ private final static QName _SigReference_QNAME = new QName("http://uri.etsi.org/02918/v1.2.1#", "SigReference");
+ private final static QName _SignedInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignedInfo");
+ private final static QName _Manifest_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Manifest");
+ private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp");
+ private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial");
+ private final static QName _X509DataTypeX509CRL_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509CRL");
+ private final static QName _X509DataTypeX509SubjectName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SubjectName");
+ private final static QName _X509DataTypeX509SKI_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SKI");
+ private final static QName _X509DataTypeX509Certificate_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Certificate");
+ private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength");
+ private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath");
+ 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");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.gv.egiz.asic
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link ExtensionType }
+ *
+ */
+ public ExtensionType createExtensionType() {
+ return new ExtensionType();
+ }
+
+ /**
+ * Create an instance of {@link SigReferenceType }
+ *
+ */
+ public SigReferenceType createSigReferenceType() {
+ return new SigReferenceType();
+ }
+
+ /**
+ * Create an instance of {@link ASiCManifestType }
+ *
+ */
+ public ASiCManifestType createASiCManifestType() {
+ return new ASiCManifestType();
+ }
+
+ /**
+ * Create an instance of {@link DataObjectReferenceType }
+ *
+ */
+ public DataObjectReferenceType createDataObjectReferenceType() {
+ return new DataObjectReferenceType();
+ }
+
+ /**
+ * Create an instance of {@link XAdESSignaturesType }
+ *
+ */
+ public XAdESSignaturesType createXAdESSignaturesType() {
+ return new XAdESSignaturesType();
+ }
+
+ /**
+ * Create an instance of {@link ExtensionsListType }
+ *
+ */
+ public ExtensionsListType createExtensionsListType() {
+ return new ExtensionsListType();
+ }
+
+ /**
+ * Create an instance of {@link AnyType }
+ *
+ */
+ public AnyType createAnyType() {
+ return new AnyType();
+ }
+
+ /**
+ * Create an instance of {@link PGPDataType }
+ *
+ */
+ public PGPDataType createPGPDataType() {
+ return new PGPDataType();
+ }
+
+ /**
+ * Create an instance of {@link KeyValueType }
+ *
+ */
+ public KeyValueType createKeyValueType() {
+ return new KeyValueType();
+ }
+
+ /**
+ * Create an instance of {@link DSAKeyValueType }
+ *
+ */
+ public DSAKeyValueType createDSAKeyValueType() {
+ return new DSAKeyValueType();
+ }
+
+ /**
+ * Create an instance of {@link ReferenceType }
+ *
+ */
+ public ReferenceType createReferenceType() {
+ return new ReferenceType();
+ }
+
+ /**
+ * Create an instance of {@link RetrievalMethodType }
+ *
+ */
+ public RetrievalMethodType createRetrievalMethodType() {
+ return new RetrievalMethodType();
+ }
+
+ /**
+ * 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 DigestMethodType }
+ *
+ */
+ public DigestMethodType createDigestMethodType() {
+ return new DigestMethodType();
+ }
+
+ /**
+ * Create an instance of {@link ManifestType }
+ *
+ */
+ public ManifestType createManifestType() {
+ return new ManifestType();
+ }
+
+ /**
+ * Create an instance of {@link SignaturePropertyType }
+ *
+ */
+ public SignaturePropertyType createSignaturePropertyType() {
+ return new SignaturePropertyType();
+ }
+
+ /**
+ * Create an instance of {@link X509DataType }
+ *
+ */
+ public X509DataType createX509DataType() {
+ return new X509DataType();
+ }
+
+ /**
+ * Create an instance of {@link SignedInfoType }
+ *
+ */
+ public SignedInfoType createSignedInfoType() {
+ return new SignedInfoType();
+ }
+
+ /**
+ * Create an instance of {@link RSAKeyValueType }
+ *
+ */
+ public RSAKeyValueType createRSAKeyValueType() {
+ return new RSAKeyValueType();
+ }
+
+ /**
+ * Create an instance of {@link SPKIDataType }
+ *
+ */
+ public SPKIDataType createSPKIDataType() {
+ return new SPKIDataType();
+ }
+
+ /**
+ * Create an instance of {@link SignatureValueType }
+ *
+ */
+ public SignatureValueType createSignatureValueType() {
+ return new SignatureValueType();
+ }
+
+ /**
+ * Create an instance of {@link KeyInfoType }
+ *
+ */
+ public KeyInfoType createKeyInfoType() {
+ return new KeyInfoType();
+ }
+
+ /**
+ * Create an instance of {@link SignatureType }
+ *
+ */
+ public SignatureType createSignatureType() {
+ return new SignatureType();
+ }
+
+ /**
+ * Create an instance of {@link SignaturePropertiesType }
+ *
+ */
+ public SignaturePropertiesType createSignaturePropertiesType() {
+ return new SignaturePropertiesType();
+ }
+
+ /**
+ * Create an instance of {@link SignatureMethodType }
+ *
+ */
+ public SignatureMethodType createSignatureMethodType() {
+ return new SignatureMethodType();
+ }
+
+ /**
+ * Create an instance of {@link ObjectType }
+ *
+ */
+ public ObjectType createObjectType() {
+ return new ObjectType();
+ }
+
+ /**
+ * Create an instance of {@link TransformType }
+ *
+ */
+ public TransformType createTransformType() {
+ return new TransformType();
+ }
+
+ /**
+ * Create an instance of {@link X509IssuerSerialType }
+ *
+ */
+ public X509IssuerSerialType createX509IssuerSerialType() {
+ return new X509IssuerSerialType();
+ }
+
+ /**
+ * 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 DataObjectReferenceType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://uri.etsi.org/02918/v1.2.1#", name = "DataObjectReference")
+ public JAXBElement<DataObjectReferenceType> createDataObjectReference(DataObjectReferenceType value) {
+ return new JAXBElement<DataObjectReferenceType>(_DataObjectReference_QNAME, DataObjectReferenceType.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 XAdESSignaturesType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://uri.etsi.org/02918/v1.2.1#", name = "XAdESSignatures")
+ public JAXBElement<XAdESSignaturesType> createXAdESSignatures(XAdESSignaturesType value) {
+ return new JAXBElement<XAdESSignaturesType>(_XAdESSignatures_QNAME, XAdESSignaturesType.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 ASiCManifestType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://uri.etsi.org/02918/v1.2.1#", name = "ASiCManifest")
+ public JAXBElement<ASiCManifestType> createASiCManifest(ASiCManifestType value) {
+ return new JAXBElement<ASiCManifestType>(_ASiCManifest_QNAME, ASiCManifestType.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 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 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 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 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 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 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 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 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 ExtensionType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://uri.etsi.org/02918/v1.2.1#", name = "Extension")
+ public JAXBElement<ExtensionType> createExtension(ExtensionType value) {
+ return new JAXBElement<ExtensionType>(_Extension_QNAME, ExtensionType.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 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 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 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 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 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 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 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 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 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 SigReferenceType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://uri.etsi.org/02918/v1.2.1#", name = "SigReference")
+ public JAXBElement<SigReferenceType> createSigReference(SigReferenceType value) {
+ return new JAXBElement<SigReferenceType>(_SigReference_QNAME, SigReferenceType.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 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 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 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 = "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 = "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 = "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 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 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);
+ }
+
+ /**
+ * 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 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));
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectType.java
new file mode 100644
index 0000000..813c6d7
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ObjectType.java
@@ -0,0 +1,171 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="ObjectType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence maxOccurs="unbounded" minOccurs="0">
+ * &lt;any processContents='lax'/>
+ * &lt;/sequence>
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * &lt;attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ObjectType", 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 Element }
+ * {@link Object }
+ *
+ *
+ */
+ 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/PGPDataType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/PGPDataType.java
new file mode 100644
index 0000000..1adcf33
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/PGPDataType.java
@@ -0,0 +1,105 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="PGPDataType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;choice>
+ * &lt;sequence>
+ * &lt;element name="PGPKeyID" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * &lt;element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
+ * &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;sequence>
+ * &lt;element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/choice>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "PGPDataType", propOrder = {
+ "content"
+})
+public class PGPDataType {
+
+ @XmlElementRefs({
+ @XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
+ })
+ @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 218 of http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd
+ * line 213 of http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/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 JAXBElement }{@code <}{@link byte[]}{@code >}
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getContent() {
+ if (content == null) {
+ content = new ArrayList<Object>();
+ }
+ return this.content;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RSAKeyValueType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RSAKeyValueType.java
new file mode 100644
index 0000000..4b3cc12
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RSAKeyValueType.java
@@ -0,0 +1,93 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="RSAKeyValueType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="Modulus" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ * &lt;element name="Exponent" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RSAKeyValueType", 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 = 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 = value;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ReferenceType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ReferenceType.java
new file mode 100644
index 0000000..8d17d19
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/ReferenceType.java
@@ -0,0 +1,214 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="ReferenceType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ReferenceType", 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 = 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RetrievalMethodType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RetrievalMethodType.java
new file mode 100644
index 0000000..5e61e20
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/RetrievalMethodType.java
@@ -0,0 +1,127 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="RetrievalMethodType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RetrievalMethodType", 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SPKIDataType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SPKIDataType.java
new file mode 100644
index 0000000..b7b2bf2
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SPKIDataType.java
@@ -0,0 +1,83 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="SPKIDataType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence maxOccurs="unbounded">
+ * &lt;element name="SPKISexp" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * &lt;any processContents='lax' namespace='##other' minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SPKIDataType", 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 Element }
+ * {@link JAXBElement }{@code <}{@link byte[]}{@code >}
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getSPKISexpAndAny() {
+ if (spkiSexpAndAny == null) {
+ spkiSexpAndAny = new ArrayList<Object>();
+ }
+ return this.spkiSexpAndAny;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SigReferenceType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SigReferenceType.java
new file mode 100644
index 0000000..6b74429
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SigReferenceType.java
@@ -0,0 +1,94 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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;
+
+
+/**
+ * <p>Java class for SigReferenceType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="SigReferenceType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;attribute name="URI" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SigReferenceType", namespace = "http://uri.etsi.org/02918/v1.2.1#")
+public class SigReferenceType {
+
+ @XmlAttribute(name = "URI", required = true)
+ @XmlSchemaType(name = "anyURI")
+ protected String uri;
+ @XmlAttribute(name = "MimeType")
+ protected String mimeType;
+
+ /**
+ * 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 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;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureMethodType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureMethodType.java
new file mode 100644
index 0000000..41ebe48
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureMethodType.java
@@ -0,0 +1,115 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="SignatureMethodType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="HMACOutputLength" type="{http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType" minOccurs="0"/>
+ * &lt;any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignatureMethodType", propOrder = {
+ "content"
+})
+public class SignatureMethodType {
+
+ @XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
+ @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 JAXBElement }{@code <}{@link BigInteger }{@code >}
+ * {@link Object }
+ *
+ *
+ */
+ 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertiesType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertiesType.java
new file mode 100644
index 0000000..7f0a75d
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertiesType.java
@@ -0,0 +1,111 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="SignaturePropertiesType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureProperty" maxOccurs="unbounded"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignaturePropertiesType", 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertyType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertyType.java
new file mode 100644
index 0000000..ea45e8e
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignaturePropertyType.java
@@ -0,0 +1,144 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="SignaturePropertyType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;choice maxOccurs="unbounded">
+ * &lt;any processContents='lax' namespace='##other'/>
+ * &lt;/choice>
+ * &lt;attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignaturePropertyType", 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 Element }
+ * {@link Object }
+ *
+ *
+ */
+ 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureType.java
new file mode 100644
index 0000000..70dc7b0
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureType.java
@@ -0,0 +1,195 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="SignatureType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignatureType", 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureValueType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureValueType.java
new file mode 100644
index 0000000..8c0350b
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignatureValueType.java
@@ -0,0 +1,99 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="SignatureValueType">
+ * &lt;simpleContent>
+ * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>base64Binary">
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;/extension>
+ * &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignatureValueType", 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 = 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignedInfoType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignedInfoType.java
new file mode 100644
index 0000000..ff8f40e
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/SignedInfoType.java
@@ -0,0 +1,167 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="SignedInfoType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ * &lt;/sequence>
+ * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignedInfoType", 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformType.java
new file mode 100644
index 0000000..1f2d7c9
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformType.java
@@ -0,0 +1,116 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="TransformType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;choice maxOccurs="unbounded" minOccurs="0">
+ * &lt;any processContents='lax' namespace='##other'/>
+ * &lt;element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;/choice>
+ * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TransformType", propOrder = {
+ "content"
+})
+public class TransformType {
+
+ @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
+ @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 JAXBElement }{@code <}{@link String }{@code >}
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformsType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformsType.java
new file mode 100644
index 0000000..9134229
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/TransformsType.java
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="TransformsType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TransformsType", 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509DataType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509DataType.java
new file mode 100644
index 0000000..3fa1604
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509DataType.java
@@ -0,0 +1,100 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="X509DataType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence maxOccurs="unbounded">
+ * &lt;choice>
+ * &lt;element name="X509IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/>
+ * &lt;element name="X509SKI" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * &lt;element name="X509SubjectName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * &lt;element name="X509CRL" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * &lt;any processContents='lax' namespace='##other'/>
+ * &lt;/choice>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "X509DataType", propOrder = {
+ "x509IssuerSerialOrX509SKIOrX509SubjectName"
+})
+public class X509DataType {
+
+ @XmlElementRefs({
+ @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
+ @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
+ })
+ @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 JAXBElement }{@code <}{@link byte[]}{@code >}
+ * {@link JAXBElement }{@code <}{@link byte[]}{@code >}
+ * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >}
+ * {@link JAXBElement }{@code <}{@link String }{@code >}
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getX509IssuerSerialOrX509SKIOrX509SubjectName() {
+ if (x509IssuerSerialOrX509SKIOrX509SubjectName == null) {
+ x509IssuerSerialOrX509SKIOrX509SubjectName = new ArrayList<Object>();
+ }
+ return this.x509IssuerSerialOrX509SKIOrX509SubjectName;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509IssuerSerialType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509IssuerSerialType.java
new file mode 100644
index 0000000..f1f7331
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/X509IssuerSerialType.java
@@ -0,0 +1,98 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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>
+ * &lt;complexType name="X509IssuerSerialType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="X509IssuerName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="X509SerialNumber" type="{http://www.w3.org/2001/XMLSchema}integer"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "X509IssuerSerialType", 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/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/XAdESSignaturesType.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/XAdESSignaturesType.java
new file mode 100644
index 0000000..00ca792
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/XAdESSignaturesType.java
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+
+package at.gv.egiz.asic;
+
+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 XAdESSignaturesType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="XAdESSignaturesType">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Signature" maxOccurs="unbounded"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "XAdESSignaturesType", namespace = "http://uri.etsi.org/02918/v1.2.1#", propOrder = {
+ "signature"
+})
+public class XAdESSignaturesType {
+
+ @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
+ protected List<SignatureType> signature;
+
+ /**
+ * Gets the value of the signature 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 signature property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getSignature().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link SignatureType }
+ *
+ *
+ */
+ public List<SignatureType> getSignature() {
+ if (signature == null) {
+ signature = new ArrayList<SignatureType>();
+ }
+ return this.signature;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/package-info.java b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/package-info.java
new file mode 100644
index 0000000..ff68caf
--- /dev/null
+++ b/moaSig/moa-asic/src/generated/java/at/gv/egiz/asic/package-info.java
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.06.16 at 02:42:50 PM CEST
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2000/09/xmldsig#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package at.gv.egiz.asic;
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiC.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiC.java
new file mode 100644
index 0000000..e79d2ca
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiC.java
@@ -0,0 +1,13 @@
+package at.gv.egiz.asic.api;
+
+import java.util.List;
+
+public interface ASiC {
+ public ASiCFormat getFormat();
+ public boolean isXAdES();
+ public boolean isCAdES();
+
+ public List<ASiCEntry> getSignaturesEntries();
+ public List<ASiCEntry> getDataEntries();
+ public List<ASiCEntry> getInformationEntries();
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCConstants.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCConstants.java
new file mode 100644
index 0000000..02baf40
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCConstants.java
@@ -0,0 +1,9 @@
+package at.gv.egiz.asic.api;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public interface ASiCConstants {
+ public static final String FILE_MIME_TYPE = "mimetype";
+ public static final String FILE_META_INF = "META-INF/";
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCEntry.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCEntry.java
new file mode 100644
index 0000000..7c026cf
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCEntry.java
@@ -0,0 +1,38 @@
+package at.gv.egiz.asic.api;
+
+import java.io.InputStream;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public class ASiCEntry {
+
+ private String entryName;
+ private InputStream contents;
+
+ public ASiCEntry() {
+ }
+
+ public String getEntryName() {
+ return entryName;
+ }
+
+ public void setEntryName(String entryName) {
+ this.entryName = entryName;
+ }
+
+ public InputStream getContents() {
+ return contents;
+ }
+
+ public void setContents(InputStream contents) {
+ this.contents = contents;
+ }
+
+ @Override
+ public String toString() {
+ return "ASiCEntry{" +
+ "entryName='" + entryName + '\'' +
+ '}';
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFactory.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFactory.java
index e9ad9dc..6b067f7 100644
--- a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFactory.java
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFactory.java
@@ -1,7 +1,164 @@
package at.gv.egiz.asic.api;
+import at.gv.egiz.asic.exceptions.ASiCException;
+import at.gv.egiz.asic.impl.ASiCBaseFormatFactory;
+import at.gv.egiz.asic.impl.ASiCExtendedFormatFactory;
+import at.gv.egiz.asic.impl.ASiCSimpleFormatFactory;
+import at.gv.egiz.asic.impl.ZipCommentReaderStream;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
/**
* Created by afitzek on 6/15/16.
*/
-public interface ASiCFactory {
+public class ASiCFactory {
+
+ private static final Logger logger = LoggerFactory.getLogger(ASiCFactory.class);
+
+ private static final String MIMETYPE_FORMAT_E = "application/vnd.etsi.asic-e+zip";
+ private static final String MIMETYPE_FORMAT_S = "application/vnd.etsi.asic-s+zip";
+
+ public static ASiC parseASiC(InputStream is, ASiCFormat format) throws MOAException {
+
+ InputStream newInputStream = is;
+
+
+ // Try to determine the asic format!
+ if (!newInputStream.markSupported()) {
+ ByteArrayOutputStream asicContainer = new ByteArrayOutputStream();
+
+ try {
+ IOUtils.copy(newInputStream, asicContainer);
+ } catch (IOException e) {
+ throw new MOAApplicationException("asic.0003", null);
+ }
+ newInputStream = new ByteArrayInputStream(asicContainer.toByteArray());
+ }
+
+ String mimeTypeFile = null;
+ ZipCommentReaderStream commentReaderStream = new ZipCommentReaderStream(newInputStream);
+ byte[] buffer = new byte[8096];
+ try {
+ while (commentReaderStream.read(buffer) >= 0) {
+ }
+ newInputStream.reset();
+ } catch (IOException e) {
+ throw new MOAApplicationException("asic.0003", null);
+ }
+
+ ZipInputStream zipInputStream = new ZipInputStream(newInputStream);
+
+ try {
+ for (ZipEntry entry = zipInputStream.getNextEntry(); entry != null; entry = zipInputStream.getNextEntry()) {
+ String entryName = entry.getName();
+
+ if("mimetype".equalsIgnoreCase(entryName)) {
+ if(mimeTypeFile == null) {
+ mimeTypeFile = IOUtils.toString(zipInputStream, "UTF-8");
+ } else {
+ logger.warn("multiple mimetype files found in archiv");
+ }
+ }
+ }
+ newInputStream.reset();
+ } catch (IOException e) {
+ throw new MOAApplicationException("asic.0007", null);
+ }
+
+ String fileComment = commentReaderStream.getFileComment();
+ ASiCFormat fileCommentFormat = null;
+ if (fileComment != null) {
+ logger.info("Found file comment in ASiC {}", fileComment);
+ if(fileComment.startsWith("mimetype=")) {
+ String fileCommentMimeType = fileComment.substring("mimetype=".length());
+ if(fileCommentMimeType.startsWith(MIMETYPE_FORMAT_E)) {
+ fileCommentFormat = ASiCFormat.ASiCE;
+ } else if(fileCommentMimeType.startsWith(MIMETYPE_FORMAT_S)) {
+ fileCommentFormat = ASiCFormat.ASiCS;
+ }
+ }
+ } else {
+ logger.info("No file comment in ASiC");
+ }
+
+
+ ASiCFormat mimeTypeFileFormat = null;
+ if (mimeTypeFile != null) {
+ logger.info("Found mimetype file in ASiC {}", mimeTypeFile);
+ if(MIMETYPE_FORMAT_E.equalsIgnoreCase(mimeTypeFile)) {
+ mimeTypeFileFormat = ASiCFormat.ASiCE;
+ } else if(MIMETYPE_FORMAT_S.equalsIgnoreCase(mimeTypeFile)) {
+ mimeTypeFileFormat = ASiCFormat.ASiCS;
+ }
+ } else {
+ logger.info("No mimetype file in ASiC");
+ }
+
+ if (format == null) {
+ if (fileCommentFormat != null && mimeTypeFileFormat != null) {
+ // both are set
+ if (fileCommentFormat == mimeTypeFileFormat) {
+ format = fileCommentFormat;
+ } else {
+ throw new MOAApplicationException("asic.0009", null);
+ }
+ } else if (fileCommentFormat != null) {
+ format = fileCommentFormat;
+ } else if (mimeTypeFileFormat != null) {
+ format = mimeTypeFileFormat;
+ } else {
+ throw new MOAApplicationException("asic.0008", null);
+ }
+ } else {
+ // format is provided, only check for missmatches
+ if (fileCommentFormat != null && fileCommentFormat != format) {
+ logger.warn("ASiC format missmatch file comment {} vs provided {}", fileCommentFormat, format);
+ throw new MOAApplicationException("asic.0009", null);
+ }
+ if (mimeTypeFileFormat != null && mimeTypeFileFormat != format) {
+ logger.warn("ASiC format missmatch mimetype file {} vs provided {}", mimeTypeFileFormat, format);
+ throw new MOAApplicationException("asic.0009", null);
+ }
+
+ if (fileCommentFormat != null && mimeTypeFileFormat != null) {
+ // both are set
+ if (fileCommentFormat != mimeTypeFileFormat) {
+ logger.warn("ASiC format missmatch file comment {} vs mimetype file {}", fileCommentFormat, mimeTypeFileFormat);
+ throw new MOAApplicationException("asic.0009", null);
+ }
+ }
+ }
+
+ ASiCBaseFormatFactory formatFactory = null;
+
+ if (format == null) {
+ throw new MOAApplicationException("asic.0008", null);
+ }
+
+ switch (format) {
+ case ASiCE:
+ formatFactory = new ASiCExtendedFormatFactory();
+ break;
+ case ASiCS:
+ formatFactory = new ASiCSimpleFormatFactory();
+ break;
+ }
+
+ if (formatFactory == null) {
+ throw new MOAApplicationException("asic.0008", null);
+ }
+
+ return formatFactory.createASiC(newInputStream);
+ }
+
}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFormat.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFormat.java
new file mode 100644
index 0000000..8106944
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCFormat.java
@@ -0,0 +1,9 @@
+package at.gv.egiz.asic.api;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public enum ASiCFormat {
+ ASiCS,
+ ASiCE
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerificationResult.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerificationResult.java
new file mode 100644
index 0000000..a350f18
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerificationResult.java
@@ -0,0 +1,40 @@
+package at.gv.egiz.asic.api;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Andreas Fitzek on 6/16/16.
+ */
+public class ASiCVerificationResult {
+
+ private List<String> signedFiles = new ArrayList<String>();
+
+ private VerifyCMSSignatureResponse cmsResult = null;
+ private VerifyXMLSignatureResponse xmlResult = null;
+
+ public ASiCVerificationResult(List<String> references, VerifyCMSSignatureResponse cmsResult) {
+ this.signedFiles = references;
+ this.cmsResult = cmsResult;
+ }
+
+ public ASiCVerificationResult(List<String> references, VerifyXMLSignatureResponse xmlResult) {
+ this.signedFiles = references;
+ this.xmlResult = xmlResult;
+ }
+
+ public List<String> getSignedFiles() {
+ return signedFiles;
+ }
+
+ public VerifyXMLSignatureResponse getXmlResult() {
+ return xmlResult;
+ }
+
+ public VerifyCMSSignatureResponse getCmsResult() {
+ return cmsResult;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerifier.java
new file mode 100644
index 0000000..77bc61d
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/api/ASiCVerifier.java
@@ -0,0 +1,16 @@
+package at.gv.egiz.asic.api;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public interface ASiCVerifier {
+
+ public List<ASiCVerificationResult> verify(ASiC asic, String trustProfileID, Date date) throws MOAException;
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/exceptions/ASiCException.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/exceptions/ASiCException.java
new file mode 100644
index 0000000..f29199a
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/exceptions/ASiCException.java
@@ -0,0 +1,7 @@
+package at.gv.egiz.asic.exceptions;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public class ASiCException {
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCBaseFormatFactory.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCBaseFormatFactory.java
new file mode 100644
index 0000000..bce179d
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCBaseFormatFactory.java
@@ -0,0 +1,134 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.impl.handler.*;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public abstract class ASiCBaseFormatFactory implements ASiCContainer {
+
+ private static final Logger logger = LoggerFactory.getLogger(ASiCBaseFormatFactory.class);
+
+ protected boolean cadesSigned = false;
+ protected boolean xadesSigned = false;
+ protected boolean timestamped = false;
+
+ protected String mimeType = null;
+
+ protected List<ASiCEntry> signatureEntries = new ArrayList<ASiCEntry>();
+ protected List<ASiCEntry> dataEntries = new ArrayList<ASiCEntry>();
+ protected List<ASiCEntry> informationEntries = new ArrayList<ASiCEntry>();
+
+ protected List<EntryHandler> handlers = new ArrayList<EntryHandler>();
+
+ @Override
+ public void addDataEntry(ASiCEntry entry) {
+ this.dataEntries.add(entry);
+ }
+
+ @Override
+ public void addSignatureEntry(ASiCEntry entry) {
+ this.signatureEntries.add(entry);
+ }
+
+ @Override
+ public void addInformationEntry(ASiCEntry entry) {
+ this.informationEntries.add(entry);
+ }
+
+ public ASiCBaseFormatFactory() {
+ handlers.add(new MimefileHandler());
+ handlers.add(new MetaInfHandler());
+ handlers.add(new AllDataHandler());
+ }
+
+ public abstract ASiCFormat factoryFormat();
+
+ protected abstract void validate() throws MOAException;
+
+ public ASiC createASiC(InputStream is) throws MOAException {
+
+ ZipCommentReaderStream commentReaderStream = new ZipCommentReaderStream(is);
+
+ ZipInputStream zipInputStream = new ZipInputStream(commentReaderStream);
+
+ try {
+ for (ZipEntry entry = zipInputStream.getNextEntry(); entry != null; entry = zipInputStream.getNextEntry()) {
+ String entryName = entry.getName();
+
+ Iterator<EntryHandler> handlerIterator = this.handlers.iterator();
+ while (handlerIterator.hasNext()) {
+ EntryHandler entryHandler = handlerIterator.next();
+
+ if (entryHandler.handle(entryName, zipInputStream, this)) {
+ break;
+ }
+ }
+ }
+ } catch(IOException e) {
+ logger.info("Failed to read from ASiC Container", e);
+ throw new MOAApplicationException("asic.0007", null);
+ }
+
+
+ if(this.mimeType == null) {
+ String mimeTypeComment = commentReaderStream.getFileComment();
+ if(mimeTypeComment != null) {
+ this.mimeType = mimeTypeComment;
+ }
+ }
+
+ this.validate();
+
+ // unpack and retrieve all available information on ASiC signature
+ return new ASiCImpl(this.factoryFormat(), this.xadesSigned, this.cadesSigned, this.signatureEntries, dataEntries, this.informationEntries);
+ }
+
+ @Override
+ public void setMimeType(String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+ public void setIsXAdES() throws MOAException {
+ if(this.cadesSigned) {
+ throw new MOAApplicationException("asic.0010", null);
+ }
+ this.xadesSigned = true;
+ }
+
+ public void setIsCAdES() throws MOAException {
+ if(this.xadesSigned) {
+ throw new MOAApplicationException("asic.0010", null);
+ }
+ this.cadesSigned = true;
+ }
+
+ public void setIsTimestamped() throws MOAException {
+ throw new MOAApplicationException("asic.0013", null);
+ }
+
+ @Override
+ public void setIsEvidenceERS() throws MOAException {
+ throw new MOAApplicationException("asic.0011", null);
+ }
+
+ @Override
+ public void setIsEvidenceXML() throws MOAException {
+ throw new MOAApplicationException("asic.0012", null);
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCContainer.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCContainer.java
new file mode 100644
index 0000000..73d1566
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCContainer.java
@@ -0,0 +1,22 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egovernment.moa.spss.MOAException;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public interface ASiCContainer {
+
+ public void setMimeType(String mimeType);
+ public void addDataEntry(ASiCEntry entry);
+ public void addSignatureEntry(ASiCEntry entry);
+ public void addInformationEntry(ASiCEntry entry);
+
+ public void setIsXAdES() throws MOAException;
+ public void setIsCAdES() throws MOAException;
+ public void setIsEvidenceERS() throws MOAException;
+ public void setIsEvidenceXML() throws MOAException;
+ public void setIsTimestamped() throws MOAException;
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCExtendedFormatFactory.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCExtendedFormatFactory.java
new file mode 100644
index 0000000..f71552b
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCExtendedFormatFactory.java
@@ -0,0 +1,51 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.impl.handler.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class ASiCExtendedFormatFactory extends ASiCBaseFormatFactory {
+
+ private static final Logger logger = LoggerFactory.getLogger(ASiCExtendedFormatFactory.class);
+
+ public ASiCExtendedFormatFactory() {
+ super();
+ handlers.add(new ExtendedASiCCAdESHandler());
+ handlers.add(new ExtendedASiCXAdESHandler());
+ handlers.add(new ExtendedEvidenceERSRecordHandler());
+ handlers.add(new ExtendedEvidenceXMLRecordHandler());
+
+ Collections.sort(handlers, new HandlerSorter());
+
+ logger.debug("Handler ordering for ASiCExtendedFormatFactory");
+ Iterator<EntryHandler> handlerIterator = this.handlers.iterator();
+ while(handlerIterator.hasNext()) {
+ EntryHandler entryHandler = handlerIterator.next();
+ logger.debug(" " + entryHandler.getPriority() + " " + entryHandler.getClass().getSimpleName());
+ }
+ }
+
+ @Override
+ protected void validate() {
+
+ }
+
+ @Override
+ public ASiCFormat factoryFormat() {
+ return ASiCFormat.ASiCE;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCImpl.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCImpl.java
new file mode 100644
index 0000000..c78385a
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCImpl.java
@@ -0,0 +1,73 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.api.ASiCFormat;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class ASiCImpl implements ASiC {
+
+ private ASiCFormat format;
+ private boolean xades;
+ private boolean cades;
+
+ protected List<ASiCEntry> signatureEntries = new ArrayList<ASiCEntry>();
+ protected List<ASiCEntry> dataEntries = new ArrayList<ASiCEntry>();
+ protected List<ASiCEntry> informationEntries = new ArrayList<ASiCEntry>();
+
+ public ASiCImpl(ASiCFormat format, boolean xades, boolean cades, List<ASiCEntry> signatureEntries, List<ASiCEntry> dataEntries, List<ASiCEntry> informationEntries) {
+ this.format = format;
+ this.xades = xades;
+ this.cades = cades;
+ this.signatureEntries = signatureEntries;
+ this.dataEntries = dataEntries;
+ this.informationEntries = informationEntries;
+ }
+
+ @Override
+ public ASiCFormat getFormat() {
+ return format;
+ }
+
+ @Override
+ public boolean isXAdES() {
+ return xades;
+ }
+
+ @Override
+ public boolean isCAdES() {
+ return cades;
+ }
+
+ @Override
+ public List<ASiCEntry> getSignaturesEntries() {
+ return signatureEntries;
+ }
+
+ @Override
+ public List<ASiCEntry> getDataEntries() {
+ return dataEntries;
+ }
+
+ @Override
+ public List<ASiCEntry> getInformationEntries() {
+ return informationEntries;
+ }
+
+ @Override
+ public String toString() {
+ return "ASiCImpl{" +
+ "format=" + format +
+ ", xades=" + xades +
+ ", cades=" + cades +
+ ", signatureEntries=" + signatureEntries +
+ ", dataEntries=" + dataEntries +
+ ", informationEntries=" + informationEntries +
+ '}';
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCMOAVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCMOAVerifier.java
new file mode 100644
index 0000000..51392da
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCMOAVerifier.java
@@ -0,0 +1,87 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egiz.asic.ASiCManifestType;
+import at.gv.egiz.asic.DataObjectReferenceType;
+import at.gv.egiz.asic.ReferenceType;
+import at.gv.egiz.asic.XAdESSignaturesType;
+import at.gv.egiz.asic.api.*;
+import at.gv.egiz.asic.impl.verifier.ExtendedCAdESVerifier;
+import at.gv.egiz.asic.impl.verifier.ExtendedXAdESVerifier;
+import at.gv.egiz.asic.impl.verifier.SimpleCAdESVerifier;
+import at.gv.egiz.asic.impl.verifier.SimpleXAdESVerifier;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOARuntimeException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.*;
+import at.gv.egovernment.moa.spss.api.common.*;
+import at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+import at.gv.egovernment.moa.spss.server.invoke.VerifyCMSSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+import iaik.server.cmspdfverify.CertificateValidationResult;
+import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.xml.bind.DataBindingException;
+import javax.xml.bind.JAXB;
+import javax.xml.crypto.dsig.Reference;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.DigestInputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.*;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class ASiCMOAVerifier implements ASiCVerifier {
+
+ private static final Logger logger = LoggerFactory.getLogger(ASiCMOAVerifier.class);
+
+ private List<Verifier> verifierMap = new ArrayList<Verifier>();
+
+ public ASiCMOAVerifier() {
+ verifierMap.add(new SimpleCAdESVerifier());
+ verifierMap.add(new SimpleXAdESVerifier());
+ verifierMap.add(new ExtendedCAdESVerifier());
+ verifierMap.add(new ExtendedXAdESVerifier());
+ }
+
+ @Override
+ public List<ASiCVerificationResult> verify(ASiC asic, String trustProfileID, Date date) throws MOAException {
+ List<ASiCVerificationResult> response = new ArrayList<ASiCVerificationResult>();
+ boolean handled = false;
+
+ Iterator<Verifier> verifierIterator = verifierMap.iterator();
+
+ while (verifierIterator.hasNext()) {
+ Verifier verifier = verifierIterator.next();
+ if (verifier.handles(asic)) {
+ verifier.verify(asic, trustProfileID, date, response);
+ handled = true;
+ break;
+ }
+ }
+
+ if (!handled) {
+ logger.warn("Cannot handle ASiC: {}", asic);
+ throw new MOASystemException("asic.0016", null);
+ }
+
+ return response;
+ }
+
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCSimpleFormatFactory.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCSimpleFormatFactory.java
new file mode 100644
index 0000000..90b3081
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ASiCSimpleFormatFactory.java
@@ -0,0 +1,54 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.impl.handler.*;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collections;
+import java.util.Iterator;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class ASiCSimpleFormatFactory extends ASiCBaseFormatFactory {
+
+ private static final Logger logger = LoggerFactory.getLogger(ASiCSimpleFormatFactory.class);
+
+ public ASiCSimpleFormatFactory() {
+ super();
+
+ handlers.add(new SimpleASiCCAdESHandler());
+ handlers.add(new SimpleASiCXAdESHandler());
+ handlers.add(new SimpleEvidenceXMLRecordHandler());
+ handlers.add(new SimpleEvidenceERSRecordHandler());
+
+ Collections.sort(handlers, new HandlerSorter());
+
+ logger.debug("Handler ordering for ASiCSimpleFormatFactory");
+ Iterator<EntryHandler> handlerIterator = this.handlers.iterator();
+ while(handlerIterator.hasNext()) {
+ EntryHandler entryHandler = handlerIterator.next();
+ logger.debug(" " + entryHandler.getPriority() + " " + entryHandler.getClass().getSimpleName());
+ }
+ }
+
+ @Override
+ protected void validate() throws MOAApplicationException {
+ if(this.dataEntries.size() != 1) {
+ logger.warn("There can only be one data entry for ASiC signatures in simple format");
+ throw new MOAApplicationException("asic.0014", null);
+ }
+
+ if(this.signatureEntries.size() != 1) {
+ logger.warn("There can only be one signature entry for ASiC signatures in simple format");
+ throw new MOAApplicationException("asic.0015", null);
+ }
+ }
+
+ @Override
+ public ASiCFormat factoryFormat() {
+ return ASiCFormat.ASiCS;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/EntryHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/EntryHandler.java
new file mode 100644
index 0000000..7767b33
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/EntryHandler.java
@@ -0,0 +1,14 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egovernment.moa.spss.MOAException;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public interface EntryHandler {
+ public int getPriority();
+ public boolean handle(String entryName, InputStream is, ASiCContainer container) throws IOException, MOAException;
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/Verifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/Verifier.java
new file mode 100644
index 0000000..95a2450
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/Verifier.java
@@ -0,0 +1,18 @@
+package at.gv.egiz.asic.impl;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egovernment.moa.spss.MOAException;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public interface Verifier {
+ public boolean handles(ASiC asic);
+
+ public void verify(ASiC asic, String trustProfileID, Date date, List<ASiCVerificationResult> response)
+ throws MOAException;
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ZipCommentReaderStream.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ZipCommentReaderStream.java
new file mode 100644
index 0000000..93b7651
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/ZipCommentReaderStream.java
@@ -0,0 +1,180 @@
+package at.gv.egiz.asic.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public class ZipCommentReaderStream extends InputStream {
+
+ private InputStream inputStream;
+
+ private int[] tempBuffer = new int[22];
+
+ private int[] commentBuffer = null;
+
+ private int commentBufferContentLen = 0;
+ private int commentBufferContentOff = 0;
+
+ private int tempBufferContentLen = 0;
+ private int tempBufferContentOff = 0;
+
+ private String fileComment = null;
+
+ private static final byte[] directoryRecord = new byte[] { (byte)0x50, (byte)0x4b, 0x05, 0x06 };
+
+ public ZipCommentReaderStream(InputStream inputStream) {
+ this.inputStream = inputStream;
+ }
+
+ private int readIntIntoBuffer() throws IOException {
+ int tValue = this.inputStream.read();
+
+ if(this.tempBuffer.length <= tempBufferContentOff) {
+ throw new IOException("Temp Buffer is out of space! @ " + tempBufferContentOff);
+ }
+
+ this.tempBuffer[tempBufferContentOff] = tValue;
+ tempBufferContentOff++;
+ tempBufferContentLen++;
+
+ return tValue;
+ }
+
+ private int readIntIntoCommentBuffer() throws IOException {
+ int tValue = this.inputStream.read();
+
+ if(this.commentBuffer.length <= commentBufferContentOff) {
+ throw new IOException("Comment Buffer is out of space! @ " + commentBufferContentOff);
+ }
+
+ this.commentBuffer[commentBufferContentOff] = tValue;
+ commentBufferContentOff++;
+ commentBufferContentLen++;
+
+ return tValue;
+ }
+
+ private void checkMagicBytes() throws IOException {
+ boolean foundMagic = true;
+ tempBufferContentOff = 0;
+ tempBufferContentLen = 0;
+ for(int i = 1; i < directoryRecord.length; i++) {
+ int tValue = readIntIntoBuffer();
+ if(tValue != directoryRecord[i]) {
+ foundMagic = false;
+ break;
+ }
+ if(tValue < 0) {
+ // Found EOF
+ return;
+ }
+ }
+
+ if(foundMagic) {
+ // read input stream until comment length
+ for(int i = 0; i < 16; i++) {
+ int tValue = readIntIntoBuffer();
+
+ if(tValue < 0) {
+ // Found EOF
+ return;
+ }
+ }
+
+ int commentlengthHigh = readIntIntoBuffer();
+
+ if(commentlengthHigh < 0) {
+ // Found EOF
+ return;
+ }
+
+ int commentlengthLow = readIntIntoBuffer();
+
+ if(commentlengthLow < 0) {
+ // Found EOF
+ return;
+ }
+
+ int commentLength = commentlengthLow * 255 + commentlengthHigh;
+
+ if(commentLength == 0) {
+ return;
+ }
+
+ this.commentBuffer = new int[commentLength];
+
+ commentBufferContentOff = 0;
+ commentBufferContentLen = 0;
+
+ // read comment buffer string
+ for(int i = 0; i < commentLength; i++) {
+ int tValue = readIntIntoCommentBuffer();
+
+ if(tValue < 0) {
+ // Found EOF
+ return;
+ }
+ }
+
+ byte[] stringBuffer = new byte[this.commentBuffer.length];
+
+ for(int i = 0; i < stringBuffer.length; i++) {
+ stringBuffer[i] = (byte)this.commentBuffer[i];
+ }
+
+ this.fileComment = new String(stringBuffer);
+ }
+ }
+
+ @Override
+ public int read() throws IOException {
+ int value = -1;
+ if(tempBufferContentLen > 0) {
+ value = this.tempBuffer[tempBufferContentOff];
+ tempBufferContentOff++;
+
+ // reset temp buffer
+ if(tempBufferContentOff >= tempBufferContentLen) {
+ tempBufferContentOff = 0;
+ tempBufferContentLen = 0;
+ }
+
+ return value;
+ }
+
+ if(this.commentBuffer != null) {
+ value = this.commentBuffer[commentBufferContentOff];
+
+ commentBufferContentOff++;
+
+ // reset comment buffer
+ if(commentBufferContentOff >= commentBufferContentLen) {
+ commentBufferContentOff = 0;
+ commentBufferContentLen = 0;
+ this.commentBuffer = null;
+ }
+
+ return value;
+ }
+
+ value = this.inputStream.read();
+
+ if(value == directoryRecord[0] && this.fileComment == null) {
+ // might have found start of magic bytes
+ checkMagicBytes();
+ // reset buffer offsets
+ tempBufferContentOff = 0;
+ commentBufferContentOff = 0;
+ }
+
+ return value;
+ }
+
+ public String getFileComment() {
+ return this.fileComment;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/AllDataHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/AllDataHandler.java
new file mode 100644
index 0000000..fa31bfc
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/AllDataHandler.java
@@ -0,0 +1,28 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.impl.EntryHandler;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public class AllDataHandler extends BaseHandler implements EntryHandler, ASiCConstants {
+ @Override
+ public int getPriority() {
+ return 100;
+ }
+
+ @Override
+ public boolean handle(String entryName, InputStream is, ASiCContainer container) throws IOException {
+
+ ASiCEntry entry = buildASiCEntry(entryName, is);
+ container.addDataEntry(entry);
+
+ return true;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/BaseHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/BaseHandler.java
new file mode 100644
index 0000000..2b5ca9a
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/BaseHandler.java
@@ -0,0 +1,27 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.impl.EntryHandler;
+import org.apache.commons.io.IOUtils;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public abstract class BaseHandler implements EntryHandler, ASiCConstants {
+
+ protected ASiCEntry buildASiCEntry(String entryName, InputStream is) throws IOException {
+ ASiCEntry entry = new ASiCEntry();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copy(is, baos);
+ entry.setContents(new ByteArrayInputStream(baos.toByteArray()));
+ entry.setEntryName(entryName);
+ return entry;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/CAdESHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/CAdESHandler.java
new file mode 100644
index 0000000..3ee97fc
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/CAdESHandler.java
@@ -0,0 +1,20 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egiz.asic.impl.EntryHandler;
+import at.gv.egovernment.moa.spss.MOAException;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public abstract class CAdESHandler extends SignatureHandler implements EntryHandler, ASiCConstants {
+
+ @Override
+ protected void setType(ASiCContainer container) throws MOAException {
+ container.setIsCAdES();
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceERSRecordHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceERSRecordHandler.java
new file mode 100644
index 0000000..f89c6d0
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceERSRecordHandler.java
@@ -0,0 +1,18 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egovernment.moa.spss.MOAException;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public abstract class EvidenceERSRecordHandler extends SignatureHandler {
+
+ @Override
+ protected void setType(ASiCContainer container) throws MOAException {
+ container.setIsEvidenceERS();
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceXMLRecordHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceXMLRecordHandler.java
new file mode 100644
index 0000000..4516bb0
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/EvidenceXMLRecordHandler.java
@@ -0,0 +1,15 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egovernment.moa.spss.MOAException;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public abstract class EvidenceXMLRecordHandler extends SignatureHandler {
+
+ @Override
+ protected void setType(ASiCContainer container) throws MOAException {
+ container.setIsEvidenceXML();
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCCAdESHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCCAdESHandler.java
new file mode 100644
index 0000000..464bcf6
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCCAdESHandler.java
@@ -0,0 +1,13 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class ExtendedASiCCAdESHandler extends CAdESHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return entryName.endsWith(".p7s") && entryName.startsWith(FILE_META_INF) && entryName.contains("signature");
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCXAdESHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCXAdESHandler.java
new file mode 100644
index 0000000..28b21a3
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedASiCXAdESHandler.java
@@ -0,0 +1,11 @@
+package at.gv.egiz.asic.impl.handler;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class ExtendedASiCXAdESHandler extends XAdESHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return entryName.endsWith(".xml") && entryName.startsWith(FILE_META_INF) && entryName.contains("signature");
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceERSRecordHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceERSRecordHandler.java
new file mode 100644
index 0000000..ccf9224
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceERSRecordHandler.java
@@ -0,0 +1,11 @@
+package at.gv.egiz.asic.impl.handler;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class ExtendedEvidenceERSRecordHandler extends EvidenceERSRecordHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return entryName.endsWith(".ers") && entryName.startsWith(FILE_META_INF) && entryName.contains("evidencerecord");
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceXMLRecordHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceXMLRecordHandler.java
new file mode 100644
index 0000000..d24d61b
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/ExtendedEvidenceXMLRecordHandler.java
@@ -0,0 +1,11 @@
+package at.gv.egiz.asic.impl.handler;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class ExtendedEvidenceXMLRecordHandler extends EvidenceERSRecordHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return entryName.endsWith(".xml") && entryName.startsWith(FILE_META_INF) && entryName.contains("evidencerecord");
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/HandlerSorter.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/HandlerSorter.java
new file mode 100644
index 0000000..36a215d
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/HandlerSorter.java
@@ -0,0 +1,16 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.impl.EntryHandler;
+
+import java.util.Comparator;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public class HandlerSorter implements Comparator<EntryHandler> {
+
+ @Override
+ public int compare(EntryHandler o1, EntryHandler o2) {
+ return Integer.compare(o1.getPriority(), o2.getPriority());
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MetaInfHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MetaInfHandler.java
new file mode 100644
index 0000000..ec4f101
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MetaInfHandler.java
@@ -0,0 +1,33 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.impl.EntryHandler;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class MetaInfHandler extends BaseHandler implements EntryHandler, ASiCConstants {
+ @Override
+ public int getPriority() {
+ return 20;
+ }
+
+ @Override
+ public boolean handle(String entryName, InputStream is, ASiCContainer container) throws IOException {
+
+ boolean metainf = entryName.startsWith(FILE_META_INF);
+
+ if(metainf) {
+ ASiCEntry entry = buildASiCEntry(entryName, is);
+ container.addInformationEntry(entry);
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MimefileHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MimefileHandler.java
new file mode 100644
index 0000000..68fc87e
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/MimefileHandler.java
@@ -0,0 +1,36 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egiz.asic.impl.EntryHandler;
+import org.apache.commons.io.IOUtils;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public class MimefileHandler implements EntryHandler, ASiCConstants {
+
+ private boolean isMimeType(String entryName) {
+ return FILE_MIME_TYPE.equalsIgnoreCase(entryName);
+ }
+
+ @Override
+ public int getPriority() {
+ return 1;
+ }
+
+ @Override
+ public boolean handle(String entryName, InputStream is, ASiCContainer container) throws IOException {
+
+ if(isMimeType(entryName)) {
+ String mimeType = IOUtils.toString(is, "UTF-8");
+ container.setMimeType(mimeType);
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SignatureHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SignatureHandler.java
new file mode 100644
index 0000000..621c9d4
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SignatureHandler.java
@@ -0,0 +1,36 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egovernment.moa.spss.MOAException;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public abstract class SignatureHandler extends BaseHandler {
+
+ @Override
+ public int getPriority() {
+ return 0;
+ }
+
+ protected abstract boolean matches(String entryName);
+
+ protected abstract void setType(ASiCContainer container) throws MOAException;
+
+ @Override
+ public boolean handle(String entryName, InputStream is, ASiCContainer container) throws IOException, MOAException {
+ boolean signature = this.matches(entryName);
+
+ if(signature) {
+ this.setType(container);
+ container.addSignatureEntry(buildASiCEntry(entryName, is));
+ return true;
+ }
+
+ return false;
+ }
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCCAdESHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCCAdESHandler.java
new file mode 100644
index 0000000..fdeda41
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCCAdESHandler.java
@@ -0,0 +1,13 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class SimpleASiCCAdESHandler extends CAdESHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return (ASiCConstants.FILE_META_INF + "signature.p7s").equalsIgnoreCase(entryName);
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCXAdESHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCXAdESHandler.java
new file mode 100644
index 0000000..66a7546
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleASiCXAdESHandler.java
@@ -0,0 +1,13 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class SimpleASiCXAdESHandler extends XAdESHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return (ASiCConstants.FILE_META_INF + "signatures.xml").equalsIgnoreCase(entryName);
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceERSRecordHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceERSRecordHandler.java
new file mode 100644
index 0000000..58221f5
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceERSRecordHandler.java
@@ -0,0 +1,13 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class SimpleEvidenceERSRecordHandler extends EvidenceERSRecordHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return (ASiCConstants.FILE_META_INF + "evidencerecord.ers").equalsIgnoreCase(entryName);
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceXMLRecordHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceXMLRecordHandler.java
new file mode 100644
index 0000000..dacc218
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/SimpleEvidenceXMLRecordHandler.java
@@ -0,0 +1,13 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class SimpleEvidenceXMLRecordHandler extends EvidenceERSRecordHandler {
+ @Override
+ protected boolean matches(String entryName) {
+ return (ASiCConstants.FILE_META_INF + "evidencerecord.xml").equalsIgnoreCase(entryName);
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/XAdESHandler.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/XAdESHandler.java
new file mode 100644
index 0000000..ff19759
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/handler/XAdESHandler.java
@@ -0,0 +1,17 @@
+package at.gv.egiz.asic.impl.handler;
+
+import at.gv.egiz.asic.api.ASiCConstants;
+import at.gv.egiz.asic.impl.ASiCContainer;
+import at.gv.egiz.asic.impl.EntryHandler;
+import at.gv.egovernment.moa.spss.MOAException;
+
+/**
+ * Created by afitzek on 6/15/16.
+ */
+public abstract class XAdESHandler extends SignatureHandler implements EntryHandler, ASiCConstants {
+
+ @Override
+ protected void setType(ASiCContainer container) throws MOAException {
+ container.setIsXAdES();
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/BaseVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/BaseVerifier.java
new file mode 100644
index 0000000..a0bc516
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/BaseVerifier.java
@@ -0,0 +1,61 @@
+package at.gv.egiz.asic.impl.verifier;
+
+import at.gv.egiz.asic.impl.Verifier;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import org.apache.commons.codec.binary.Hex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public abstract class BaseVerifier implements Verifier {
+
+ protected static Map<String, String> hashTranslator = new HashMap<String, String>();
+
+ static {
+ hashTranslator.put("http://www.w3.org/2000/09/xmldsig#sha1", "SHA-1");
+ hashTranslator.put("http://www.w3.org/2001/04/xmldsig-more#sha224", "SHA-224");
+ hashTranslator.put("http://www.w3.org/2001/04/xmlenc#sha256", "SHA-256");
+ hashTranslator.put("http://www.w3.org/2001/04/xmldsig-more#sha384", "SHA-384");
+ hashTranslator.put("http://www.w3.org/2001/04/xmlenc#sha512", "SHA-512");
+ hashTranslator.put("http://www.w3.org/2001/04/xmlenc#ripemd160", "RIPEMD-160");
+ }
+
+ private static final Logger logger = LoggerFactory.getLogger(BaseVerifier.class);
+
+ protected boolean compareHash(byte[] reference, byte[] calculated, String refName) {
+ String referenceHex = Hex.encodeHexString(reference);
+ String calculatedHex = Hex.encodeHexString(calculated);
+ if(Arrays.equals(reference, calculated)) {
+ logger.info("Digest from manifest do match for {}", refName);
+ return true;
+ } else {
+ logger.info("Digest from manifest do not match for {}", refName);
+ logger.info("Digest from manifest for {} : {}", refName, referenceHex);
+ logger.info("Digest from calculated for {} : {}", refName, calculatedHex);
+ return false;
+ }
+ }
+
+ protected MessageDigest getMessageDigestFromURI(String uri) {
+ try {
+
+ String algo = hashTranslator.get(uri);
+
+ if(algo == null) {
+ algo = uri;
+ }
+
+ return MessageDigest.getInstance(algo);
+ } catch (NoSuchAlgorithmException e) {
+ return null;
+ }
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/CAdESVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/CAdESVerifier.java
new file mode 100644
index 0000000..5ab677c
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/CAdESVerifier.java
@@ -0,0 +1,43 @@
+package at.gv.egiz.asic.impl.verifier;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+
+import java.io.InputStream;
+import java.util.Date;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public abstract class CAdESVerifier extends BaseVerifier {
+ @Override
+ public boolean handles(ASiC asic) {
+ return asic.isCAdES();
+ }
+
+ protected VerifyCMSSignatureResponse runCMSVerification(InputStream signedData, InputStream cmsSignature,
+ String trustProfileID, Date date) throws MOAException {
+ CMSContent cmsContent = SPSSFactory.getInstance().createCMSContent(signedData);
+ CMSDataObject cmsDataObject = SPSSFactory.getInstance().createCMSDataObject(null, cmsContent, null, null);
+
+ VerifyCMSSignatureRequest verifyCMSSignatureRequest =
+ SPSSFactory.getInstance().createVerifyCMSSignatureRequest(
+ VerifyCMSSignatureRequest.ALL_SIGNATORIES,
+ date,
+ cmsSignature,
+ cmsDataObject,
+ trustProfileID,
+ false,
+ true);
+
+ VerifyCMSSignatureResponse verifyResponse = CMSSignatureVerificationInvoker.getInstance().verifyCMSSignature(
+ verifyCMSSignatureRequest);
+ return verifyResponse;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedCAdESVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedCAdESVerifier.java
new file mode 100644
index 0000000..e71f263
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedCAdESVerifier.java
@@ -0,0 +1,168 @@
+package at.gv.egiz.asic.impl.verifier;
+
+import at.gv.egiz.asic.ASiCManifestType;
+import at.gv.egiz.asic.DataObjectReferenceType;
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.*;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+import org.apache.commons.codec.binary.Hex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.xml.bind.JAXB;
+import java.io.IOException;
+import java.security.DigestInputStream;
+import java.security.MessageDigest;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class ExtendedCAdESVerifier extends CAdESVerifier {
+
+ private static final Logger logger = LoggerFactory.getLogger(ExtendedCAdESVerifier.class);
+
+ @Override
+ public boolean handles(ASiC asic) {
+ return super.handles(asic) && ASiCFormat.ASiCE.equals(asic.getFormat());
+ }
+
+ @Override
+ public void verify(ASiC asic, String trustProfileID, Date date, List<ASiCVerificationResult> response) throws MOAException {
+ try {
+ Iterator<ASiCEntry> informationsIterator = asic.getInformationEntries().iterator();
+
+ while (informationsIterator.hasNext()) {
+ ASiCEntry informationEntry = informationsIterator.next();
+
+ if (informationEntry.getEntryName().startsWith("META-INF/") && informationEntry.getEntryName().endsWith(".xml")
+ && informationEntry.getEntryName().contains("ASiCManifest")) {
+ // Got ASiC Manifest
+ ASiCManifestType asiCManifestType = JAXB.unmarshal(informationEntry.getContents(), ASiCManifestType.class);
+ String signatureName = asiCManifestType.getSigReference().getURI();
+
+ ASiCEntry cadesSignature = null;
+
+ // find referenced signature
+ Iterator<ASiCEntry> cadesSignatureIterator = asic.getSignaturesEntries().iterator();
+
+ while (cadesSignatureIterator.hasNext()) {
+ ASiCEntry tmpCadesSignature = cadesSignatureIterator.next();
+ if (signatureName.equalsIgnoreCase(tmpCadesSignature.getEntryName())) {
+ cadesSignature = tmpCadesSignature;
+ break;
+ }
+ }
+
+ if (cadesSignature == null) {
+ throw new MOAApplicationException("asic.0004", new Object[]{signatureName});
+ }
+
+ // verify all references
+
+ boolean allReferencesValid = true;
+ List<String> signedFiles = new ArrayList<String>();
+ Iterator<DataObjectReferenceType> dataObjectReferenceTypeIterator = asiCManifestType.getDataObjectReference().iterator();
+ while (dataObjectReferenceTypeIterator.hasNext()) {
+ DataObjectReferenceType dataObjectReferenceType = dataObjectReferenceTypeIterator.next();
+
+ String mdURI = dataObjectReferenceType.getDigestMethod().getAlgorithm();
+ String uri = dataObjectReferenceType.getURI();
+ signedFiles.add(uri);
+
+ Iterator<ASiCEntry> dataEntryIterator = asic.getDataEntries().iterator();
+
+ while (dataEntryIterator.hasNext()) {
+ ASiCEntry dataEntry = dataEntryIterator.next();
+ if (uri.equalsIgnoreCase(dataEntry.getEntryName())) {
+ MessageDigest md = this.getMessageDigestFromURI(mdURI);
+ if (md == null) {
+ throw new MOAApplicationException("asic.0005", new Object[]{mdURI});
+ }
+ DigestInputStream dis = new DigestInputStream(dataEntry.getContents(), md);
+ byte[] buffer = new byte[8096];
+ while (dis.read(buffer) > 0) ;
+
+ if (!this.compareHash(dataObjectReferenceType.getDigestValue(), md.digest(), uri)) {
+ allReferencesValid = false;
+ }
+
+ dataEntry.getContents().reset();
+ break;
+ }
+ }
+ }
+
+ if (allReferencesValid) {
+ logger.info("ASiCManifest {} references do match data files!",
+ informationEntry.getEntryName());
+ }
+
+ informationEntry.getContents().reset();
+ MessageDigest md = this.getMessageDigestFromURI("SHA-256");
+ DigestInputStream dis = new DigestInputStream(informationEntry.getContents(), md);
+
+ VerifyCMSSignatureResponse verifyResponse =
+ this.runCMSVerification(dis, cadesSignature.getContents(), trustProfileID, date);
+
+ dis.close();
+
+ String fullDigest = Hex.encodeHexString(md.digest());
+ logger.info("CMS Input data {}", fullDigest);
+
+ if (!allReferencesValid) {
+ logger.warn("ASiCManifest {} References do not match data files!",
+ informationEntry.getEntryName());
+ List responseElements = new ArrayList();
+
+ SignerInfo signerInfo;
+
+
+ // add SignerInfo element
+ Iterator responseElementIterator = verifyResponse.getResponseElements().iterator();
+ while (responseElementIterator.hasNext()) {
+ VerifyCMSSignatureResponseElement orig = (VerifyCMSSignatureResponseElement)
+ responseElementIterator.next();
+
+ CheckResult signatureCheck;
+ CheckResult certificateCheck;
+
+ // add SignatureCheck element
+ signatureCheck = SPSSFactory.getInstance().createCheckResult(1, null);
+
+ // build the response element
+ VerifyCMSSignatureResponseElement responseElement =
+ SPSSFactory.getInstance().createVerifyCMSSignatureResponseElement(
+ orig.getSignerInfo(),
+ signatureCheck,
+ orig.getCertificateCheck(),
+ orig.getAdESFormResults(),
+ orig.getExtendedCertificateCheck());
+ responseElements.add(responseElement);
+ }
+ VerifyCMSSignatureResponse verifyCMSSignatureResponse = SPSSFactory.getInstance().
+ createVerifyCMSSignatureResponse(responseElements);
+ response.add(new ASiCVerificationResult(signedFiles, verifyCMSSignatureResponse));
+ continue;
+ } else {
+ response.add(new ASiCVerificationResult(signedFiles, verifyResponse));
+ }
+ }
+ }
+ } catch (IOException ex) {
+ throw new MOASystemException("asic.0003", null, ex);
+ }
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedXAdESVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedXAdESVerifier.java
new file mode 100644
index 0000000..58f0185
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/ExtendedXAdESVerifier.java
@@ -0,0 +1,184 @@
+package at.gv.egiz.asic.impl.verifier;
+
+import at.gv.egiz.asic.ReferenceType;
+import at.gv.egiz.asic.SignatureType;
+import at.gv.egiz.asic.XAdESSignaturesType;
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOARuntimeException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+import at.gv.egovernment.moaspss.util.URLEncoder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.*;
+import org.xml.sax.SAXException;
+
+import javax.xml.bind.*;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.*;
+import java.util.*;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class ExtendedXAdESVerifier extends XAdESVerifier {
+
+ private static final Logger logger = LoggerFactory.getLogger(ExtendedXAdESVerifier.class);
+
+ private void resetStream(InputStream is) {
+ try {
+ is.reset();
+ } catch (IOException e) {
+ throw new MOARuntimeException("Failed to reset inputStream", null, e);
+ }
+ }
+
+ @Override
+ public void verify(ASiC asic, String trustProfileID, Date date, List<ASiCVerificationResult> response) throws MOAException {
+ try {
+ Iterator<ASiCEntry> xadesSignatureIterator = asic.getSignaturesEntries().iterator();
+
+ while (xadesSignatureIterator.hasNext()) {
+ ASiCEntry xadesSignature = xadesSignatureIterator.next();
+
+ List<SignatureType> xmlSignatures = null;
+ //int signatureSize = 0;
+
+
+ // TODO: support not only XAdESSignaturesType object 4.4.3.2
+// XAdESSignaturesType xAdESSignaturesType = JAXB.unmarshal(xadesSignature.getContents(), XAdESSignaturesType.class);
+ // signatureSize = xAdESSignaturesType.getSignature().size();
+
+ // this.resetStream(xadesSignature.getContents());
+ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+ dbFactory.setNamespaceAware(true);
+ //dbFactory.setValidating(true);
+ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
+ Document doc = dBuilder.parse(xadesSignature.getContents());
+
+ this.resetStream(xadesSignature.getContents());
+
+ org.w3c.dom.Element rootElement = doc.getDocumentElement();
+
+ if ("http://www.w3.org/2000/09/xmldsig#".equals(rootElement.getNamespaceURI()) &&
+ "Signature".equals(rootElement.getTagName())) {
+ JAXBContext jc = JAXBContext.newInstance("at.gv.egiz.asic");
+ JAXBElement<SignatureType> xmlSignatureJaxb = jc.createUnmarshaller().unmarshal(rootElement, SignatureType.class);
+ SignatureType xmlSignature = xmlSignatureJaxb.getValue();
+ xmlSignatures = new ArrayList<SignatureType>();
+ xmlSignatures.add(xmlSignature);
+ } else if ("http://uri.etsi.org/02918/v1.2.1#".equals(rootElement.getNamespaceURI()) &&
+ "XAdESSignatures".equals(rootElement.getLocalName())) {
+ XAdESSignaturesType xAdESSignaturesType = JAXB.unmarshal(xadesSignature.getContents(), XAdESSignaturesType.class);
+ xmlSignatures = xAdESSignaturesType.getSignature();
+ } else {
+ NodeList childrenNodes = rootElement.getChildNodes();
+ for(int i = 0; i < childrenNodes.getLength(); i++) {
+ Node node = childrenNodes.item(i);
+ JAXBContext jc = JAXBContext.newInstance("at.gv.egiz.asic");
+ xmlSignatures = new ArrayList<SignatureType>();
+ if ("http://www.w3.org/2000/09/xmldsig#".equals(node.getNamespaceURI()) &&
+ "Signature".equals(rootElement.getTagName())) {
+ JAXBElement<SignatureType> xmlSignatureJaxb = jc.createUnmarshaller().unmarshal(rootElement, SignatureType.class);
+ SignatureType xmlSignature = xmlSignatureJaxb.getValue();
+ xmlSignatures.add(xmlSignature);
+ }
+ }
+ }
+
+
+ this.resetStream(xadesSignature.getContents());
+
+ Map namespaces = new HashMap();
+
+ //namespaces.put("asic", "http://uri.etsi.org/02918/v1.2.1#");
+ namespaces.put("ds", "http://www.w3.org/2000/09/xmldsig#");
+
+ for (int i = 0; i < xmlSignatures.size(); i++) {
+ //NodeList nodes = (NodeList) result;
+
+ //for(int i = 0; i < nodes.getLength(); i++) {
+ //Node node = nodes.item(i);
+ //JAXBContext jc = JAXBContext.newInstance( "at.gv.egiz.asic" );
+ //JAXBElement<SignatureType> xmlSignatureJaxb = jc.createUnmarshaller().unmarshal(node, SignatureType.class);
+ //SignatureType xmlSignature = xmlSignatureJaxb.getValue();
+ List<String> signedFiles = new ArrayList<String>();
+
+ //Iterator<ReferenceType> it = xmlSignature.getSignedInfo().getReference().iterator();
+ Iterator<ReferenceType> it = xmlSignatures.get(i).getSignedInfo().getReference().iterator();
+ while (it.hasNext()) {
+ ReferenceType refType = it.next();
+ if (!refType.getURI().startsWith("#")) {
+ signedFiles.add(refType.getURI());
+ }
+ }
+
+ Iterator<ASiCEntry> dataEntryIterator = asic.getDataEntries().iterator();
+
+ Content content = SPSSFactory.getInstance().createContent(xadesSignature.getContents(), null);
+
+ List supplementsList = new ArrayList();
+ while (dataEntryIterator.hasNext()) {
+ ASiCEntry dataEntry = dataEntryIterator.next();
+ dataEntry.getContents().reset();
+ String entryName = URLEncoder.encode(dataEntry.getEntryName(), "UTF-8")
+ .replaceAll("\\+", "%20")
+ .replaceAll("\\%21", "!")
+ .replaceAll("\\%2F", "/")
+ //.replaceAll("\\%27", "'")
+ //.replaceAll("\\%28", "(")
+ //.replaceAll("\\%29", ")")
+ .replaceAll("\\%7E", "~");
+ logger.info("Adding Entry : {}", entryName);
+ Content dataContent = SPSSFactory.getInstance().createContent(dataEntry.getContents(), entryName);
+ XMLDataObjectAssociation association = SPSSFactoryImpl.getInstance().createXMLDataObjectAssociation(null, dataContent);
+ SupplementProfile profile = SPSSFactoryImpl.getInstance().createSupplementProfile(association);
+ supplementsList.add(profile);
+ }
+ String location = "(//ds:Signature)[" + (i + 1) + "]";
+
+ VerifySignatureLocation verifySignatureLocation = SPSSFactory.getInstance().createVerifySignatureLocation(
+ location, namespaces);
+
+ VerifySignatureInfo verifySignatureInfo = SPSSFactory.getInstance().createVerifySignatureInfo(content, verifySignatureLocation);
+
+ VerifyXMLSignatureRequest verifyXMLSignatureRequest = SPSSFactory.getInstance().createVerifyXMLSignatureRequest(
+ date, verifySignatureInfo, supplementsList, null, false, trustProfileID, true);
+
+ response.add(new ASiCVerificationResult(signedFiles,
+ XMLSignatureVerificationInvoker.getInstance().verifyXMLSignature(verifyXMLSignatureRequest)));
+ }
+ }
+ } catch( UnsupportedEncodingException e) {
+ logger.error("UTF8 encoding not supported by system. MOA will not work on this system!", e);
+ throw new MOARuntimeException("asic.0003", null, e);
+ } catch (IOException ex) {
+ throw new MOASystemException("asic.0003", null, ex);
+ } catch (ParserConfigurationException e) {
+ throw new MOASystemException("asic.0003", null, e);
+ } catch (SAXException e) {
+ throw new MOASystemException("asic.0003", null, e);
+ } catch (JAXBException e) {
+ throw new MOASystemException("asic.0003", null, e);
+ }
+ }
+
+ @Override
+ public boolean handles(ASiC asic) {
+ return super.handles(asic) && ASiCFormat.ASiCE.equals(asic.getFormat());
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleCAdESVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleCAdESVerifier.java
new file mode 100644
index 0000000..b86e290
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleCAdESVerifier.java
@@ -0,0 +1,45 @@
+package at.gv.egiz.asic.impl.verifier;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class SimpleCAdESVerifier extends CAdESVerifier {
+ @Override
+ public boolean handles(ASiC asic) {
+ return super.handles(asic) && ASiCFormat.ASiCS.equals(asic.getFormat());
+ }
+
+ @Override
+ public void verify(ASiC asic, String trustProfileID, Date date, List<ASiCVerificationResult> response) throws MOAException {
+ ASiCEntry cadesSignature = asic.getSignaturesEntries().get(0);
+
+ ASiCEntry dataEntry = asic.getDataEntries().get(0);
+
+ List<String> signedFiles = new ArrayList<String>();
+ signedFiles.add(dataEntry.getEntryName());
+
+ VerifyCMSSignatureResponse verifyResponse =
+ this.runCMSVerification(dataEntry.getContents(), cadesSignature.getContents(), trustProfileID, date);
+
+ response.add(new ASiCVerificationResult(signedFiles,
+ verifyResponse));
+ }
+
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleXAdESVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleXAdESVerifier.java
new file mode 100644
index 0000000..a71462c
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/SimpleXAdESVerifier.java
@@ -0,0 +1,128 @@
+package at.gv.egiz.asic.impl.verifier;
+
+import at.gv.egiz.asic.ReferenceType;
+import at.gv.egiz.asic.XAdESSignaturesType;
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOARuntimeException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+import at.gv.egovernment.moaspss.util.URLEncoder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.xml.bind.JAXB;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.*;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public class SimpleXAdESVerifier extends XAdESVerifier {
+
+ private static final Logger logger = LoggerFactory.getLogger(SimpleXAdESVerifier.class);
+
+
+ @Override
+ public void verify(ASiC asic, String trustProfileID, Date date, List<ASiCVerificationResult> response) throws MOAException {
+ // XAdES
+ try {
+ ASiCEntry xadesSignature = asic.getSignaturesEntries().get(0);
+
+ XAdESSignaturesType xAdESSignaturesType = null;
+ try {
+ xAdESSignaturesType = JAXB.unmarshal(xadesSignature.getContents(), XAdESSignaturesType.class);
+ } catch (Throwable ex) {
+ logger.warn("Failed to process xml signature: ex");
+ throw new MOAApplicationException("asic.0003", null, ex);
+ }
+
+ if (xAdESSignaturesType == null) {
+ throw new MOAApplicationException("asic.0003", null);
+ }
+
+ int signatureSize = xAdESSignaturesType.getSignature().size();
+
+ try {
+ xadesSignature.getContents().reset();
+ } catch (IOException e) {
+ throw new MOARuntimeException("asic.0003", null, e);
+ }
+ Map namespaces = new HashMap();
+
+ namespaces.put("asic", "http://uri.etsi.org/02918/v1.2.1#");
+ namespaces.put("ds", "http://www.w3.org/2000/09/xmldsig#");
+
+ for (int i = 0; i < signatureSize; i++) {
+
+ List<String> signedFiles = new ArrayList<String>();
+
+ Iterator<ReferenceType> it = xAdESSignaturesType.getSignature().get(i).getSignedInfo().getReference().iterator();
+ while (it.hasNext()) {
+ ReferenceType refType = it.next();
+ if (!refType.getURI().startsWith("#")) {
+ signedFiles.add(refType.getURI());
+ }
+ }
+
+ boolean addAll = signedFiles.isEmpty() && asic.getDataEntries().size() == 1;
+
+ Iterator<ASiCEntry> dataEntryIterator = asic.getDataEntries().iterator();
+
+ Content content = SPSSFactory.getInstance().createContent(xadesSignature.getContents(), null);
+ List supplementsList = new ArrayList();
+ while (dataEntryIterator.hasNext()) {
+ ASiCEntry dataEntry = dataEntryIterator.next();
+ String uriName = URLEncoder.encode(dataEntry.getEntryName(), "UTF-8")
+ .replaceAll("\\+", "%20")
+ .replaceAll("\\%21", "!")
+ .replaceAll("\\%27", "'")
+ //.replaceAll("\\%28", "(")
+ //.replaceAll("\\%29", ")")
+ .replaceAll("\\%7E", "~");
+
+ Content dataContent = SPSSFactory.getInstance().createContent(dataEntry.getContents(), uriName);
+ XMLDataObjectAssociation association = SPSSFactoryImpl.getInstance().createXMLDataObjectAssociation(null, dataContent);
+ SupplementProfile profile = SPSSFactoryImpl.getInstance().createSupplementProfile(association);
+ supplementsList.add(profile);
+
+ if (addAll) {
+ signedFiles.add(dataEntry.getEntryName());
+ }
+ }
+ String location = "(//ds:Signature)[" + (i + 1) + "]";
+
+ VerifySignatureLocation verifySignatureLocation = SPSSFactory.getInstance().createVerifySignatureLocation(
+ location, namespaces);
+
+ VerifySignatureInfo verifySignatureInfo = SPSSFactory.getInstance().createVerifySignatureInfo(content, verifySignatureLocation);
+
+ VerifyXMLSignatureRequest verifyXMLSignatureRequest = SPSSFactory.getInstance().createVerifyXMLSignatureRequest(
+ date, verifySignatureInfo, supplementsList, null, false, trustProfileID, true);
+
+ response.add(new ASiCVerificationResult(signedFiles,
+ XMLSignatureVerificationInvoker.getInstance().verifyXMLSignature(verifyXMLSignatureRequest)));
+ }
+ } catch(UnsupportedEncodingException e) {
+ logger.error("UTF8 encoding not supported by system. MOA will not work on this system!", e);
+ throw new MOARuntimeException("asic.0003", null, e);
+ }
+ }
+
+ @Override
+ public boolean handles(ASiC asic) {
+ return super.handles(asic) && ASiCFormat.ASiCS.equals(asic.getFormat());
+ }
+} \ No newline at end of file
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/XAdESVerifier.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/XAdESVerifier.java
new file mode 100644
index 0000000..904ad4e
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/impl/verifier/XAdESVerifier.java
@@ -0,0 +1,54 @@
+package at.gv.egiz.asic.impl.verifier;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCEntry;
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl;
+import at.gv.egovernment.moa.spss.api.xmlverify.*;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+
+import java.io.InputStream;
+import java.util.*;
+
+/**
+ * Created by Andreas Fitzek on 6/17/16.
+ */
+public abstract class XAdESVerifier extends BaseVerifier {
+ @Override
+ public boolean handles(ASiC asic) {
+ return asic.isXAdES();
+ }
+
+ protected VerifyXMLSignatureResponse runXMLVerification(InputStream signedData, InputStream xmlSignature,
+ String trustProfileID, Date date, List supplementsList,
+ String location, Map namespaces) throws MOAException {
+
+ if(namespaces == null) {
+ namespaces = new HashMap();
+
+ namespaces.put("asic", "http://uri.etsi.org/02918/v1.2.1#");
+ namespaces.put("ds", "http://www.w3.org/2000/09/xmldsig#");
+ }
+
+ Content content = SPSSFactory.getInstance().createContent(xmlSignature, null);
+
+ VerifySignatureLocation verifySignatureLocation = SPSSFactory.getInstance().createVerifySignatureLocation(
+ location, namespaces);
+
+ VerifySignatureInfo verifySignatureInfo = SPSSFactory.getInstance().createVerifySignatureInfo(content, verifySignatureLocation);
+
+ VerifyXMLSignatureRequest verifyXMLSignatureRequest = SPSSFactory.getInstance().createVerifyXMLSignatureRequest(
+ date, verifySignatureInfo, supplementsList, null, false, trustProfileID, true);
+
+ return XMLSignatureVerificationInvoker.getInstance().verifyXMLSignature(verifyXMLSignatureRequest);
+ }
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureRequestParser.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureRequestParser.java
new file mode 100644
index 0000000..c06e30e
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureRequestParser.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2003 Federal Chancellery Austria
+ * MOA-SPSS has been developed in a cooperation between BRZ, the Federal
+ * Chancellery Austria - ICT staff unit, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+
+
+package at.gv.egiz.asic.xmlbind;
+
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlbind.RequestParserUtils;
+import at.gv.egovernment.moaspss.util.*;
+import org.w3c.dom.Element;
+
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.StringTokenizer;
+
+/**
+ * A parser to parse <code>VerifyCMSSignatureRequest</code> DOM trees into
+ * <code>VerifyCMSSignatureRequest</code> API objects.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyASICSignatureRequestParser {
+
+ //
+ // XPath expressions for selecting parts of the DOM message
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String DATE_TIME_XPATH = MOA + "DateTime";
+ private static final String EXTENDED_VALIDATION_XPATH = MOA + "ExtendedValidation";
+ private static final String ASIC_SIGNATURE_XPATH = MOA + "ASICSignature";
+ private static final String ASIC_EXTENSION_XPATH = MOA + "ASICExtension";
+ private static final String TRUST_PROFILE_ID_XPATH = MOA + "TrustProfileID";
+
+
+ /** The <code>SPSSFactory</code> for creating new API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /**
+ * Parse a <code>VerifyCMSSignatureRequest</code> DOM element, as defined
+ * by the MOA schema.
+ *
+ * @param requestElem The <code>VerifyCMSSignatureRequest</code> to parse. The
+ * request must have been successfully parsed against the schema for this
+ * method to succeed.
+ * @return A <code>VerifyCMSSignatureRequest</code> API objects containing
+ * the data from the DOM element.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public VerifyASiCRequest parseASIC(Element requestElem)
+ throws MOAApplicationException {
+ Date dateTime =
+ RequestParserUtils.parseDateTime(requestElem, DATE_TIME_XPATH);
+
+ boolean extendedValidation =
+ RequestParserUtils.parseExtendedValidation(requestElem, EXTENDED_VALIDATION_XPATH, false);
+
+ String asicSignatureStr =
+ XPathUtils.getElementValue(requestElem, ASIC_SIGNATURE_XPATH, "");
+
+ String asicExtensionStr =
+ XPathUtils.getElementValue(requestElem, ASIC_EXTENSION_XPATH, "");
+
+ String trustProfileID =
+ XPathUtils.getElementValue(requestElem, TRUST_PROFILE_ID_XPATH, null);
+ //Logger.info("CMSSignature: " + cmsSignatureStr);
+ InputStream asicSignature =
+ Base64Utils.decodeToStream(asicSignatureStr, true);
+
+ ASiCFormat format = null;
+
+ if("asics".equalsIgnoreCase(asicExtensionStr) || "scs".equalsIgnoreCase(asicExtensionStr)
+ || "application/vnd.etsi.asic-s+zip".equalsIgnoreCase(asicExtensionStr)) {
+ format = ASiCFormat.ASiCS;
+ } else if("asice".equalsIgnoreCase(asicExtensionStr) || "sce".equalsIgnoreCase(asicExtensionStr)
+ || "application/vnd.etsi.asic-e+zip".equalsIgnoreCase(asicExtensionStr)) {
+ format = ASiCFormat.ASiCE;
+ }
+
+ return new VerifyASiCRequest(format, dateTime, asicSignature, trustProfileID, extendedValidation);
+ }
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureResponseBuilder.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureResponseBuilder.java
new file mode 100644
index 0000000..781a081
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASICSignatureResponseBuilder.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2003 Federal Chancellery Austria
+ * MOA-SPSS has been developed in a cooperation between BRZ, the Federal
+ * Chancellery Austria - ICT staff unit, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+
+
+package at.gv.egiz.asic.xmlbind;
+
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.xmlbind.ResponseBuilderUtils;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlverify.AdESFormResults;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureResponseBuilder;
+import at.gv.egovernment.moaspss.util.Constants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Convert a <code>VerifyCMSSignatureResponse</code> API object into its
+ * XML representation, according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyASICSignatureResponseBuilder {
+ /** The XML document containing the response element. */
+ private Document responseDoc;
+ /** The response <code>VerifyCMSSignatureResponse</code> DOM element. */
+ private Element responseElem;
+
+ /**
+ * Create a new <code>VerifyCMSSignatureResponseBuilder</code>:
+ *
+ * @throws MOASystemException An error occurred setting up the resulting
+ * XML document.
+ */
+ public VerifyASICSignatureResponseBuilder() throws MOASystemException {
+ responseDoc =
+ ResponseBuilderUtils.createResponse("VerifyASICSignatureResponse");
+ responseElem = responseDoc.getDocumentElement();
+ }
+
+ /**
+ * Build a document containing a <code>VerifyCMSSignatureResponse</code>
+ * DOM element being the XML representation of the given
+ * <code>VerifyCMSSignatureResponse</code> API object.
+ *
+ * @param response The <code>VerifyCMSSignatureResponse</code> to convert
+ * to XML.
+ * @return A document containing the <code>VerifyCMSSignatureResponse</code>
+ * DOM element.
+ * @throws MOAApplicationException An error occurred building the response.
+ */
+ public Document build(List<ASiCVerificationResult> results)
+ throws MOAException {
+
+ Iterator<ASiCVerificationResult> iter = results.iterator();
+
+ while(iter.hasNext()) {
+ ASiCVerificationResult aSiCVerificationResult = iter.next();
+ addASiCResultElement(aSiCVerificationResult);
+ }
+
+ return responseDoc;
+ }
+
+ private void addASiCResultElement(ASiCVerificationResult aSiCVerificationResult)
+ throws MOAException {
+ Element asiCSignatureResultElem = responseDoc.createElementNS(Constants.MOA_NS_URI, "ASiCSignatureResult");
+
+ Iterator<String> signedFiles = aSiCVerificationResult.getSignedFiles().iterator();
+ while (signedFiles.hasNext()) {
+ String signedFile = signedFiles.next();
+ Element signedFilesElem = responseDoc.createElementNS(Constants.MOA_NS_URI, "signedFiles");
+ signedFilesElem.setTextContent(signedFile);
+ asiCSignatureResultElem.appendChild(signedFilesElem);
+ }
+
+ if(aSiCVerificationResult.getXmlResult() != null) {
+ VerifyXMLSignatureResponseBuilder verifyXMLSignatureResponseBuilder = new VerifyXMLSignatureResponseBuilder(this.responseDoc, "XMLSignatureResult");
+ asiCSignatureResultElem.appendChild(verifyXMLSignatureResponseBuilder.buildElement(aSiCVerificationResult.getXmlResult()));
+ } else if(aSiCVerificationResult.getCmsResult() != null) {
+ VerifyCMSSignatureResponseBuilder verifyCMSSignatureResponseBuilder = new VerifyCMSSignatureResponseBuilder(this.responseDoc, "CMSSignatureResult");
+ asiCSignatureResultElem.appendChild(verifyCMSSignatureResponseBuilder.buildElement(aSiCVerificationResult.getCmsResult()));
+ }
+
+ responseElem.appendChild(asiCSignatureResultElem);
+ }
+
+ /**
+ * Add an element to the response.
+ *
+ * @param responseElement The element to add to the response.
+ * @throws MOAApplicationException An error occurred adding the element.
+ */
+ private void addResponseElement(VerifyCMSSignatureResponseElement responseElement)
+ throws MOAApplicationException {
+
+ SignerInfo signerInfo = responseElement.getSignerInfo();
+ CheckResult signatureCheck = responseElement.getSignatureCheck();
+ CheckResult certCheck = responseElement.getCertificateCheck();
+
+ ResponseBuilderUtils.addSignerInfo(
+ responseDoc,
+ responseElem,
+ signerInfo.getSignerCertificate(),
+ signerInfo.isQualifiedCertificate(),
+ signerInfo.getQCSource(),
+ signerInfo.isPublicAuthority(),
+ signerInfo.getPublicAuhtorityID(),
+ signerInfo.isSSCD(),
+ signerInfo.getSSCDSource(),
+ signerInfo.getIssuerCountryCode());
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "SignatureCheck",
+ signatureCheck.getCode(),
+ signatureCheck.getInfo());
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "CertificateCheck",
+ certCheck.getCode(),
+ certCheck.getInfo());
+
+
+ if (responseElement.getAdESFormResults() != null) {
+
+ Iterator formIterator = responseElement.getAdESFormResults().iterator();
+
+ while (formIterator.hasNext()) {
+ AdESFormResults adESFormResult = (AdESFormResults) formIterator.next();
+ // add the CertificateCheck
+ ResponseBuilderUtils.addFormCheckElement(responseDoc, responseElem, "FormCheckResult",
+ adESFormResult.getCode().intValue(), adESFormResult.getName());
+
+ }
+ }
+
+ if(responseElement.getExtendedCertificateCheck() != null) {
+ ResponseBuilderUtils.addExtendendResult(responseDoc, responseElem, responseElement.getExtendedCertificateCheck());
+ }
+
+ }
+
+}
diff --git a/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASiCRequest.java b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASiCRequest.java
new file mode 100644
index 0000000..37584a6
--- /dev/null
+++ b/moaSig/moa-asic/src/main/java/at/gv/egiz/asic/xmlbind/VerifyASiCRequest.java
@@ -0,0 +1,46 @@
+package at.gv.egiz.asic.xmlbind;
+
+import at.gv.egiz.asic.api.ASiCFormat;
+
+import java.io.InputStream;
+import java.util.Date;
+
+/**
+ * Created by Andreas Fitzek on 6/16/16.
+ */
+public class VerifyASiCRequest {
+ private Date date;
+ private InputStream asicInput;
+ private String trustProfile;
+ private ASiCFormat format;
+ private boolean extendedValidation;
+
+
+ public VerifyASiCRequest(ASiCFormat format, Date date, InputStream asicInput, String trustProfile, boolean extendedValidation) {
+ this.format = format;
+ this.date = date;
+ this.asicInput = asicInput;
+ this.trustProfile = trustProfile;
+ this.extendedValidation = extendedValidation;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public InputStream getAsicInput() {
+ return asicInput;
+ }
+
+ public String getTrustProfile() {
+ return trustProfile;
+ }
+
+ public ASiCFormat getFormat() {
+ return format;
+ }
+
+ public boolean isExtendedValidation() {
+ return extendedValidation;
+ }
+}
diff --git a/moaSig/moa-asic/src/main/resources/schemas/asic.xsd b/moaSig/moa-asic/src/main/resources/schemas/asic.xsd
new file mode 100644
index 0000000..d6d3534
--- /dev/null
+++ b/moaSig/moa-asic/src/main/resources/schemas/asic.xsd
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+ targetNamespace="http://uri.etsi.org/02918/v1.2.1#"
+ xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+ xmlns="http://uri.etsi.org/02918/v1.2.1#"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+ <xsd:import
+ namespace="http://www.w3.org/2000/09/xmldsig#"
+ schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
+
+ <xsd:element name="ASiCManifest" type="ASiCManifestType">
+ <xsd:annotation>
+ <xsd:documentation>Schema for ASiCManifest – See ETSI EN 319 162</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ASiCManifestType">
+ <xsd:sequence>
+ <xsd:element ref="SigReference"/>
+ <xsd:element ref="DataObjectReference" maxOccurs="unbounded"/>
+ <xsd:element name="ASiCManifestExtensions" type="ExtensionsListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="SigReference" type="SigReferenceType"/>
+ <xsd:complexType name="SigReferenceType">
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="MimeType" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ <xsd:element name="DataObjectReference" type="DataObjectReferenceType"/>
+ <xsd:complexType name="DataObjectReferenceType">
+ <xsd:sequence>
+ <xsd:element ref="ds:DigestMethod"/>
+ <xsd:element ref="ds:DigestValue"/>
+ <xsd:element name="DataObjectReferenceExtensions" type="ExtensionsListType"
+ minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required" />
+ <xsd:attribute name="MimeType" type="xsd:string" use="optional" />
+ <xsd:attribute name="Rootfile" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ <xsd:complexType name="AnyType" mixed="true">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:any processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="Extension" type="ExtensionType"/>
+ <xsd:complexType name="ExtensionType">
+ <xsd:complexContent>
+ <xsd:extension base="AnyType">
+ <xsd:attribute name="Critical" type="xsd:boolean" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ExtensionsListType">
+ <xsd:sequence>
+ <xsd:element ref="Extension" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="XAdESSignatures" type="XAdESSignaturesType">
+ <xsd:annotation>
+ <xsd:documentation>Schema for parallel detached XAdES Signatures </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="XAdESSignaturesType">
+ <xsd:sequence>
+ <xsd:element ref="ds:Signature" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema> \ No newline at end of file
diff --git a/moaSig/moa-asic/src/test/java/at/gv/egiz/asic/dev/Main.java b/moaSig/moa-asic/src/test/java/at/gv/egiz/asic/dev/Main.java
new file mode 100644
index 0000000..5005a3b
--- /dev/null
+++ b/moaSig/moa-asic/src/test/java/at/gv/egiz/asic/dev/Main.java
@@ -0,0 +1,238 @@
+package at.gv.egiz.asic.dev;
+
+import at.gv.egiz.asic.api.ASiC;
+import at.gv.egiz.asic.api.ASiCFactory;
+import at.gv.egiz.asic.api.ASiCFormat;
+import at.gv.egiz.asic.api.ASiCVerificationResult;
+import at.gv.egiz.asic.impl.ASiCMOAVerifier;
+import at.gv.egiz.asic.xmlbind.VerifyASICSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.init.SystemInitializer;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionIDGenerator;
+import at.gv.egovernment.moaspss.logging.LoggingContext;
+import at.gv.egovernment.moaspss.logging.LoggingContextManager;
+import at.gv.egovernment.moaspss.util.DOMUtils;
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.StringWriter;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Created by Andreas Fitzek on 6/15/16.
+ */
+public class Main {
+
+ private static final Logger logger = LoggerFactory.getLogger(Main.class);
+
+ private static void verify(String filename, boolean showInfo, boolean showCertificate, boolean showXML, ASiCMOAVerifier v)
+ throws Throwable{
+ logger.info("========================================================================================");
+ logger.info("Running ASiC Verification for {}", filename);
+ logger.info("========================================================================================");
+
+ ASiCFormat format = null;
+
+ if (filename.endsWith("asics") || filename.endsWith("scs")) {
+ format = ASiCFormat.ASiCS;
+ } else if (filename.endsWith("asice") || filename.endsWith("sce")) {
+ format = ASiCFormat.ASiCE;
+ }
+
+ ASiC aSiC = ASiCFactory.parseASiC(new FileInputStream(filename), format);
+
+ logger.info("Build ASIC-S: {}", aSiC);
+
+
+ List<ASiCVerificationResult> results = v.verify(aSiC, "Test-Signaturdienste", null);
+
+ if (results != null) {
+ for (int i = 0; i < results.size(); i++) {
+ ASiCVerificationResult aSiCVerificationResult = results.get(i);
+
+ if (showInfo) {
+ // Auswertung der Response
+ System.out.println();
+ System.out.println("Ergebnisse der Signaturprüfung:");
+ System.out.println();
+
+ // Auswertung der Response
+ System.out.println();
+ System.out.println("Signierte Eintraege");
+ Iterator<String> signedFilesIterator = aSiCVerificationResult.getSignedFiles().iterator();
+ while (signedFilesIterator.hasNext()) {
+ System.out.println(" " + signedFilesIterator.next());
+ }
+ System.out.println();
+ }
+ if (aSiCVerificationResult.getXmlResult() != null) {
+ VerifyXMLSignatureResponse verifyResponse = aSiCVerificationResult.getXmlResult();
+
+ // Ergebnisse von Signatur- und Zertifikatsprüfung
+ System.out.println();
+ System.out.println("Ergebniscode der Signaturprüfung: " + verifyResponse.getSignatureCheck().getCode());
+ System.out.println("Ergebniscode der Zertifikatsprüfung: " + verifyResponse.getCertificateCheck().getCode());
+
+ // Besondere Eigenschaften des Signatorzertifikats
+ SignerInfo signerInfo = verifyResponse.getSignerInfo();
+
+ if (showCertificate) {
+ showSignerInfo(signerInfo);
+ }
+ } else if (aSiCVerificationResult.getCmsResult() != null) {
+ VerifyCMSSignatureResponse verifyResponse = aSiCVerificationResult.getCmsResult();
+
+ Iterator responses = verifyResponse.getResponseElements().iterator();
+ while (responses.hasNext()) {
+ Object response = responses.next();
+ VerifyCMSSignatureResponseElement verifyCMS = (VerifyCMSSignatureResponseElement) response;
+
+ // Besondere Eigenschaften des Signatorzertifikats
+ SignerInfo signerInfo = verifyCMS.getSignerInfo();
+
+ // Ergebnisse von Signatur- und Zertifikatsprüfung
+ System.out.println();
+ System.out.println("Ergebniscode der Signaturprüfung: " + verifyCMS.getSignatureCheck().getCode());
+ System.out.println("Ergebniscode der Zertifikatsprüfung: " + verifyCMS.getCertificateCheck().getCode());
+
+
+ if (showCertificate) {
+ showSignerInfo(signerInfo);
+ }
+ }
+ }
+ }
+
+ if (showXML) {
+ showXMLResponse(results);
+ }
+ }
+ }
+
+
+ private static void runAllPlugtests(boolean showInfo, boolean showCertificate, boolean showXML, ASiCMOAVerifier v) {
+ Iterator<File> filesIterator = FileUtils.iterateFiles(new File("/home/afitzek/Documents/PlugTest-2016/sig_data/ESIG-A/"),
+ new String[]{"asics", "asice", "scs", "sce"}, true);
+
+ int total = 0;
+ int ok = 0;
+ int failed = 0;
+
+ while (filesIterator.hasNext()) {
+ //for(int j = 0; j < testInputs.length; j++) {
+ //String filename = testInputs[j];
+ String filename = filesIterator.next().getAbsolutePath();
+ total++;
+ try {
+ verify(filename, showInfo, showCertificate, showXML, v);
+ ok++;
+ } catch (Throwable e) {
+ failed++;
+ logger.error("Verification failed! {}", e.getMessage(), e);
+ }
+ }
+
+ logger.info("Total {} / OK {} / ERROR {}", total, ok, failed);
+ }
+
+ private static void runSpecific(boolean showInfo, boolean showCertificate, boolean showXML, ASiCMOAVerifier v) {
+ String testInput2 = "/home/afitzek/Documents/PlugTest-2016/sig_data/ESIG-A/BG_BOR/Signature-A-BG_BOR-2.asics";
+
+ String testInput = "/home/afitzek/Documents/PlugTest-2016/sig_data/ESIG-A/HU_MIC/Signature-A-HU_MIC-1.asics";
+ String testInputCMS = "/home/afitzek/Documents/PlugTest-2016/sig_data/ESIG-A/LU_NOW/Signature-A-LU_NOW-2.asics";
+ String testInputE = "/home/afitzek/Documents/PlugTest-2016/sig_data/ESIG-A/EE_SER/Signature-A-EE_SER-35.asice";
+ String testInputECMS = "/home/afitzek/Documents/PlugTest-2016/sig_data/ESIG-A/HU_POL/Signature-A-HU_POL-16.asice";
+
+ try {
+ verify(testInputE, showInfo, showCertificate, showXML, v);
+ } catch (Throwable e) {
+ logger.error("Verification failed! {}", e.getMessage(), e);
+ }
+ }
+
+ public static void main(String[] args) {
+ try {
+ boolean showCertificate = true;
+ boolean showXML = true;
+ boolean showInfo = true;
+ System.setProperty("moa.spss.server.configuration", "/home/afitzek/server/moa-spss/apache-tomcat-8.0.0-RC3/conf/moa-spss/spss.config.xml");
+ System.setProperty("iaik.esi.sva.configuration.location", "/home/afitzek/server/moa-spss/apache-tomcat-8.0.0-RC3/conf/moa-spss/svaconfig.example");
+
+ SystemInitializer.init();
+
+ //String[] testInputs = new String[] {testInput, testInputCMS, testInputE, testInput2, testInputECMS};
+ //ASiCFormat[] formats = new ASiCFormat[] {null, null, null, null, ASiCFormat.ASiCE};
+
+ ConfigurationProvider configuration = ConfigurationProvider.getInstance();
+
+ TransactionContext context = new TransactionContext(TransactionIDGenerator.nextID(), null,
+ configuration, null, null);
+
+ TransactionContextManager tcm = TransactionContextManager.getInstance();
+ tcm.setTransactionContext(context);
+
+ ASiCMOAVerifier v = new ASiCMOAVerifier();
+
+ // set the logging context in the LoggingContextManager
+ LoggingContextManager lcm = LoggingContextManager.getInstance();
+ LoggingContext lc = new LoggingContext(context.getTransactionID());
+ lcm.setLoggingContext(lc);
+
+ runSpecific(showInfo, showCertificate, showXML, v);
+
+ //runAllPlugtests(showInfo, showCertificate, showXML, v);
+
+ //ASiC aSiCE = ASiCFactory.parseASiC(new FileInputStream(testInputE), ASiCFormat.ASiCE);
+
+ //logger.info("Build ASIC-E: {}", aSiCE);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void showXMLResponse(List<ASiCVerificationResult> results) throws Exception {
+ VerifyASICSignatureResponseBuilder builder = new VerifyASICSignatureResponseBuilder();
+ Document doc = builder.build(results);
+
+ TransformerFactory tf = TransformerFactory.newInstance();
+ Transformer transformer = tf.newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ StringWriter writer = new StringWriter();
+ transformer.transform(new DOMSource(doc), new StreamResult(writer));
+ String output = writer.getBuffer().toString().replaceAll("\n|\r", "");
+
+ System.out.println("XML Response: " + output);
+ }
+
+ private static void showSignerInfo(SignerInfo signerInfo) {
+ // Signatorzertifikat
+ System.out.println("*** Ist Zertifikat des Signators qualifiziert? " + ((signerInfo.isQualifiedCertificate()) ? "ja" : "nein"));
+ System.out.println("*** Ist Zertifikat des Signators von einer Behörde? " + ((signerInfo.isPublicAuthority()) ? "ja" : "nein"));
+
+ System.out.println();
+ System.out.println("*** Zertifikat des Signators:");
+ System.out.println("Aussteller: " + signerInfo.getSignerCertificate().getIssuerDN());
+ System.out.println("Subject: " + signerInfo.getSignerCertificate().getSubjectDN());
+ System.out.println("Seriennummer: " + signerInfo.getSignerCertificate().getSerialNumber());
+ }
+}
diff --git a/moaSig/moa-asic/src/test/resources/META-INF/aop.xml b/moaSig/moa-asic/src/test/resources/META-INF/aop.xml
new file mode 100644
index 0000000..161da84
--- /dev/null
+++ b/moaSig/moa-asic/src/test/resources/META-INF/aop.xml
@@ -0,0 +1,11 @@
+<aspectj>
+ <aspects>
+ <aspect name="at.gv.egovernment.moa.spss.server.webservice.impl.ContextSetupAspect" />
+ </aspects>
+
+ <!-- <weaver options="-verbose -debug -showWeaveInfo"> -->
+ <weaver>
+ <include within="at.gv.egovernment.moa.spss.server.webservice.impl.*" />
+ </weaver>
+
+</aspectj> \ No newline at end of file
diff --git a/moaSig/moa-asic/src/test/resources/log4j.properties b/moaSig/moa-asic/src/test/resources/log4j.properties
new file mode 100644
index 0000000..c730896
--- /dev/null
+++ b/moaSig/moa-asic/src/test/resources/log4j.properties
@@ -0,0 +1,16 @@
+#
+# Sample log4j configuration for the MOA-SPSS web service
+#
+
+# commons-logging setup
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
+
+# Configure root logger and loggers for moa-spss
+log4j.rootLogger=WARN, stdout
+log4j.logger.at.gv.egiz=INFO, stdout
+#log4j.logger.at.gv.egovernment=WARN, stdout
+log4j.additivity.at.gv.egiz=false
+# Configure the 'stdout' appender to write logging output to the console
+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 | %m%n