[xmlsec] Encrypting an XML fragment?

Jacob Fugal lukfugl at gmail.com
Thu Aug 25 14:59:51 PDT 2005


I'm still tinkering away on trying to build up a limited C library
with perl bindings of WSSE[1] functionality using xmlsec. Hopefully I
can eventually expand and polish it for open release. Anyways, the
problem I'm running up against is this: xmlSecEncCtxXmlEncrypt takes a
pointer the the node for encryption as it's third argument[2] but
there are times when I need to be able to encrypt a node list (XML
fragment) rather than a single node. The XML Encryption spec allows
this[3] (section 2.1.2). Is it possible to supply an XML fragment to
xmlsec, or must I perform the serialization of the XML fragment to
UTF-8 myself and then encrypt with xmlSecEncContextBinaryEncrypt?
Thanks for any insights you may have.

Jacob Fugal

[1] http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss
[2] http://www.aleksey.com/xmlsec/api/xmlsec-xmlenc.html#XMLSECENCCTXXMLENCRYPT
[3] http://www.w3.org/TR/xmlenc-core/#sec-eg-Granularity



More information about the xmlsec mailing list