jQuery in Action, 2nd edition*
The moose likes XML and Related Technologies and the fly likes Signing XML and Canonicalization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Signing XML and Canonicalization" Watch "Signing XML and Canonicalization" New topic

Signing XML and Canonicalization

Bill Tschumy

Joined: Dec 01, 2003
Posts: 4
I am trying to digitally sign some xml and am having a hard time understanding the canonicalization options. The code I'm using is derived from the examples at the bottom of:


I am creating an "enveloped" signature. Here is the relevant code from the GenEnveloped example:

I would like the canonicalization method to ignore whitespace outside of xml elements. Thus, the addition of a blank line wouldn't change the signature. None of the standard options to newCanonicalizationMethod() [INCLUSIVE, INCLUSIVE_WITH_COMMENTS, EXCLUSIVE, EXCLUSIVE_WITH_COMMENTS] do this. Is it possible? This seems like a reasonable thing to do so I'm surprised it is not more obvious.
I agree. Here's the link: http://aspose.com/file-tools
subject: Signing XML and Canonicalization
Similar Threads
Mechanism type DOM not available
Error while parsing XML with PDF attachment
Signing & Verify XML Document
problem in Digitally Signing a particular element of an XML Document
what are the securities in java compare to C?