use of xades4j.properties.UnsignedProperties in project xades4j by luisgoncalves.
the class XadesSignatureFormatExtenderImplTest method testEnrichSignatureWithT.
@Test
public void testEnrichSignatureWithT() throws Exception {
System.out.println("enrichSignatureWithT");
Document doc = getDocument("document.signed.bes.xml");
Element signatureNode = (Element) doc.getElementsByTagNameNS(Constants.SignatureSpecNS, "Signature").item(0);
XadesSignatureFormatExtenderImpl instance = (XadesSignatureFormatExtenderImpl) new XadesFormatExtenderProfile().getFormatExtender();
XMLSignature sig = new XMLSignature(signatureNode, "");
Collection<UnsignedSignatureProperty> usp = new ArrayList<UnsignedSignatureProperty>(1);
usp.add(new SignatureTimeStampProperty());
instance.enrichSignature(sig, new UnsignedProperties(usp));
outputDocument(doc, "document.signed.bes.enriched.t.xml");
}
Aggregations