This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Signing XML and Canonicalization

 
Bill Tschumy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

http://java.sun.com/javase/6/docs/technotes/guides/security/xmldsig/overview.html

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic