[xmlsec] Re: Encrypting an XML fragment?
Jacob Fugal
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[1]. 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
library.
Jacob Fugal
[1] http://www.w3.org/TR/xmlenc-core/#sec-eg-Granularity
More information about the xmlsec
mailing list