google-code-export / openesignforms

Automatically exported from code.google.com/p/openesignforms
1 stars 0 forks source link

Digital signature fails with Java 7.0.25 #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Upgrade to Java 7.0.25 and the XML digital signatures fail with the following 
exception:

2013-07-17 15:30:24,043 ERROR (OpenESignForms) Exception: 
javax.xml.crypto.URIReferenceException: 
com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverExceptio
n: Cannot resolve element with ID QualifyingProperties_ID - 
XmlDigitalSignature.sign():
javax.xml.crypto.dsig.XMLSignatureException: 
javax.xml.crypto.URIReferenceException: 
com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverExceptio
n: Cannot resolve element with ID QualifyingProperties_ID
        at org.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:412)
        at org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:338)
        at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:471)
        at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:367)
        at com.esignforms.open.crypto.XmlDigitalSignature.sign(XmlDigitalSignature.java:216)
        at com.esignforms.open.runtime.TransactionPartyDocument.createSnapshotXml(TransactionPartyDocument.java:266)
        at com.esignforms.open.runtime.event.PartyCompletedDocumentEvent.doBuiltInAction(PartyCompletedDocumentEvent.java:119)
        at com.esignforms.open.runtime.workflow.TransactionEngine.doWork(TransactionEngine.java:86)
        at com.esignforms.open.jsp.libdocsgen.DocumentPageBean.processButtonComplete(DocumentPageBean.java:1301)
        at com.esignforms.open.jsp.libdocsgen.DocumentPageBean.processRequest(DocumentPageBean.java:281)
        at com.esignforms.open.servlet.PickupTransaction.doGet(PickupTransaction.java:63)
        at com.esignforms.open.servlet.PickupTransaction.doPost(PickupTransaction.java:90)

Original issue reported on code.google.com by yoz...@gmail.com on 17 Jul 2013 at 11:33

GoogleCodeExporter commented 9 years ago
Fixed the "id" issue in the 0717 patch release. Used information from 
https://forums.oracle.com/thread/2556088

In particular, the use setIdAttribute() on the element as attributes called 
"Id" are no longer presumed to be the element's id.

Also referenced here: 
http://stackoverflow.com/questions/17331187/xml-dig-sig-error-after-upgrade-to-j
ava7u25

Original comment by yoz...@gmail.com on 17 Jul 2013 at 11:35