On Aug 19, 2005, at 1:20 PM, Robert Kern wrote: > Read up on XML canonicalization (abrreviated as c14n). lxml implements > this, also xml.dom.ext.c14n in PyXML. You'll need to canonicalize on > both ends before hashing. > > To paraphrase an Old Master, if you are running a cryptographic hash > over a non-canonical XML string representation, then you are living in > a > state of sin.
Canonicalization seems to be the needed thing. Looking at the protocol specification again, it mentions canonicalization; I had glossed over that previously because I was unware of any defined meaning it had. But the c14n module should provide the needed results (now that I've finally dug up documentation for it). -Michael -- http://mail.python.org/mailman/listinfo/python-list