From 696ba8b0c7384e3dd2aecc8a8f96a9bc3f97f867 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 25 Jan 2012 14:37:08 +0000 Subject: Create empty SignaturePolicyImplied Element git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1018 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../java/at/gv/egiz/xades/QualifyingProperties1_4Factory.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'utils') 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 -- cgit v1.2.3