[xmlsec] Question with code for xmlencryption

Aleksey Sanin aleksey at aleksey.com
Tue Apr 27 13:47:16 PDT 2004


Any questions about xmlsec should go to the list :)

1) The template in encDataNode is not attached to the doc until the
xmlSecEncCtxXmlEncrypt() function is called. Thus you will not see
these new nodes in the "xmlDocDump(stdout,doc);". Try
"xmlElemDump(stdout,doc,encDataNode );" instead.

2) xmlSecEncCtxXmlEncrypt() function does all the XML Encryption things
and then it places the template from encDataNode in the correct place
in the doc structure.

Aleksey



Govind Krishnamurthi wrote:
> Hello Aleksey,
> Thanks for your email. I haven't forwarded this email to the mailing 
> list as I thought this question may not be relevant for others.
> Co-incidentally, I was also trying to dump the template onto a file when 
> your email arrived.  I did an xmlDocDump(stdout,doc); exit(-1); just 
> before the XMLEncrypt function and
> I was suprised to see that nothing had been added to the original xml 
> file. So I was curious and
> tried to add the same two lines in encrypt3.c before the XMLEncrypt 
> function and tried it out and I had the same result as mine. There was 
> no difference between the original xml file and the template. Am I going 
> wrong somewhere here.
> Also, you seem to set the encDataNode to NULL here with the comment that 
> this inserts the template into the doc. I didn't understand this. 
> Appreciate any help from you. Sorry for any inconvenience,
> 
> 
> Thanks in advance,
> Govind.
> 
> 



More information about the xmlsec mailing list