summaryrefslogtreecommitdiff
path: root/utils/src/main/java/at
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-01-25 14:37:08 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-01-25 14:37:08 +0000
commit696ba8b0c7384e3dd2aecc8a8f96a9bc3f97f867 (patch)
tree9262dcfd6b9bd4aed49c372f9a52ba0628d3c2e3 /utils/src/main/java/at
parent485f57969094548dcc5baff48925d8121b92aab5 (diff)
downloadmocca-696ba8b0c7384e3dd2aecc8a8f96a9bc3f97f867.tar.gz
mocca-696ba8b0c7384e3dd2aecc8a8f96a9bc3f97f867.tar.bz2
mocca-696ba8b0c7384e3dd2aecc8a8f96a9bc3f97f867.zip
Create empty SignaturePolicyImplied Element
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1018 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'utils/src/main/java/at')
-rw-r--r--utils/src/main/java/at/gv/egiz/xades/QualifyingProperties1_4Factory.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/src/main/java/at/gv/egiz/xades/QualifyingProperties1_4Factory.java b/utils/src/main/java/at/gv/egiz/xades/QualifyingProperties1_4Factory.java
index 1ac0ce7d..db5e2c1d 100644
--- a/utils/src/main/java/at/gv/egiz/xades/QualifyingProperties1_4Factory.java
+++ b/utils/src/main/java/at/gv/egiz/xades/QualifyingProperties1_4Factory.java
@@ -43,6 +43,8 @@ import javax.xml.crypto.dsig.DigestMethod;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import org.etsi.uri._01903.v1_3.CertIDListType;
import org.etsi.uri._01903.v1_3.CertIDType;
@@ -55,6 +57,7 @@ import org.etsi.uri._01903.v1_3.SignedPropertiesType;
import org.etsi.uri._01903.v1_3.SignedSignaturePropertiesType;
import org.w3._2000._09.xmldsig_.DigestMethodType;
import org.w3._2000._09.xmldsig_.X509IssuerSerialType;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import at.gv.egiz.marshal.MarshallerFactory;
@@ -197,7 +200,13 @@ public class QualifyingProperties1_4Factory {
// SignaturePolicy
SignaturePolicyIdentifierType signaturePolicyIdentifierType = qpFactory_v1_3.createSignaturePolicyIdentifierType();
- signaturePolicyIdentifierType.setSignaturePolicyImplied("");
+ try {
+ Element e = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument().createElement("SignaturePolicyImplied");
+ signaturePolicyIdentifierType.setSignaturePolicyImplied(e);
+ } catch (ParserConfigurationException e1) {
+ //Should not fail
+ throw new RuntimeException(e1);
+ }
signedSignaturePropertiesType.setSignaturePolicyIdentifier(signaturePolicyIdentifierType);
// SignedProperties