[xmlsec] extended character set encryption/decryption

Russell Beall beall at usc.edu
Mon Apr 1 13:40:55 PDT 2013


Looks like I spoke too soon.  What made it appear to work just now was actually a fix that my coworker put in place on the receiving end to re-encode the characters if they showed up unencoded.  The change I made to parse the document differently did not actually maintain the encoding.

The original request is this:
<?xml version="1.0" encoding="US-ASCII" ?>
<Update>
  <Person>
    <IDs>
      <USCID>5843020612</USCID>
    </IDs>
    <Multi-KIMRole>
      <KIMRole>
        <RoleID>xxx&#xe1;xxx</RoleID>
      </KIMRole>
      <KIMRole>
        <RoleID>xxx&#xf6;xxx</RoleID>
      </KIMRole>
    </Multi-KIMRole>
  </Person>
</Update>

running xmllint as you specified generates the following, and converts the encoded characters back to original:

$ xmllint --c14n misctest/unicodedevascii.xml 
<Update>
  <Person>
    <IDs>
      <USCID>5843020612</USCID>
    </IDs>
    <Multi-KIMRole>
      <KIMRole>
        <RoleID>xxxáxxx</RoleID>
      </KIMRole>
      <KIMRole>
        <RoleID>xxxöxxx</RoleID>
      </KIMRole>
    </Multi-KIMRole>
  </Person>
</Update>

Does this show what you were looking for?

Thanks,
Russ.


==============================
Russell Beall
Systems Programmer IV
Enterprise Identity Management
University of Southern California
beall at usc.edu
==============================






On Apr 1, 2013, at 11:34 AM, Aleksey Sanin <aleksey at aleksey.com> wrote:

> Can you run your file through "xmllint --c14n"? This will tell us if
> the issue is on libxml2 or xmlsec sides.




More information about the xmlsec mailing list