[xmlsec] encrypting/signing parts of xml

Varun Sekhri varunsekhri at yahoo.co.uk
Tue Jul 13 07:05:30 PDT 2004

I want to sign/encrypt part of xml doc, given an xpath
or xpointer. for eg.
if my sample xml is
   <CCC> wow </CCC>
   <DDD> this is it </DDD>
   <CCC> YES </CCC>
   <DDD> this is it </DDD>
I want to encrypt say '//BBB' or '/AAA/BBB[2]' or some
xpinter expression. I have gone through the examples
codes, tutorials etc.  In the example the whole
document was encrypted.... the xmlSecCtxXmlEncrypt
function takes an argument of nodepointer as given in
the example. I tried using xmlXPathEvalExpression
which gives xpathObj, and then tried getting each node
pointers, but it doesnt work.
Does the xmlSec library has API's which can solve this
problem, instead of using the APIs in libxml2 ??? I
saw an xpath.c in src directory of xmlsec, but its
documentation is not there on the web.

I am fairly new to the library.
Can somebody please help me on which way to proceed.

___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.yahoo.com

More information about the xmlsec mailing list