santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ernad Besirevic <ern...@gmail.com>
Subject Problem with an XSLT transformation
Date Thu, 24 May 2012 18:04:23 GMT
Hi guys,

hopefully someone can help me with my problem. I wrote simple signer and it 
works perfect. Verification works as well in my own java app I wrote. However, I 
tried to verify signature with a 3rd party tool and it fails. The problem is 
that I have a stylesheet directive in the XML document referencing to an 
external XSLT file. If I remove this directive the signature is verified 
successfuly with both tools. I suppose that the 3rd party tool transforms the 
document before the verification is performed. Now I want to try to transform 
the document before it is signed and then try to verify the signature. 
Unfortunately I didn't find any sample to do this. Firstly I tried to use Sun's 
XML Signature API and I used Transforms to add new Transform and 
XSLTTransformParameterSpec to attach my stylesheet but I get following 
exception:

javax.xml.crypto.dsig.XMLSignatureException: 
javax.xml.crypto.dsig.TransformException: 
com.sun.org.apache.xml.internal.security.transforms.TransformationException: 
Cannot find xslt:stylesheet in Transform
Original Exception was 
com.sun.org.apache.xml.internal.security.transforms.TransformationException: 
Cannot find xslt:stylesheet in Transform
at org.jcp.xml.dsig.internal.dom.DOMReference.transform(Unknown Source)
at org.jcp.xml.dsig.internal.dom.DOMReference.digest(Unknown Source)
at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(Unknown Source)
at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(Unknown Source)

How can I do this with Santuario? 

I tried to debug Santuario code as well but I don't get it to work :-). Hope 
some one can help me with this. Thanks.

Regards,
errno


Mime
View raw message