[xmlsec] Re: Encrypting an XML fragment?
lukfugl at gmail.com
Fri Aug 26 10:24:55 PDT 2005
Ok, on review of the code for xmlSecEncCtxXmlEncrypt (in the process
of writing a xmlSecEncCtxXmlFragmentEncrypt procedure) I found a
condition on the type property of the encryption context. The type can
be set to xmlSecTypeEncElement or xmlSecTypeEncContent. Setting the
type to xmlSecTypeEncContent will encrypt the contents of the target
element as opposed to the element itself. This is in conformance with
the XML Encryption spec. Section 2.1.2 only mentions XML Element
Content (Elements), not an arbitrary node list as an XML fragment.
This is also sufficient for my needs with the WSSE implementation, so
doesn't look like xmlsec is lacking after all! Thanks for the great
More information about the xmlsec