summaryrefslogtreecommitdiff
path: root/utils/src/test
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-08-29 12:11:34 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-08-29 12:11:34 +0000
commit32d17447a258188b2d534bcb0bf65a659ba7b7d0 (patch)
tree4ad8bb267eb29f7091a7da283f6d7eec1e2188e1 /utils/src/test
downloadmocca-32d17447a258188b2d534bcb0bf65a659ba7b7d0.tar.gz
mocca-32d17447a258188b2d534bcb0bf65a659ba7b7d0.tar.bz2
mocca-32d17447a258188b2d534bcb0bf65a659ba7b7d0.zip
Initial import.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'utils/src/test')
-rw-r--r--utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java49
-rw-r--r--utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java57
-rw-r--r--utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java194
-rw-r--r--utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java88
-rw-r--r--utils/src/test/requests/CreateCMSSignatureRequest01.xml14
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest01.xml27
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml3
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml5
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest02.xml304
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml1
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt164
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest03.xml10
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml1
-rw-r--r--utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt3
-rw-r--r--utils/src/test/resources/commons-logging.properties1
-rw-r--r--utils/src/test/resources/log4j.properties19
16 files changed, 940 insertions, 0 deletions
diff --git a/utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java b/utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java
new file mode 100644
index 00000000..5d1a0fcf
--- /dev/null
+++ b/utils/src/test/java/at/gv/egiz/bku/utils/HexDumpTest.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egiz.bku.utils;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Random;
+
+import org.junit.Test;
+
+public class HexDumpTest {
+
+ @Test
+ public void testHexDump() throws IOException {
+
+ byte[] bytes = new byte[734];
+ int i = 0;
+ for (; i < 256; i++) {
+ bytes[i] = (byte) i;
+ }
+
+ Random random = new Random();
+ for (; i < bytes.length; i++) {
+ bytes[i] = (byte) random.nextInt();
+ }
+
+ PrintWriter writer = new PrintWriter(System.out);
+ HexDump.hexDump(new ByteArrayInputStream(bytes), writer, 32);
+ writer.flush();
+
+ }
+
+
+}
diff --git a/utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java b/utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java
new file mode 100644
index 00000000..e89f6137
--- /dev/null
+++ b/utils/src/test/java/at/gv/egiz/idlink/CompressIdentityLink.java
@@ -0,0 +1,57 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egiz.idlink;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.xml.bind.JAXBException;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import at.buergerkarte.namespaces.personenbindung._20020506_.CompressedIdentityLinkType;
+import at.gv.egiz.bku.utils.HexDump;
+import at.gv.egiz.idlink.ans1.IdentityLink;
+
+public class CompressIdentityLink {
+
+ /**
+ * @param args
+ * @throws JAXBException
+ * @throws IOException
+ */
+ public static void main(String[] args) throws JAXBException, IOException {
+
+ FileInputStream fis = new FileInputStream(args[0]);
+ Source source = new StreamSource(fis);
+
+ CompressedIdentityLinkFactory factory = CompressedIdentityLinkFactory.getInstance();
+
+ CompressedIdentityLinkType compressedIdentity = factory.unmarshallCompressedIdentityLink(source);
+
+ IdentityLink idLink = factory.createIdLink(compressedIdentity);
+
+ FileOutputStream outputStream = new FileOutputStream("idlink.bin");
+ outputStream.write(idLink.toByteArray());
+ outputStream.close();
+
+ }
+
+}
diff --git a/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java b/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java
new file mode 100644
index 00000000..99d353ac
--- /dev/null
+++ b/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java
@@ -0,0 +1,194 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package at.gv.egiz.slbinding;
+
+import at.buergerkarte.namespaces.securitylayer._1.Base64XMLLocRefOptRefContentType;
+import javax.xml.bind.JAXBException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureRequestType;
+import at.buergerkarte.namespaces.securitylayer._1.DataObjectAssociationType;
+import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType;
+import at.buergerkarte.namespaces.securitylayer._1.MetaInfoType;
+import at.buergerkarte.namespaces.securitylayer._1.SignatureInfoCreationType;
+import at.buergerkarte.namespaces.securitylayer._1.TransformsInfoType;
+import at.gv.egiz.slbinding.impl.SignatureLocationType;
+import at.gv.egiz.slbinding.impl.XMLContentType;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Iterator;
+import java.util.List;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLInputFactory;
+
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author clemens
+ */
+public class RedirectTest {
+
+ public static final String FILENAME_REQ = "src/test/requests/CreateXMLSignatureRequest02.xml";
+ public static final String FILENAME_REQ_SCHEMA = "src/main/schema/Core-1.2.xsd";
+
+ /**
+ * Context path for unmarshaller (colon separated list of generated packages)
+ */
+ @Before
+ public void setUp() throws JAXBException {
+ }
+
+ @Test
+ public void testRedirect() {
+ try {
+ String slPkg = at.buergerkarte.namespaces.securitylayer._1.ObjectFactory.class.getPackage().getName();
+ String dsigPkg = org.w3._2000._09.xmldsig_.ObjectFactory.class.getPackage().getName();
+
+ JAXBContext jaxbContext = JAXBContext.newInstance(slPkg + ":" + dsigPkg);
+ Unmarshaller um = jaxbContext.createUnmarshaller();
+
+// SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+// File schemaFile = new File(FILENAME_REQ_SCHEMA);
+// Schema TestRequestLaxSchema = schemaFactory.newSchema(schemaFile);
+// // validate request
+// um.setSchema(TestRequestLaxSchema);
+
+
+ FileInputStream fis = new FileInputStream(FILENAME_REQ);
+ InputStream is = new BufferedInputStream(fis);
+
+ XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ XMLEventReader reader = inputFactory.createXMLEventReader(is);
+ final RedirectEventFilter contentFilter = new RedirectEventFilter();
+ XMLEventReader filteredReader = inputFactory.createFilteredReader(reader, contentFilter);
+
+ um.setListener(new RedirectUnmarshallerListener(contentFilter));
+
+// List<Class> redirectTriggers = Arrays.asList(new Class[]{XMLContentType.class, TransformsType.class});
+// Set<Class<? extends RedirectCallback>> redirectTriggers = new HashSet<Class<? extends RedirectCallback>>(); //{XMLContentType.class, TransformsType.class
+// redirectTriggers.add(XMLContentType.class);
+// redirectTriggers.add(TransformsType.class);
+// ByteArrayRedirectCallback.registerRedirectTriggers(redirectTriggers);
+//
+// Set<Class<? extends RedirectCallback>> preserveNSContextTriggers = new HashSet<Class<? extends RedirectCallback>>();
+//// preserveNSContextTriggers.add(TransformsType.class);
+// preserveNSContextTriggers.add(SignatureInfoCreationType.SignatureLocation.class);
+// ByteArrayRedirectCallback.registerPreserveContextTriggers(preserveNSContextTriggers);
+
+ JAXBElement<CreateXMLSignatureRequestType> req = (JAXBElement<CreateXMLSignatureRequestType>) um.unmarshal(filteredReader);
+ is.close();
+
+ FileOutputStream fos = new FileOutputStream(FILENAME_REQ + "_redirect.txt");
+ OutputStream os = new BufferedOutputStream(fos);
+
+ CreateXMLSignatureRequestType request = req.getValue();
+ List<DataObjectInfoType> dataObjectInfos = request.getDataObjectInfo();
+ Iterator<DataObjectInfoType> doiIt = dataObjectInfos.iterator();
+ while (doiIt.hasNext()) {
+ DataObjectInfoType doi = doiIt.next();
+ Base64XMLLocRefOptRefContentType dataObj = doi.getDataObject();
+ XMLContentType dataObjXML = (XMLContentType) dataObj.getXMLContent();
+ if (dataObjXML != null) {
+ System.out.println("found at.gv.egiz.slbinding.impl.XMLContentType DataObject");
+ ByteArrayOutputStream xmlContent = dataObjXML.getRedirectedStream();
+ assertNotNull(xmlContent);
+ os.write(xmlContent.toByteArray());
+ os.write("\n\n\n".getBytes());
+ }
+
+ List<TransformsInfoType> transformsInfos = doi.getTransformsInfo();
+ Iterator<TransformsInfoType> tiIt = transformsInfos.iterator();
+ while (tiIt.hasNext()) {
+ at.gv.egiz.slbinding.impl.TransformsInfoType ti = (at.gv.egiz.slbinding.impl.TransformsInfoType) tiIt.next();
+ assertNotNull(ti);
+ System.out.println("found at.gv.egiz.slbinding.impl.TransformsInfoType TransformsInfo");
+ ByteArrayOutputStream dsigTransforms = ti.getRedirectedStream();
+ os.write(dsigTransforms.toByteArray());
+ os.write("\n".getBytes());
+
+ MetaInfoType mi = ti.getFinalDataMetaInfo();
+ assertNotNull(mi);
+ assertNull(ti.getTransforms());
+
+ }
+ List<DataObjectAssociationType> supplements = doi.getSupplement();
+ if (supplements != null) {
+ Iterator<DataObjectAssociationType> doaIt = supplements.iterator();
+ while (doaIt.hasNext()) {
+ System.out.println("found Supplement");
+ }
+ }
+ }
+ SignatureInfoCreationType si = request.getSignatureInfo();
+ if (si != null) {
+// Base64XMLOptRefContentType sigEnv = si.getSignatureEnvironment();
+// XMLContentType sigEnvXML = sigEnv.getXMLContent();
+// if (sigEnvXML != null) {
+// System.out.println("found SignatureEnvironment XMLContent");
+// ByteArrayOutputStream xmlContent = sigEnvXML.getRedirectedStream();
+// os.write(xmlContent.toByteArray());
+// os.write("\n".getBytes());
+// }
+//
+// SignatureInfoCreationType.SignatureLocation sigLocation = si.getSignatureLocation();
+ SignatureLocationType sigLocation = (SignatureLocationType) si.getSignatureLocation();
+ assertNotNull(sigLocation);
+ System.out.println("found at.gv.egiz.slbinding.impl.SignatureLocationType SignatureLocation");
+
+ NamespaceContext ctx = sigLocation.getNamespaceContext();
+ assertNotNull(ctx);
+ String samlNS = ctx.getNamespaceURI("saml");
+ assertEquals(samlNS, "urn:oasis:names:tc:SAML:2.0:assertion");
+ System.out.println("found preserved namespace xmlns:saml " + samlNS);
+
+ }
+ os.flush();
+ os.close();
+
+ fos = new FileOutputStream(FILENAME_REQ + "_bound.xml");
+ os = new BufferedOutputStream(fos);
+
+ Marshaller m = jaxbContext.createMarshaller();
+ m.marshal(req, os);
+
+ os.flush();
+ os.close();
+
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+
+
+ }
+}
diff --git a/utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java b/utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java
new file mode 100644
index 00000000..1e0ce916
--- /dev/null
+++ b/utils/src/test/java/at/gv/egiz/urldereferencer/FormDataTest.java
@@ -0,0 +1,88 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egiz.urldereferencer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import at.gv.egiz.bku.utils.StreamUtil;
+import at.gv.egiz.bku.utils.urldereferencer.FormDataURLSupplier;
+import at.gv.egiz.bku.utils.urldereferencer.SimpleFormDataContextImpl;
+import at.gv.egiz.bku.utils.urldereferencer.StreamData;
+import at.gv.egiz.bku.utils.urldereferencer.URLDereferencer;
+import at.gv.egiz.bku.utils.urldereferencer.URLDereferencerContext;
+
+public class FormDataTest implements FormDataURLSupplier {
+
+ protected URLDereferencerContext urlCtx;
+ protected InputStream testStream = null;
+ protected String contentType = null;
+ protected String paramName = "";
+
+ @Override
+ public InputStream getFormData(String parameterName) {
+ if (paramName.equals(parameterName)) {
+ return testStream;
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public String getFormDataContentType(String parameterName) {
+ if (paramName.equals(parameterName)) {
+ return contentType;
+ } else {
+ return null;
+ }
+ }
+
+ @Before
+ public void setUp() {
+ urlCtx = new SimpleFormDataContextImpl(this);
+ }
+
+ @Test(expected = MalformedURLException.class)
+ public void testInvalidFormdataUrl() throws IOException {
+ String url = "abs://whatknowi";
+ StreamData sd = URLDereferencer.getInstance().dereference(url, urlCtx);
+ assertNull(sd);
+ url = ":://whatknowi";
+ sd = URLDereferencer.getInstance().dereference(url, urlCtx);
+ assertNull(sd);
+ url = "";
+ sd = URLDereferencer.getInstance().dereference(url, urlCtx);
+ }
+
+ @Test
+ public void testFormData() throws IOException {
+ paramName = "Müllcontainer";
+ String url = "formdata:"+paramName;
+ StreamData sd = URLDereferencer.getInstance().dereference(url, urlCtx);
+ assertNull(sd);
+ testStream = new ByteArrayInputStream("HelloWorld".getBytes("UTF-8"));
+ sd = URLDereferencer.getInstance().dereference(url, urlCtx);
+ String result = StreamUtil.asString(sd.getStream(), "UTF-8");
+ assertEquals("HelloWorld", result);
+ }
+}
diff --git a/utils/src/test/requests/CreateCMSSignatureRequest01.xml b/utils/src/test/requests/CreateCMSSignatureRequest01.xml
new file mode 100644
index 00000000..1406c1dd
--- /dev/null
+++ b/utils/src/test/requests/CreateCMSSignatureRequest01.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateCMSSignatureRequest xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.buergerkarte.at/namespaces/securitylayer/1.2# file:/home/clemens/IAIK/BKU2/svn/bku/utils/src/main/schema/Core-1.2.xsd" Structure="detached">
+ <KeyboxIdentifier></KeyboxIdentifier>
+ <DataObject>
+ <MetaInfo>
+ <MimeType></MimeType>
+ </MetaInfo>
+ <Content>
+ <Base64Content></Base64Content>
+ </Content>
+ </DataObject>
+</CreateCMSSignatureRequest>
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest01.xml b/utils/src/test/requests/CreateXMLSignatureRequest01.xml
new file mode 100644
index 00000000..72633ff7
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest01.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.buergerkarte.at/namespaces/securitylayer/1.2# file:/home/clemens/IAIK/BKU2/SLCore-1.2.xsd">
+ <KeyboxIdentifier/>
+ <DataObjectInfo Structure="enveloping">
+ <DataObject>
+ <XMLContent>
+ <PayloadRoot>
+ <!-- whitespaces are preserved -->
+ <PayloadChild>line
+ feed</PayloadChild>
+ </PayloadRoot>
+ </XMLContent>
+ </DataObject>
+ <TransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="transformalgorithm"/>
+ </dsig:Transforms>
+ <FinalDataMetaInfo>
+ <MimeType/>
+ <Description/>
+ </FinalDataMetaInfo>
+ </TransformsInfo>
+ </DataObjectInfo>
+ </CreateXMLSignatureRequest>
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml b/utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml
new file mode 100644
index 00000000..7cd28d68
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest01_bound.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CreateXMLSignatureRequest xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#"><KeyboxIdentifier></KeyboxIdentifier><DataObjectInfo Structure="enveloping"><DataObject><XMLContent>
+
+ </XMLContent></DataObject><TransformsInfo><ns2:Transforms><ns2:Transform Algorithm="transformalgorithm"></ns2:Transform></ns2:Transforms><FinalDataMetaInfo><MimeType></MimeType><Description></Description></FinalDataMetaInfo></TransformsInfo></DataObjectInfo></CreateXMLSignatureRequest> \ No newline at end of file
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml b/utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml
new file mode 100644
index 00000000..b6b1cdb8
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest01_redirect.xml
@@ -0,0 +1,5 @@
+<PayloadRoot>
+ <!-- whitespaces are preserved -->
+ <PayloadChild>line
+ feed</PayloadChild>
+ </PayloadRoot> \ No newline at end of file
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest02.xml b/utils/src/test/requests/CreateXMLSignatureRequest02.xml
new file mode 100644
index 00000000..943722b1
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest02.xml
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<sl:CreateXMLSignatureRequest xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
+ <sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier>
+ <sl:DataObjectInfo Structure="detached">
+ <sl:DataObject Reference=""/>
+ <sl:TransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ <style type="text/css" media="screen">
+ .boldstyle { font-weight: bold; }
+ .italicstyle { font-style: italic; }
+ .annotationstyle { font-size: 0.8em; }
+ </style>
+ </head>
+ <body>
+ <h1>Signatur der Anmeldedaten</h1>
+ <p/>
+ <h4>Mit meiner elektronischen Signatur beantrage ich, <span
+ class="boldstyle">
+ <xsl:value-of select="//@Issuer"/>
+ </span>, geboren am <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"
+ />, <xsl:if
+ test="//saml:Attribute[@AttributeName='OIDTextualDescription']"
+ > in der Rolle als <xsl:value-of
+ select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"
+ /> (OID***= <xsl:value-of
+ select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"
+ />), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
+ <p/>
+ <h4>Datum und Uhrzeit: <xsl:value-of
+ select="substring(//@IssueInstant,9,2)"/>. <xsl:value-of
+ select="substring(//@IssueInstant,6,2)"/>. <xsl:value-of
+ select="substring(//@IssueInstant,1,4)"/>, <xsl:value-of
+ select="substring(//@IssueInstant,12,2)"/>:
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"
+ />: <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
+ </h4>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <h4>HPI(**): <xsl:value-of
+ select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"
+ /></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <h4>wbPK(*): <xsl:value-of
+ select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"
+ /></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <hr/>
+ <h4>Ich bin weiters ermächtigt als <xsl:value-of
+ select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"
+ /> von <xsl:value-of
+ select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
+ <xsl:if
+ test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']"
+ >, geboren am <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"
+ />
+ </xsl:if>
+ <xsl:if
+ test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']"
+ >, <xsl:value-of
+ select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"
+ />
+ </xsl:if>, in deren Auftrag zu handeln. <xsl:if
+ test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of
+ select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"
+ /></h4>
+ </xsl:if>
+ </h4>
+ <p/>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="//saml:Attribute[@AttributeName='OID']">
+ <p/>
+ <hr/>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
+ <p/>
+ <hr/>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
+ <p/>
+ <hr/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <div class="annotationstyle">(*) wbPK: Das <span
+ class="italicstyle">wirtschaftsbereichsspezifische
+ Personenkennzeichen</span> wird aus den jeweiligen
+ Stammzahlen des Bürgers und des Wirtschaftsunternehmens
+ berechnet und ermöglicht eine eindeutige Zuordnung des
+ Bürgers zum Wirtschaftsunternehmen.</div>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <div class="annotationstyle">(**) HPI: Der <span
+ class="italicstyle">eHealth Professional
+ Identifier</span> wird aus den jeweiligen Stammzahlen
+ der Gesundheitsdiensteanbieterinnen /
+ Gesundheitsdiensteanbieter berechnet und ermöglicht eine
+ eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
+ des Gesundheitsdiensteanbieters im
+ Gesundheitsbereich.</div>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OID']">
+ <div class="annotationstyle">(***) OID: <span
+ class="italicstyle">Object Identifier</span> sind
+ standardisierte Objekt-Bezeichner und beschreiben
+ eindeutig die Rollen des GDA-Token Inhabers.</div>
+ </xsl:if>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform
+ Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
+ </dsig:Transforms>
+ <sl:FinalDataMetaInfo>
+ <sl:MimeType>application/xhtml+xml</sl:MimeType>
+ </sl:FinalDataMetaInfo>
+ </sl:TransformsInfo>
+ <sl:TransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">
+ <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ </head>
+ <body>
+ <h1>Signatur der Anmeldedaten</h1>
+ <p/>
+ <h4>Mit meiner elektronischen Signatur beantrage ich, <b>
+ <xsl:value-of select="//@Issuer"/>
+ </b>, geboren am <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"
+ />, <xsl:if
+ test="//saml:Attribute[@AttributeName='OIDTextualDescription']"
+ > in der Rolle als <xsl:value-of
+ select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"
+ /> (OID***= <xsl:value-of
+ select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"
+ />), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
+ <p/>
+ <h4>Datum und Uhrzeit: <xsl:value-of
+ select="substring(//@IssueInstant,9,2)"/>. <xsl:value-of
+ select="substring(//@IssueInstant,6,2)"/>. <xsl:value-of
+ select="substring(//@IssueInstant,1,4)"/>, <xsl:value-of
+ select="substring(//@IssueInstant,12,2)"/>:
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"
+ />: <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
+ </h4>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <h4>HPI(**): <xsl:value-of
+ select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"
+ /></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <h4>wbPK(*): <xsl:value-of
+ select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"
+ /></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <hr/>
+ <h4>Ich bin weiters ermächtigt als <xsl:value-of
+ select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"
+ /> von <xsl:value-of
+ select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
+ <xsl:if
+ test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']"
+ >, geboren am <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"
+ />. <xsl:value-of
+ select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"
+ />
+ </xsl:if>
+ <xsl:if
+ test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']"
+ >, <xsl:value-of
+ select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"
+ />
+ </xsl:if>, in deren Auftrag zu handeln. <xsl:if
+ test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of
+ select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"
+ /></h4>
+ </xsl:if>
+ </h4>
+ <p/>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="//saml:Attribute[@AttributeName='OID']">
+ <p/>
+ <hr/>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
+ <p/>
+ <hr/>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
+ <p/>
+ <hr/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <h6>(*) wbPK: Das <i>wirtschaftsbereichsspezifische
+ Personenkennzeichen</i> wird aus den jeweiligen
+ Stammzahlen des Bürgers und des Wirtschaftsunternehmens
+ berechnet und ermöglicht eine eindeutige Zuordnung des
+ Bürgers zum Wirtschaftsunternehmen.</h6>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <h6>(**) HPI: Der <i>eHealth Professional Identifier</i>
+ wird aus den jeweiligen Stammzahlen der
+ Gesundheitsdiensteanbieterinnen /
+ Gesundheitsdiensteanbieter berechnet und ermöglicht eine
+ eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
+ des Gesundheitsdiensteanbieters im
+ Gesundheitsbereich.</h6>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OID']">
+ <h6>(***) OID: <i>Object Identifier</i> sind standardisierte
+ Objekt-Bezeichner und beschreiben eindeutig die Rollen
+ des GDA-Token Inhabers.</h6>
+ </xsl:if>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform
+ Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
+ </dsig:Transforms>
+ <sl:FinalDataMetaInfo>
+ <sl:MimeType>text/html</sl:MimeType>
+ </sl:FinalDataMetaInfo>
+ </sl:TransformsInfo>
+ </sl:DataObjectInfo>
+ <sl:SignatureInfo>
+ <sl:SignatureEnvironment>
+ <sl:XMLContent>
+ <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#"
+ MajorVersion="1" MinorVersion="0" AssertionID="any" Issuer="Klämens Örthäçké"
+ IssueInstant="2008-06-05T11:26:10+02:00">
+ <saml:AttributeStatement>
+ <saml:Subject>
+ <saml:NameIdentifier>https://demo.egiz.gv.at/exchange-moa-id-auth/</saml:NameIdentifier>
+ </saml:Subject>
+ <saml:Attribute AttributeName="wbPK"
+ AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <saml:AttributeValue>
+ <pr:Identification>
+ <pr:Value>LTpz8VYzns2jrx0J8Gm/R/nAhxA=</pr:Value>
+ <pr:Type>urn:publicid:gv.at:wbpk+FN+TODO</pr:Type>
+ </pr:Identification>
+ </saml:AttributeValue>
+ </saml:Attribute>
+ <saml:Attribute AttributeName="OA"
+ AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <saml:AttributeValue>https://apps.egiz.gv.at/urlaubsschein-frontend/moaid-login</saml:AttributeValue>
+ </saml:Attribute>
+ <saml:Attribute AttributeName="Geburtsdatum"
+ AttributeNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <saml:AttributeValue>1971-11-10</saml:AttributeValue>
+ </saml:Attribute>
+ </saml:AttributeStatement>
+ </saml:Assertion>
+ </sl:XMLContent>
+ </sl:SignatureEnvironment>
+ <sl:SignatureLocation Index="2" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">/saml:Assertion</sl:SignatureLocation>
+ </sl:SignatureInfo>
+</sl:CreateXMLSignatureRequest>
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml
new file mode 100644
index 00000000..de881c31
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_bound.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CreateXMLSignatureRequest xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#"><KeyboxIdentifier>SecureSignatureKeypair</KeyboxIdentifier><DataObjectInfo Structure="detached"><DataObject Reference=""/><TransformsInfo><FinalDataMetaInfo><MimeType>application/xhtml+xml</MimeType></FinalDataMetaInfo></TransformsInfo><TransformsInfo><FinalDataMetaInfo><MimeType>text/html</MimeType></FinalDataMetaInfo></TransformsInfo></DataObjectInfo><SignatureInfo><SignatureEnvironment><XMLContent></XMLContent></SignatureEnvironment><SignatureLocation Index="2">/saml:Assertion</SignatureLocation></SignatureInfo></CreateXMLSignatureRequest> \ No newline at end of file
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt
new file mode 100644
index 00000000..31be50b7
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest02.xml_redirect.txt
@@ -0,0 +1,164 @@
+<dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" version="1.0">
+ <xsl:template xmlns="http://www.w3.org/1999/xhtml" match="/">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ <style type="text/css" media="screen">
+ .boldstyle { font-weight: bold; }
+ .italicstyle { font-style: italic; }
+ .annotationstyle { font-size: 0.8em; }
+ </style>
+ </head>
+ <body>
+ <h1>Signatur der Anmeldedaten</h1>
+ <p></p>
+ <h4>Mit meiner elektronischen Signatur beantrage ich, <span class="boldstyle">
+ <xsl:value-of select="//@Issuer"></xsl:value-of>
+ </span>, geboren am <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"></xsl:value-of>, <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']"> in der Rolle als <xsl:value-of select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"></xsl:value-of> (OID***= <xsl:value-of select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"></xsl:value-of>), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
+ <p></p>
+ <h4>Datum und Uhrzeit: <xsl:value-of select="substring(//@IssueInstant,9,2)"></xsl:value-of>. <xsl:value-of select="substring(//@IssueInstant,6,2)"></xsl:value-of>. <xsl:value-of select="substring(//@IssueInstant,1,4)"></xsl:value-of>, <xsl:value-of select="substring(//@IssueInstant,12,2)"></xsl:value-of>:
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"></xsl:value-of>: <xsl:value-of select="substring(//@IssueInstant,18,2)"></xsl:value-of>
+ </h4>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <h4>HPI(**): <xsl:value-of select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"></xsl:value-of></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <h4>wbPK(*): <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"></xsl:value-of></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <hr></hr>
+ <h4>Ich bin weiters ermächtigt als <xsl:value-of select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"></xsl:value-of> von <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"></xsl:value-of>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']">, geboren am <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']">, <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"></xsl:value-of>
+ </xsl:if>, in deren Auftrag zu handeln. <xsl:if test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"></xsl:value-of></h4>
+ </xsl:if>
+ </h4>
+ <p></p>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="//saml:Attribute[@AttributeName='OID']">
+ <p></p>
+ <hr></hr>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
+ <p></p>
+ <hr></hr>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
+ <p></p>
+ <hr></hr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <div class="annotationstyle">(*) wbPK: Das <span class="italicstyle">wirtschaftsbereichsspezifische
+ Personenkennzeichen</span> wird aus den jeweiligen
+ Stammzahlen des Bürgers und des Wirtschaftsunternehmens
+ berechnet und ermöglicht eine eindeutige Zuordnung des
+ Bürgers zum Wirtschaftsunternehmen.</div>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <div class="annotationstyle">(**) HPI: Der <span class="italicstyle">eHealth Professional
+ Identifier</span> wird aus den jeweiligen Stammzahlen
+ der Gesundheitsdiensteanbieterinnen /
+ Gesundheitsdiensteanbieter berechnet und ermöglicht eine
+ eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
+ des Gesundheitsdiensteanbieters im
+ Gesundheitsbereich.</div>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OID']">
+ <div class="annotationstyle">(***) OID: <span class="italicstyle">Object Identifier</span> sind
+ standardisierte Objekt-Bezeichner und beschreiben
+ eindeutig die Rollen des GDA-Token Inhabers.</div>
+ </xsl:if>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"></dsig:Transform>
+ </dsig:Transforms>
+<dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" version="1.0">
+ <xsl:output indent="yes" encoding="UTF-8" method="xml" version="1.0"></xsl:output>
+ <xsl:template xmlns="http://www.w3.org/1999/xhtml" match="/">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ </head>
+ <body>
+ <h1>Signatur der Anmeldedaten</h1>
+ <p></p>
+ <h4>Mit meiner elektronischen Signatur beantrage ich, <b>
+ <xsl:value-of select="//@Issuer"></xsl:value-of>
+ </b>, geboren am <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"></xsl:value-of>, <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']"> in der Rolle als <xsl:value-of select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"></xsl:value-of> (OID***= <xsl:value-of select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"></xsl:value-of>), </xsl:if> den Zugang zur gesicherten Anwendung. </h4>
+ <p></p>
+ <h4>Datum und Uhrzeit: <xsl:value-of select="substring(//@IssueInstant,9,2)"></xsl:value-of>. <xsl:value-of select="substring(//@IssueInstant,6,2)"></xsl:value-of>. <xsl:value-of select="substring(//@IssueInstant,1,4)"></xsl:value-of>, <xsl:value-of select="substring(//@IssueInstant,12,2)"></xsl:value-of>:
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"></xsl:value-of>: <xsl:value-of select="substring(//@IssueInstant,18,2)"></xsl:value-of>
+ </h4>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <h4>HPI(**): <xsl:value-of select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"></xsl:value-of></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <h4>wbPK(*): <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"></xsl:value-of></h4>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <hr></hr>
+ <h4>Ich bin weiters ermächtigt als <xsl:value-of select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"></xsl:value-of> von <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"></xsl:value-of>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']">, geboren am <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"></xsl:value-of>. <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']">, <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"></xsl:value-of>
+ </xsl:if>, in deren Auftrag zu handeln. <xsl:if test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <h4>wbPK(*) des Vollmachtgebers: <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"></xsl:value-of></h4>
+ </xsl:if>
+ </h4>
+ <p></p>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="//saml:Attribute[@AttributeName='OID']">
+ <p></p>
+ <hr></hr>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='HPI']">
+ <p></p>
+ <hr></hr>
+ </xsl:when>
+ <xsl:when test="//saml:Attribute[@AttributeName='wbPK']">
+ <p></p>
+ <hr></hr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <h6>(*) wbPK: Das <i>wirtschaftsbereichsspezifische
+ Personenkennzeichen</i> wird aus den jeweiligen
+ Stammzahlen des Bürgers und des Wirtschaftsunternehmens
+ berechnet und ermöglicht eine eindeutige Zuordnung des
+ Bürgers zum Wirtschaftsunternehmen.</h6>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <h6>(**) HPI: Der <i>eHealth Professional Identifier</i>
+ wird aus den jeweiligen Stammzahlen der
+ Gesundheitsdiensteanbieterinnen /
+ Gesundheitsdiensteanbieter berechnet und ermöglicht eine
+ eindeutige Zuordnung der Gesundheitsdiensteanbieterin /
+ des Gesundheitsdiensteanbieters im
+ Gesundheitsbereich.</h6>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OID']">
+ <h6>(***) OID: <i>Object Identifier</i> sind standardisierte
+ Objekt-Bezeichner und beschreiben eindeutig die Rollen
+ des GDA-Token Inhabers.</h6>
+ </xsl:if>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"></dsig:Transform>
+ </dsig:Transforms>
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest03.xml b/utils/src/test/requests/CreateXMLSignatureRequest03.xml
new file mode 100644
index 00000000..c21fa6b1
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest03.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sl:CreateXMLSignatureRequest
+xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"
+xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+   <sl:DataObjectInfo Structure="enveloping">
+     <sl:DataObject>
+       <sl:XMLContent>I am a simple <funny>funny</funny> text.</sl:XMLContent>
+     </sl:DataObject>
+   </sl:DataObjectInfo>
+</sl:CreateXMLSignatureRequest> \ No newline at end of file
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml
new file mode 100644
index 00000000..31cc86df
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_bound.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CreateXMLSignatureRequest xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#"><DataObjectInfo Structure="enveloping"><DataObject><XMLContent></XMLContent></DataObject></DataObjectInfo></CreateXMLSignatureRequest> \ No newline at end of file
diff --git a/utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt
new file mode 100644
index 00000000..80a4dce3
--- /dev/null
+++ b/utils/src/test/requests/CreateXMLSignatureRequest03.xml_redirect.txt
@@ -0,0 +1,3 @@
+I am a simple <funny>funny</funny> text.
+
+
diff --git a/utils/src/test/resources/commons-logging.properties b/utils/src/test/resources/commons-logging.properties
new file mode 100644
index 00000000..29292562
--- /dev/null
+++ b/utils/src/test/resources/commons-logging.properties
@@ -0,0 +1 @@
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
diff --git a/utils/src/test/resources/log4j.properties b/utils/src/test/resources/log4j.properties
new file mode 100644
index 00000000..d9065c14
--- /dev/null
+++ b/utils/src/test/resources/log4j.properties
@@ -0,0 +1,19 @@
+# loglever DEBUG, appender STDOUT
+log4j.rootLogger=DEBUG, STDOUT
+#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT
+
+# STDOUT appender
+log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
+log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
+#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+log4j.appender.STDOUT.layout.ConversionPattern=%-5p %c %x- %m%n
+
+### FILE appender
+#log4j.appender.file=org.apache.log4j.RollingFileAppender
+#log4j.appender.file.maxFileSize=100KB
+#log4j.appender.file.maxBackupIndex=9
+#log4j.appender.file.File=egovbus_ca.log
+#log4j.appender.file.threshold=info
+#log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file