[Javassist user questions] - XML signature and KeySelectors class: howto ?
by ShadenS
Hi Community,
I sign a XML message (really, soap message) and then I sent it
to the server. The server could validate XML signed, but verification
fails (server say that signature is invalid :( )
The strange is if I implement signing line code and validate line in
same class, then all works (and signature is valid);
I think the problem it is in follow few lines:
| DOMValidateContext valContext = new DOMValidateContext(new
| KeyValueKeySelector(), signatureTag);
| ^^^^^^^^^^^^^^^^^^
| XMLSignature signature =
| sigFactory.unmarshalXMLSignature(valContext);
| // Validate the XMLSignature (generated above)
| boolean isSignatureValid= signature.validate(valContext);
|
The KeyValueKeySelector is a private static class (within main
classes) that extends KeySelectors. It seems on client side method of
this class are executed automatically and validate the signature; if I
move validation on server side, this class seems not is automatically
executed
O_o
What is the magic of KeySelectors class??
Thanks to all!
P.s.
Ide: netbeans 5.5
AS: Sun Application Server 9.0
package: XML Signature Api
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968694#3968694
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968694
18 years, 4 months