File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes Signing & Verify XML Document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "Signing & Verify XML Document" Watch "Signing & Verify XML Document" New topic

Signing & Verify XML Document

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761

what are the ways to sign an xml document.

I want to look my xml simple after signing.

there should be only one signature and public key node. to the xml document after signing.

i tried the example given in jwsdp-2.0 - xmldsig

but it generate Signature node with nesting method and algo which is being used. and i have got to know that all the information is required for verification.

bellow is the code though which i have signed the xml.

Is there anyway we can remove other nodes then signature and key.

Thanks !!

Jigar Naik

Salman Ahmed

Joined: Mar 18, 2008
Posts: 27
You always have the choice and freedom to implement the signature generation yourself: you decide what part (or parts) of the XML document you want to sign, how and where you want to embed the signature (for subsequent verification) in the same XML document, etc.

The only downside of this approach is that you have to implement both the signing and verification pieces _yourself_.
I agree. Here's the link:
subject: Signing & Verify XML Document
It's not a secret anymore!