[xmlsec] extended character set encryption/decryption

Aleksey Sanin aleksey at aleksey.com
Mon Apr 1 14:04:37 PDT 2013


Yes. I am not exactly sure what was the original behavior but this
transformation looks correct to me: c14n does replace the entities.

Aleksey

On 4/1/13 1:40 PM, Russell Beall wrote:
> 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.
> 
> 
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
> 


More information about the xmlsec mailing list