You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by "Rowan Mountford XXX (TN/PAC)" <ro...@ericsson.com> on 2003/07/25 11:23:37 UTC

Signing and Verifying with

Hi all
 
I'm trying (unsuccessfully) to validate a digitally signed document (produced by a.n.other's app I don't have access to) where <Reference URI=""> but this element contains the <Transforms> element with an embedded XSL stylesheet which seems to select the data they are actually signing. I am using the apache implementation. I'm not a java or xml guru but have a bit of experience in all the areas (little knowledge=dangerous!)
 
I don't know exactly what the following is doing but it seems the XMLSignature element handles all the transforms and canonicalisation automatically by looking up the reference. Is there a way to break the process down and pass the signature process the data I want to sign / validate? Even just a little further info (or adapted use of the following 3 lines) would be great:
 
Element nscontext = XMLUtils.createDSctx(doc,"ds",Constants.SignatureSpecNS);
Element sigElement = (Element) XPathAPI.selectSingleNode(doc,"//ds:Signature[1]",nscontext);
XMLSignature signature = new XMLSignature(sigElement,f.toURL().toString());
 
Thanks!!
 
/r0