https://issues.apache.org/bugzilla/show_bug.cgi?id=47758



--- Comment #5 from coheigea <cohei...@apache.org> 2009-09-02 03:38:05 PDT ---
I don't get it. You're using the basic JSR 105 API functionality via JDK 1.6 to
validate the signature, but comparing this to doing some custom validation code
built around XML Security? Why are you doing this? The following XML Security
code works fine with your test-case:

        org.w3c.dom.Document doc = this.db.parse(is);

        Element nscontext = XMLUtils.createDSctx(doc,
"ds",Constants.SignatureSpecNS);
        Element sigElement = (Element)
XPathAPI.selectSingleNode(doc,"//ds:Signature[1]", nscontext);
        XMLSignature signature = new XMLSignature(sigElement, "");

        signature.addResourceResolver(new
XPointerResourceResolver(sigElement));

        KeyInfo ki = signature.getKeyInfo();

        java.security.PublicKey publicKey = ki.getPublicKey();

        assertTrue(signature.checkSignatureValue(publicKey));

Colm.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to