[xmlsec] enc1 example does not exactly produce the output xml ?
Meg Morgan
meg@votehere.net
Mon, 06 Jan 2003 23:54:13 +0000
Unless I'm mistaken, there are a few omissions in the
encryption example. In order to get the element <KeyName>
and the content "test-des3" I had to add/change the following:
xmlNodePtr encKeyInfo = NULL;
encKeyInfo = xmlSecEncDataAddKeyInfo(encData); // your code (cur renamed to encKeyInfo)
cur = xmlSecKeyInfoAddKeyName(encKeyInfo); // my added two lines
xmlNodeSetContent(cur, BAD_CAST des3Key->name);
Similarly, the example code provided an element for the KeyName
"test-rsa-key" but didn't set the content:
cur = xmlSecKeyInfoAddKeyName(cur); // your code
xmlNodeSetContent(cur, BAD_CAST key->name); // my added line
Was there some other means of populating the content of these
elements? Similarly, I don't see in your code where the encrypted
session key and the encryption data get stuffed into their respective
CipherValue elements.
Thank you for your help,
Meg Morgan
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Meg Morgan 425/739-2534
meg@votehere.net http://www.votehere.net