> Dims, > > I just tried to apply your new code for Merlin-23 and it's flushed out > that the mega-sample target is now throwing an exception when it > creates a non XSLT target (and so is the new 23). > > I think this is something to do with the new optimisations, but I'll > try and track it down later this week. > > So it's going to take me a little while longer to get the 23 code into > CVS :<. > > Cheers, > Berin I have investigate the problem: And it seems that creating the object is asked to sign an undefine reference (in this case #reference-1) in this document(See attachment, I have to mangled the comments becouse of a stupid spam killer at my side.): The FragmentResolver class create an empty XMLSignatureInput (i.e. no subnode, no inputstream, no nodeset). And latter when the digest try to obtain the bytes to sign it throws the exception.
How works this example before? It throws an excpetion when trying to sign an a id that there is not there? or it returns an empty byte[] to the digester. Regards, Raul
<?xml version="1.0" encoding="UTF-8"?> <!-- Preamble --><Envelope xmlns="http://www.usps.gov/" xmlns:foo="http://www.usps.gov/foo"> <DearSir>foo</DearSir> <Body>bar</Body> <YoursSincerely> <Signature Id="signature" xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" xmlns="http://www.w3.org/2000/09/xmldsig#"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" xmlns="http://www.w3.org/2000/09/xmldsig#"/> </SignedInfo> <SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#"/> <Object Id="object-1" MimeType="text/plain" xmlns="http://www.w3.org/2000/09/xmldsig#">I am the text.</Object> <Object Encoding="http://www.w3.org/2000/09/xmldsig#base64" Id="object-2" MimeType="text/plain" xmlns="http://www.w3.org/2000/09/xmldsig#">SSBhbSB0aGUgdGV4dC4=</Object> <Object Id="object-3" xmlns="http://www.w3.org/2000/09/xmldsig#"> <NonCommentandus xmlns=""><!-- Commentandum --></NonCommentandus> </Object> </Signature></YoursSincerely><PostScript>bar</PostScript><Notaries Id="notaries" xmlns=""><Notary name="Great, A. T."/><Notary name="Hun, A. T."/></Notaries><!-- Commentary --></Envelope><!-- Postamble -->