Skip to content

API XMLSec Core Transforms

Aleksey Sanin edited this page Jun 22, 2026 · 5 revisions

Transforms Engine

API Group: xmlsec_core_transforms

Transforms engine — chaining, execution, and built-in transforms.

XSLT transform implementation.

XPath transform implementation.

XMLDsig and XMLEnc transforms.

Relationship transform implementation.

Key wrap helper functions (AES/DES/Camellia).

Enveloped signature transform implementation.

C14N canonicalization transform implementation.

The Transforms Element contains an ordered list of Transform elements; these describe how the signer obtained the data object that was digested. Schema Definition:

<elementname="Transforms"type="ds:TransformsType"/>
<complexTypename="TransformsType">
<sequence>
<elementref="ds:Transform"maxOccurs="unbounded"/>
</sequence>
</complexType>
<elementname="Transform"type="ds:TransformType"/>
<complexTypename="TransformType"mixed="true">
<choiceminOccurs="0"maxOccurs="unbounded">
<anynamespace="##other"processContents="lax"/>
<!--(1,1)elementsfrom(0,unbounded)namespaces-->
<elementname="XPath"type="string"/>
</choice>
<attributename="Algorithm"type="anyURI"use="required"/>
</complexType>
``` DTD: 

```c
<!ELEMENTTransforms(Transform+)>
<!ELEMENTTransform(#PCDATA|XPath%Transform.ANY;)*>
<!ATTLISTTransformAlgorithmCDATA#REQUIRED>
<!ELEMENTXPath(#PCDATA)>

Macros

xmlSecTransformUriTypeNone

Defined as: 0x0000

Source: include/xmlsec/transforms.h

The URI type is unknown or not set.


xmlSecTransformUriTypeEmpty

Defined as: 0x0001

Source: include/xmlsec/transforms.h

The empty URI ("") type.


xmlSecTransformUriTypeSameDocument

Defined as: 0x0002

Source: include/xmlsec/transforms.h

The same-document ("#...") non-empty URI type.

The same document ("#...") but not empty ("") URI type.


xmlSecTransformUriTypeLocal

Defined as: 0x0004

Source: include/xmlsec/transforms.h

The local URI ("file:///....") type.


xmlSecTransformUriTypeRemote

Defined as: 0x0008

Source: include/xmlsec/transforms.h

The remote URI type.


xmlSecTransformUriTypeAny

Defined as: 0xFFFF

Source: include/xmlsec/transforms.h

Any URI type.


xmlSecTransformDataTypeUnknown

Defined as: 0x0000

Source: include/xmlsec/transforms.h

The transform data type is unknown.

The transform data type is unknown or nor data expected.


xmlSecTransformDataTypeBin

Defined as: 0x0001

Source: include/xmlsec/transforms.h

The binary transform data.


xmlSecTransformDataTypeXml

Defined as: 0x0002

Source: include/xmlsec/transforms.h

The xml transform data.


xmlSecTransformUsageUnknown

Defined as: 0x0000

Source: include/xmlsec/transforms.h

Transforms usage is unknown or undefined.


xmlSecTransformUsageDSigTransform

Defined as: 0x0001

Source: include/xmlsec/transforms.h

Transform usable in dsig:Transform.

Transform could be used in dsig:Transform/.


xmlSecTransformUsageC14NMethod

Defined as: 0x0002

Source: include/xmlsec/transforms.h

Transform usable in dsig:CanonicalizationMethod.

Transform could be used in dsig:CanonicalizationMethod/.


xmlSecTransformUsageDigestMethod

Defined as: 0x0004

Source: include/xmlsec/transforms.h

Transform usable in dsig:DigestMethod.

Transform could be used in dsig:DigestMethod/.


xmlSecTransformUsageSignatureMethod

Defined as: 0x0008

Source: include/xmlsec/transforms.h

Transform usable in dsig:SignatureMethod.

Transform could be used in dsig:SignatureMethod/.


xmlSecTransformUsageEncryptionMethod

Defined as: 0x0010

Source: include/xmlsec/transforms.h

Transform usable in enc:EncryptionMethod.

Transform could be used in enc:EncryptionMethod/.


xmlSecTransformUsageKeyDerivationMethod

Defined as: 0x0020

Source: include/xmlsec/transforms.h

Transform usable in enc11:KeyDerivationMethod.

Transform could be used in enc11:KeyDerivationMethod/.


xmlSecTransformUsageAgreementMethod

Defined as: 0x0040

Source: include/xmlsec/transforms.h

Transform usable in enc11:AgreementMethod.

Transform could be used in enc11:AgreementMethod/.


xmlSecTransformUsageEncapsulationMechanism

Defined as: 0x0080

Source: include/xmlsec/transforms.h

Transform usable in as:EncapsulationMechanism.

Transform is a KEM algorithm used in the as:EncapsulationMechanism/ element: on encrypt it encapsulates a symmetric key and writes the ciphertext to CipherValue; on decrypt it reads the CipherValue and decapsulates to recover the key.


xmlSecTransformUsageAny

Defined as: 0xFFFF

Source: include/xmlsec/transforms.h

Transform could be used for operation.


XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK

Defined as: 0x00000001

Source: include/xmlsec/transforms.h

Resolve URI ID references without XPointers (Visa3D hack).

If this flag is set then URI ID references are resolved directly without using XPointers. This allows one to sign/verify Visa3D documents that don't follow XML, XPointer and XML DSig specifications.


XMLSEC_TRANSFORMCTX_FLAGS_SUPPORT_ASN1_SIGNATURE_VALUES

Defined as: 0x00000002

Source: include/xmlsec/transforms.h

Support ASN1 encoded ECDSA signature values.

If this flag is set then ASN1 encoded ECDSA signature values will be used (see https://github.com/lsh123/xmlsec/issues/995).


XMLSEC_TRANSFORM_FLAGS_USER_SPECIFIED

Defined as: 0x00000001

Source: include/xmlsec/transforms.h

Transform was specified in the XML file.

If this flag is set then this transform was specified in the XML file (vs a transform added by the XMLSec library).


xmlSecTransformGetName

Defined as: ((xmlSecTransformIsValid((transform))) ? \ xmlSecTransformKlassGetName((transform)->id) : NULL)

Source: include/xmlsec/transforms.h

Macro. Returns transform name.

Parameters:

  • transform — the pointer to transform.

xmlSecTransformIsValid

Defined as: ((( transform ) != NULL) && \ (( transform )->id != NULL) && \ (( transform )->id->klassSize >= sizeof(xmlSecTransformKlass)) && \ (( transform )->id->objSize >= sizeof(xmlSecTransform)) && \ (( transform )->id->name != NULL))

Source: include/xmlsec/transforms.h

Macro. Returns 1 if transform is valid.

Macro. Returns 1 if the transform is valid or 0 otherwise.

Parameters:

  • transform — the pointer to transform.

xmlSecTransformCheckId

Defined as: (xmlSecTransformIsValid(( transform )) && \ ((((const xmlSecTransformId) (( transform )->id))) == ( i )))

Source: include/xmlsec/transforms.h

Macro. Returns 1 if transform has id i.

Macro. Returns 1 if the transform is valid and has specified id i or 0 otherwise.

Parameters:

  • transform — the pointer to transform.
  • i — the transform id.

xmlSecTransformCheckSize

Defined as: (xmlSecTransformIsValid(( transform )) && \ ((( transform )->id->objSize) >= ( size )))

Source: include/xmlsec/transforms.h

Macro. Returns 1 if transform has at least size bytes.

Macro. Returns 1 if the transform is valid and has at least size bytes or 0 otherwise.

Parameters:

  • transform — the pointer to transform.
  • size — the transform object size.

xmlSecTransformKlassGetName

Defined as: (((klass)) ? ((klass)->name) : NULL)

Source: include/xmlsec/transforms.h

Macro. Returns transform klass name.

Parameters:

  • klass — the transform's klass.

xmlSecTransformIdListId

Defined as: xmlSecTransformIdListGetKlass()

Source: include/xmlsec/transforms.h

Transform klasses list klass.


xmlSecTransformIdUnknown

Defined as: ((xmlSecTransformId)NULL)

Source: include/xmlsec/transforms.h

The "unknown" transform id (NULL).


xmlSecTransformBase64Id

Defined as: xmlSecTransformBase64GetKlass()

Source: include/xmlsec/transforms.h

The base64 encode transform klass.


xmlSecTransformInclC14NId

Defined as: xmlSecTransformInclC14NGetKlass()

Source: include/xmlsec/transforms.h

The inclusive C14N without comments transform klass.

The regular (inclusive) C14N without comments transform klass.


xmlSecTransformInclC14NWithCommentsId

Defined as: xmlSecTransformInclC14NWithCommentsGetKlass()

Source: include/xmlsec/transforms.h

The inclusive C14N with comments transform klass.

The regular (inclusive) C14N with comments transform klass.


xmlSecTransformInclC14N11Id

Defined as: xmlSecTransformInclC14N11GetKlass()

Source: include/xmlsec/transforms.h

The inclusive C14N 1.1 without comments transform klass.

The regular (inclusive) C14N 1.1 without comments transform klass.


xmlSecTransformInclC14N11WithCommentsId

Defined as: xmlSecTransformInclC14N11WithCommentsGetKlass()

Source: include/xmlsec/transforms.h

The inclusive C14N 1.1 with comments transform klass.

The regular (inclusive) C14N 1.1 with comments transform klass.


xmlSecTransformExclC14NId

Defined as: xmlSecTransformExclC14NGetKlass()

Source: include/xmlsec/transforms.h

The exclusive C14N without comments transform.

The exclusive C14N without comments transform klass.


xmlSecTransformExclC14NWithCommentsId

Defined as: xmlSecTransformExclC14NWithCommentsGetKlass()

Source: include/xmlsec/transforms.h

The exclusive C14N with comments transform klass.


xmlSecTransformEnvelopedId

Defined as: xmlSecTransformEnvelopedGetKlass()

Source: include/xmlsec/transforms.h

The "enveloped" transform klass.


xmlSecTransformXPathId

Defined as: xmlSecTransformXPathGetKlass()

Source: include/xmlsec/transforms.h

The XPath transform klass.


xmlSecTransformXPath2Id

Defined as: xmlSecTransformXPath2GetKlass()

Source: include/xmlsec/transforms.h

The XPath2 transform klass.


xmlSecTransformXPointerId

Defined as: xmlSecTransformXPointerGetKlass()

Source: include/xmlsec/transforms.h

The XPointer transform klass.


xmlSecTransformRelationshipId

Defined as: xmlSecTransformRelationshipGetKlass()

Source: include/xmlsec/transforms.h

The Relationship transform klass.


xmlSecTransformXsltId

Defined as: xmlSecTransformXsltGetKlass()

Source: include/xmlsec/transforms.h

The XSLT transform klass.


xmlSecTransformRemoveXmlTagsC14NId

Defined as: xmlSecTransformRemoveXmlTagsC14NGetKlass()

Source: include/xmlsec/transforms.h

The 'remove all xml tags' transform klass.

The "remove all xml tags" transform klass (used before base64 transforms).


xmlSecTransformVisa3DHackId

Defined as: xmlSecTransformVisa3DHackGetKlass()

Source: include/xmlsec/transforms.h

Selects node subtree by node id string (Visa3D hack).

Selects node subtree by given node id string. The only reason why we need this is Visa3D protocol. It doesn't follow XML/XPointer/XMLDSig specs and allows invalid XPointer expressions in the URI attribute. Since we couldn't evaluate such expressions thru XPath/XPointer engine, we need to have this hack here.


Typedefs

xmlSecTransformKlass

typedef const struct _xmlSecTransformKlass xmlSecTransformKlass;

Source: include/xmlsec/transforms.h

The transform klass.


xmlSecTransformId

typedef const struct _xmlSecTransformKlass* xmlSecTransformId;

Source: include/xmlsec/transforms.h

Pointer to xmlSecTransformKlass.


xmlSecTransformUriType

typedef unsigned int xmlSecTransformUriType;

Source: include/xmlsec/transforms.h

URI transform type bit mask.


xmlSecTransformDataType

typedef xmlSecByte xmlSecTransformDataType;

Source: include/xmlsec/transforms.h

Transform data type bit mask.


xmlSecTransformUsage

typedef unsigned int xmlSecTransformUsage;

Source: include/xmlsec/transforms.h

The transform usage bit mask.


xmlSecTransformCtxPreExecuteCallback

typedef int(* xmlSecTransformCtxPreExecuteCallback) (xmlSecTransformCtxPtr transformCtx))(xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Callback called before data processing to verify/modify transforms.

The callback called after creating transforms chain but before starting data processing. Application can use this callback to do additional transforms chain verification or modification and aborting transforms execution (if necessary).

Parameters:

  • transformCtx — the pointer to transform's context.

Returns: 0 on success and a negative value otherwise (in this case, transforms chain will not be executed and xmlsec processing stops).


xmlSecTransformInitializeMethod

typedef int(* xmlSecTransformInitializeMethod) (xmlSecTransformPtr transform))(xmlSecTransformPtr transform);

Source: include/xmlsec/transforms.h

The transform specific initialization method.

Parameters:

  • transform — the pointer to transform object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformFinalizeMethod

typedef void(* xmlSecTransformFinalizeMethod) (xmlSecTransformPtr transform))(xmlSecTransformPtr transform);

Source: include/xmlsec/transforms.h

The transform specific destroy method.

Parameters:

  • transform — the pointer to transform object.

xmlSecTransformGetDataTypeMethod

typedef xmlSecTransformDataType(* xmlSecTransformGetDataTypeMethod) (xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to query data type in a mode.

The transform specific method to query information about transform data type in specified mode mode.

Parameters:

  • transform — the pointer to transform object.
  • mode — the mode.
  • transformCtx — the pointer to transform context object.

Returns: transform data type.


xmlSecTransformNodeReadMethod

typedef int(* xmlSecTransformNodeReadMethod) (xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to read data from XML node.

The transform specific method to read the transform data from the node.

Parameters:

  • transform — the pointer to transform object.
  • node — the pointer to dsig:Transform/ node.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformNodeWriteMethod

typedef int(* xmlSecTransformNodeWriteMethod) (xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to write transform info to XML.

The transform specific method to write transform information to an XML node node.

Parameters:

  • transform — the pointer to transform object.
  • node — the pointer to dsig:Transform/ node.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformSetKeyRequirementsMethod

typedef int(* xmlSecTransformSetKeyRequirementsMethod) (xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq))(xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq);

Source: include/xmlsec/transforms.h

Transform specific method to set key requirements.

Transform specific method to set transform's key requirements.

Parameters:

  • transform — the pointer to transform object.
  • keyReq — the pointer to key requirements structure.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformSetKeyMethod

typedef int(* xmlSecTransformSetKeyMethod) (xmlSecTransformPtr transform, xmlSecKeyPtr key))(xmlSecTransformPtr transform, xmlSecKeyPtr key);

Source: include/xmlsec/transforms.h

The transform specific method to set the key.

The transform specific method to set the key for use.

Parameters:

  • transform — the pointer to transform object.
  • key — the pointer to key.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformVerifyMethod

typedef int(* xmlSecTransformVerifyMethod) (xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to verify processing results.

The transform specific method to verify transform processing results (used by digest and signature transforms). This method sets status member of the xmlSecTransform structure to either xmlSecTransformStatusOk if verification succeeded or xmlSecTransformStatusFail otherwise.

Parameters:

  • transform — the pointer to transform object.
  • data — the input buffer.
  • dataSize — the size of input buffer data.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformPushBinMethod

typedef int(* xmlSecTransformPushBinMethod) (xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to push binary data down the chain.

The transform specific method to process data from data and push result to the next transform in the chain.

Parameters:

  • transform — the pointer to transform object.
  • data — the input binary data,
  • dataSize — the input data size.
  • final — the flag: if set to 1 then it's the last data chunk.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformPopBinMethod

typedef int(* xmlSecTransformPopBinMethod) (xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to pop binary data from the chain.

The transform specific method to pop data from previous transform in the chain and return result in the data buffer. The size of returned data is placed in the dataSize.

Parameters:

  • transform — the pointer to transform object.
  • data — the buffer to store result data.
  • maxDataSize — the size of the buffer data.
  • dataSize — the pointer to returned data size.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformPushXmlMethod

typedef int(* xmlSecTransformPushXmlMethod) (xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to push XML nodes down the chain.

The transform specific method to process nodes and push result to the next transform in the chain.

Parameters:

  • transform — the pointer to transform object.
  • nodes — the input nodes.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformPopXmlMethod

typedef int(* xmlSecTransformPopXmlMethod) (xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

The transform specific method to pop XML nodes from the chain.

The transform specific method to pop data from previous transform in the chain, process the data and return result in nodes.

Parameters:

  • transform — the pointer to transform object.
  • nodes — the pointer to store popinter to result nodes.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformExecuteMethod

typedef int(* xmlSecTransformExecuteMethod) (xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx))(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Transform specific data processing method.

Transform specific method to process a chunk of data.

Parameters:

  • transform — the pointer to transform object.
  • last — the flag: if set to 1 then it's the last data chunk.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value otherwise.


Enumerations

xmlSecTransformStatus

Source: include/xmlsec/transforms.h

The transform execution status.

Value Initializer Description
xmlSecTransformStatusNone = 0
xmlSecTransformStatusWorking ``
xmlSecTransformStatusFinished ``
xmlSecTransformStatusOk ``
xmlSecTransformStatusFail ``

xmlSecTransformMode

Source: include/xmlsec/transforms.h

The transform operation mode.

Value Initializer Description
xmlSecTransformModeNone = 0
xmlSecTransformModePush ``
xmlSecTransformModePop ``

xmlSecTransformOperation

Source: include/xmlsec/transforms.h

The transform operation.

Value Initializer Description
xmlSecTransformOperationNone = 0
xmlSecTransformOperationEncode ``
xmlSecTransformOperationDecode ``
xmlSecTransformOperationSign ``
xmlSecTransformOperationVerify ``
xmlSecTransformOperationEncrypt ``
xmlSecTransformOperationDecrypt ``

Functions

xmlSecTransformIdsGet

xmlSecPtrListPtr xmlSecTransformIdsGet(void);

Source: include/xmlsec/transforms.h

Gets global registered transform klasses list.

Returns: the pointer to list of all registered transform klasses.


xmlSecTransformIdsInit

int xmlSecTransformIdsInit(void);

Source: include/xmlsec/transforms.h

Initializes the transform klasses.

Initializes the transform klasses. This function is called from the xmlSecInit function and the application should not call it directly.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformIdsShutdown

void xmlSecTransformIdsShutdown(void);

Source: include/xmlsec/transforms.h

Shuts down the transform klasses.

Shuts down the keys data klasses. This function is called from the xmlSecShutdown function and the application should not call it directly.


xmlSecTransformIdsRegisterDefault

int xmlSecTransformIdsRegisterDefault(void);

Source: include/xmlsec/transforms.h

Registers default XML Security Library transform klasses.

Registers default (implemented by XML Security Library) transform klasses: XPath transform, Base64 transform, ...

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformIdsRegister

int xmlSecTransformIdsRegister(xmlSecTransformId id);

Source: include/xmlsec/transforms.h

Registers a transform klass in the global list.

Registers id in the global list of transform klasses.

Parameters:

  • id — the transform klass.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformUriTypeCheck

int xmlSecTransformUriTypeCheck(xmlSecTransformUriType type, const xmlChar *uri);

Source: include/xmlsec/transforms.h

Checks if uri matches expected type type.

Parameters:

  • type — the expected URI type.
  • uri — the uri for checking.

Returns: 1 if uri matches type, 0 if not or a negative value if an error occurs.


xmlSecTransformCtxCreate

xmlSecTransformCtxPtr xmlSecTransformCtxCreate(void);

Source: include/xmlsec/transforms.h

Creates a transforms chain processing context.

Creates transforms chain processing context. The caller is responsible for destroying returned object by calling xmlSecTransformCtxDestroy function.

Returns: pointer to newly allocated context object or NULL if an error occurs.


xmlSecTransformCtxDestroy

void xmlSecTransformCtxDestroy(xmlSecTransformCtxPtr ctx);

Source: include/xmlsec/transforms.h

Destroys a transforms chain processing context.

Destroy context object created with xmlSecTransformCtxCreate function.

Parameters:

  • ctx — the pointer to transforms chain processing context.

xmlSecTransformCtxInitialize

int xmlSecTransformCtxInitialize(xmlSecTransformCtxPtr ctx);

Source: include/xmlsec/transforms.h

Initializes a transforms chain processing context.

Initializes transforms chain processing context. The caller is responsible for cleaning up returned object by calling xmlSecTransformCtxFinalize function.

Parameters:

  • ctx — the pointer to transforms chain processing context.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformCtxFinalize

void xmlSecTransformCtxFinalize(xmlSecTransformCtxPtr ctx);

Source: include/xmlsec/transforms.h

Cleans up a transforms chain processing context.

Cleans up ctx object initialized with xmlSecTransformCtxInitialize function.

Parameters:

  • ctx — the pointer to transforms chain processing context.

xmlSecTransformCtxReset

void xmlSecTransformCtxReset(xmlSecTransformCtxPtr ctx);

Source: include/xmlsec/transforms.h

Resets transforms context for new processing.

Parameters:

  • ctx — the pointer to transforms chain processing context.

xmlSecTransformCtxCopyUserPref

int xmlSecTransformCtxCopyUserPref(xmlSecTransformCtxPtr dst, xmlSecTransformCtxPtr src);

Source: include/xmlsec/transforms.h

Copies user settings from src context to dst.

Copies user settings from src context to dst.

Parameters:

  • dst — the pointer to destination transforms chain processing context.
  • src — the pointer to source transforms chain processing context.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxSetUri

int xmlSecTransformCtxSetUri(xmlSecTransformCtxPtr ctx, const xmlChar *uri, xmlNodePtr hereNode);

Source: include/xmlsec/transforms.h

Parses URI and adds xpointer transforms if required.

Parses uri and adds xpointer transforms if required.

The following examples demonstrate what the URI attribute identifies and how it is dereferenced (http://www.w3.org/TR/xmldsig-core/#sec-ReferenceProcessingModel):

  • URI=" identifies the octets that represent the external resource ``, that is probably an XML document given its file extension.
  • URI=" identifies the element with ID attribute value 'chapter1' of the external XML resource ``, provided as an octet stream. Again, for the sake of interoperability, the element identified as 'chapter1' should be obtained using an XPath transform rather than a URI fragment (barename XPointer resolution in external resources is not REQUIRED in this specification).
  • URI="" identifies the node-set (minus any comment nodes) of the XML resource containing the signature
  • URI="#chapter1" identifies a node-set containing the element with ID attribute value 'chapter1' of the XML resource containing the signature. XML Signature (and its applications) modify this node-set to include the element plus all descendants including namespaces and attributes – but not comments.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • uri — the URI.
  • hereNode — the pointer to "here" node required by some XML transforms (may be NULL).

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxAppend

int xmlSecTransformCtxAppend(xmlSecTransformCtxPtr ctx, xmlSecTransformPtr transform);

Source: include/xmlsec/transforms.h

Connects a transform to the end of the chain in ctx.

Connects the transform to the end of the chain of transforms in the ctx (see xmlSecTransformConnect function for details).

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • transform — the pointer to new transform.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxPrepend

int xmlSecTransformCtxPrepend(xmlSecTransformCtxPtr ctx, xmlSecTransformPtr transform);

Source: include/xmlsec/transforms.h

Connects a transform to the beginning of the chain in ctx.

Connects the transform to the beggining of the chain of transforms in the ctx (see xmlSecTransformConnect function for details).

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • transform — the pointer to new transform.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxCreateAndAppend

xmlSecTransformPtr xmlSecTransformCtxCreateAndAppend(xmlSecTransformCtxPtr ctx, xmlSecTransformId id);

Source: include/xmlsec/transforms.h

Creates a transform and appends it to the chain in ctx.

Creates new transform and connects it to the end of the chain of transforms in the ctx (see xmlSecTransformConnect function for details).

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • id — the new transform klass.

Returns: pointer to newly created transform or NULL if an error occurs.


xmlSecTransformCtxCreateAndPrepend

xmlSecTransformPtr xmlSecTransformCtxCreateAndPrepend(xmlSecTransformCtxPtr ctx, xmlSecTransformId id);

Source: include/xmlsec/transforms.h

Creates a transform and prepends it to the chain in ctx.

Creates new transform and connects it to the end of the chain of transforms in the ctx (see xmlSecTransformConnect function for details).

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • id — the new transform klass.

Returns: pointer to newly created transform or NULL if an error occurs.


xmlSecTransformCtxNodeRead

xmlSecTransformPtr xmlSecTransformCtxNodeRead(xmlSecTransformCtxPtr ctx, xmlNodePtr node, xmlSecTransformUsage usage);

Source: include/xmlsec/transforms.h

Reads a transform from a node and appends it to the chain.

Reads the transform from the node and appends it to the current chain of transforms in ctx.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • node — the pointer to transform's node.
  • usage — the transform's usage (signature, encryption, etc.).

Returns: pointer to newly created transform or NULL if an error occurs.


xmlSecTransformCtxNodesListRead

int xmlSecTransformCtxNodesListRead(xmlSecTransformCtxPtr ctx, xmlNodePtr node, xmlSecTransformUsage usage);

Source: include/xmlsec/transforms.h

Reads transforms from dsig:Transform/ children and appends to chain.

Reads transforms from the dsig:Transform/ children of the node and appends them to the current transforms chain in ctx object.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • node — the pointer to dsig:Transform/ nodes parent node.
  • usage — the transform's usage (signature, encryption, etc.).

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxPrepare

int xmlSecTransformCtxPrepare(xmlSecTransformCtxPtr ctx, xmlSecTransformDataType inputDataType);

Source: include/xmlsec/transforms.h

Prepares the transform context for processing data.

Prepares the transform context for processing data of inputDataType.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • inputDataType — the expected input type.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxBinaryExecute

int xmlSecTransformCtxBinaryExecute(xmlSecTransformCtxPtr ctx, const xmlSecByte *data, xmlSecSize dataSize);

Source: include/xmlsec/transforms.h

Processes binary data using transforms chain in ctx.

Processes binary data using transforms chain in the ctx.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • data — the input binary data buffer.
  • dataSize — the input data size.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxUriExecute

int xmlSecTransformCtxUriExecute(xmlSecTransformCtxPtr ctx, const xmlChar *uri);

Source: include/xmlsec/transforms.h

Processes binary data from URI using transforms chain in ctx.

Process binary data from the URI using transforms chain in ctx.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • uri — the URI.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxXmlExecute

int xmlSecTransformCtxXmlExecute(xmlSecTransformCtxPtr ctx, xmlSecNodeSetPtr nodes);

Source: include/xmlsec/transforms.h

Processes nodes using transforms chain in ctx.

Process nodes using transforms in the transforms chain in ctx.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • nodes — the input node set.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxExecute

int xmlSecTransformCtxExecute(xmlSecTransformCtxPtr ctx, xmlDocPtr doc);

Source: include/xmlsec/transforms.h

Executes transforms chain in ctx.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • doc — the pointer to input document.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformCtxDebugDump

void xmlSecTransformCtxDebugDump(xmlSecTransformCtxPtr ctx, FILE *output);

Source: include/xmlsec/transforms.h

Prints transforms context debug information to output.

Prints transforms context debug information to output.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • output — the pointer to output FILE.

xmlSecTransformCtxDebugXmlDump

void xmlSecTransformCtxDebugXmlDump(xmlSecTransformCtxPtr ctx, FILE *output);

Source: include/xmlsec/transforms.h

Prints transforms context debug information to output in XML format.

Prints transforms context debug information to output in XML format.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • output — the pointer to output FILE.

xmlSecTransformCtxGetDefaultBinaryChunkSize

xmlSecSize xmlSecTransformCtxGetDefaultBinaryChunkSize(void);

Source: include/xmlsec/transforms.h

Gets the default binary chunk size.

Gets the binary chunk size. Increasing the chunk size improves XMLSec library performance at the expense of increased memory usage.

Returns: the current binary processing chunk size.


xmlSecTransformCtxSetDefaultBinaryChunkSize

void xmlSecTransformCtxSetDefaultBinaryChunkSize(xmlSecSize binaryChunkSize);

Source: include/xmlsec/transforms.h

Sets the default binary chunk size.

Sets the default binary chunk size. Increasing the chunk size improves XMLSec library performance at the expense of increased memory usage. This function is not thread safe and should only be called during initialization.

Parameters:

  • binaryChunkSize — the new binary chunk size (must be greater than zero).

xmlSecTransformCtxGetDefaultMaxDepth

unsigned int xmlSecTransformCtxGetDefaultMaxDepth(void);

Source: include/xmlsec/transforms.h

Gets the default max depth.

Gets the max depth for transform context execution.

Returns: the current max depth value.


xmlSecTransformCtxSetDefaultMaxDepth

void xmlSecTransformCtxSetDefaultMaxDepth(unsigned int maxDepth);

Source: include/xmlsec/transforms.h

Sets the default max depth.

Sets the max depth for transform context execution. If set to 0, max depth check is disabled. This function is not thread safe and should only be called during initialization.

Parameters:

  • maxDepth — the new max depth value.

xmlSecTransformCtxExtraKeyDataGet

xmlSecKeyDataPtr xmlSecTransformCtxExtraKeyDataGet(xmlSecTransformCtxPtr ctx, xmlSecKeyDataId dataId);

Source: include/xmlsec/transforms.h

Gets extra key data with a given dataId from the transforms context.

Returns the existing key data object with klass dataId from ctx->extraKeyData list, or NULL if the list is empty or no matching entry is found.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • dataId — the requested key data klass.

Returns: pointer to key data or NULL if not found.


xmlSecTransformCtxExtraKeyDataEnsure

xmlSecKeyDataPtr xmlSecTransformCtxExtraKeyDataEnsure(xmlSecTransformCtxPtr ctx, xmlSecKeyDataId dataId);

Source: include/xmlsec/transforms.h

Ensures extra key data with a given dataId exists in the transforms context.

Returns the existing key data object with klass dataId from ctx->extraKeyData, or creates and adds a new one if not present. The ctx takes ownership of any newly created key data.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • dataId — the requested key data klass.

Returns: pointer to key data or NULL if an error occurs.


xmlSecTransformCtxExtraKeyDataAdopt

int xmlSecTransformCtxExtraKeyDataAdopt(xmlSecTransformCtxPtr ctx, xmlSecKeyDataPtr data);

Source: include/xmlsec/transforms.h

Adopts key data into the transforms context extra key data list.

Adds data to ctx->extraKeyData list. The context takes ownership of data. Returns an error if key data of the same type already exists in the list.

Parameters:

  • ctx — the pointer to transforms chain processing context.
  • data — the key data to adopt (must not be NULL).

Returns: 0 on success or a negative value if an error occurs (including when key data of the same type is already present).


xmlSecTransformCreate

xmlSecTransformPtr xmlSecTransformCreate(xmlSecTransformId id);

Source: include/xmlsec/transforms.h

Creates a new transform of the specified klass.

Creates new transform of the id klass. The caller is responsible for destroying returned transform using xmlSecTransformDestroy function.

Parameters:

  • id — the transform id to create.

Returns: pointer to newly created transform or NULL if an error occurs.


xmlSecTransformDestroy

void xmlSecTransformDestroy(xmlSecTransformPtr transform);

Source: include/xmlsec/transforms.h

Destroys a transform object.

Destroys transform created with xmlSecTransformCreate function.

Parameters:

  • transform — the pointer to transform.

xmlSecTransformNodeRead

xmlSecTransformPtr xmlSecTransformNodeRead(xmlNodePtr node, xmlSecTransformUsage usage, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Reads a transform from a node.

Reads transform from the node as follows:

  1. reads "Algorithm" attribute;

  2. checks the lists of known and allowed transforms;

  3. calls transform's create method;

  4. calls transform's read transform node method.

Parameters:

  • node — the pointer to the transform's node.
  • usage — the transform usage (signature, encryption, ...).
  • transformCtx — the transform's chain processing context.

Returns: pointer to newly created transform or NULL if an error occurs.


xmlSecTransformPump

int xmlSecTransformPump(xmlSecTransformPtr left, xmlSecTransformPtr right, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Pops data from left transform and pushes to right transform.

Pops data from left transform and pushes to right transform until no more data is available.

Parameters:

  • left — the source pumping transform.
  • right — the destination pumping transform.
  • transformCtx — the transform's chain processing context.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformSetKey

int xmlSecTransformSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key);

Source: include/xmlsec/transforms.h

Sets the transform's key.

Parameters:

  • transform — the pointer to transform.
  • key — the pointer to key.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformSetKeyReq

int xmlSecTransformSetKeyReq(xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq);

Source: include/xmlsec/transforms.h

Sets the key requirements for transform in keyReq.

Sets the key requirements for transform in the keyReq.

Parameters:

  • transform — the pointer to transform.
  • keyReq — the pointer to keys requirements object.

Returns: 0 on success or a negative value otherwise.


xmlSecTransformVerify

int xmlSecTransformVerify(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Verifies data against the transform's processing results.

Verifies the data with transform's processing results (for digest, HMAC and signature transforms). The verification result is stored in the status member of xmlSecTransform object.

Parameters:

  • transform — the pointer to transform.
  • data — the binary data for verification.
  • dataSize — the data size.
  • transformCtx — the transform's chain processing context.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformVerifyNodeContent

int xmlSecTransformVerifyNodeContent(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Verifies binary results from base64-decoded node content.

Gets the node content, base64 decodes it and calls xmlSecTransformVerify function to verify binary results.

Parameters:

  • transform — the pointer to transform.
  • node — the pointer to node.
  • transformCtx — the transform's chain processing context.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformGetDataType

xmlSecTransformDataType xmlSecTransformGetDataType(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Gets transform input or output data type (binary or XML).

Gets transform input (mode is "push") or output (mode is "pop") data type (binary or XML).

Parameters:

  • transform — the pointer to transform.
  • mode — the data mode (push or pop).
  • transformCtx — the transform's chain processing context.

Returns: the transform's data type for the mode operation.


xmlSecTransformPushBin

int xmlSecTransformPushBin(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Processes binary data and pushes results to next transform.

Process binary data and pushes results to next transform.

Parameters:

  • transform — the pointer to transform object.
  • data — the input binary data,
  • dataSize — the input data size.
  • final — the flag: if set to 1 then it's the last data chunk.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformPopBin

int xmlSecTransformPopBin(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Pops data from previous transform, processes it, and returns result.

Pops data from previous transform in the chain, processes data and returns result in the data buffer. The size of returned data is placed in the dataSize.

Parameters:

  • transform — the pointer to transform object.
  • data — the buffer to store result data.
  • maxDataSize — the size of the buffer data.
  • dataSize — the pointer to returned data size.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformPushXml

int xmlSecTransformPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Processes nodes and pushes result to the next transform.

Processes nodes and pushes result to the next transform in the chain.

Parameters:

  • transform — the pointer to transform object.
  • nodes — the input nodes.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformPopXml

int xmlSecTransformPopXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Pops data from previous transform, processes it, and returns nodes.

Pops data from previous transform in the chain, processes the data and returns result in nodes.

Parameters:

  • transform — the pointer to transform object.
  • nodes — the pointer to store popinter to result nodes.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformExecute

int xmlSecTransformExecute(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Executes a transform (used by default push/pop methods).

Executes transform (used by default popBin/pushBin/popXml/pushXml methods).

Parameters:

  • transform — the pointer to transform.
  • last — the flag: if set to 1 then it's the last data chunk.
  • transformCtx — the transform's chain processing context.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformDebugDump

void xmlSecTransformDebugDump(xmlSecTransformPtr transform, FILE *output);

Source: include/xmlsec/transforms.h

Prints transform's debug information to output.

Parameters:

  • transform — the pointer to transform.
  • output — the pointer to output FILE.

xmlSecTransformDebugXmlDump

void xmlSecTransformDebugXmlDump(xmlSecTransformPtr transform, FILE *output);

Source: include/xmlsec/transforms.h

Prints transform's debug information to output in XML format.

Prints transform's debug information to output in XML format.

Parameters:

  • transform — the pointer to transform.
  • output — the pointer to output FILE.

xmlSecTransformConnect

int xmlSecTransformConnect(xmlSecTransformPtr left, xmlSecTransformPtr right, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Connects two transforms in the chain, inserting a conversion if needed.

If the data object is a node-set and the next transform requires octets, the signature application MUST attempt to convert the node-set to an octet stream using Canonical XML [XML-C14N].

The story is different if the right transform is base64 decode (http://www.w3.org/TR/xmldsig-core/#sec-Base-64):

This transform requires an octet stream for input. If an XPath node-set (or sufficiently functional alternative) is given as input, then it is converted to an octet stream by performing operations logically equivalent to 1) applying an XPath transform with expression self::text(), then 2) taking the string-value of the node-set. Thus, if an XML element is identified by a barename XPointer in the Reference URI, and its content consists solely of base64 encoded character data, then this transform automatically strips away the start and end tags of the identified element and any of its descendant elements as well as any descendant comments and processing instructions. The output of this transform is an octet stream.

Parameters:

  • left — the pointer to left (prev) transform.
  • right — the pointer to right (next) transform.
  • transformCtx — the transform's chain processing context.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformRemove

void xmlSecTransformRemove(xmlSecTransformPtr transform);

Source: include/xmlsec/transforms.h

Removes transform from the chain.

Parameters:

  • transform — the pointer to xmlSecTransform structure.

xmlSecTransformDefaultGetDataType

xmlSecTransformDataType xmlSecTransformDefaultGetDataType(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Gets transform data type by analyzing available push/pop methods.

Gets transform input (mode is "push") or output (mode is "pop") data type (binary or XML) by analyzing available pushBin/popBin/pushXml/popXml methods.

Parameters:

  • transform — the pointer to transform.
  • mode — the data mode (push or pop).
  • transformCtx — the transform's chain processing context.

Returns: the transform's data type for the mode operation.


xmlSecTransformDefaultPushBin

int xmlSecTransformDefaultPushBin(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Processes binary data via execute method and pushes results.

Process binary data by calling transform's execute method and pushes results to next transform.

Parameters:

  • transform — the pointer to transform object.
  • data — the input binary data,
  • dataSize — the input data size.
  • final — the flag: if set to 1 then it's the last data chunk.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformDefaultPopBin

int xmlSecTransformDefaultPopBin(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Pops and processes data via execute method, returns result.

Pops data from previous transform in the chain, processes data by calling transform's execute method and returns result in the data buffer. The size of returned data is placed in the dataSize.

Parameters:

  • transform — the pointer to transform object.
  • data — the buffer to store result data.
  • maxDataSize — the size of the buffer data.
  • dataSize — the pointer to returned data size.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformDefaultPushXml

int xmlSecTransformDefaultPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Processes nodes via execute method and pushes result.

Processes nodes by calling transform's execute method and pushes result to the next transform in the chain.

Parameters:

  • transform — the pointer to transform object.
  • nodes — the input nodes.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformDefaultPopXml

int xmlSecTransformDefaultPopXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Pops data, processes via execute method, and returns result nodes.

Pops data from previous transform in the chain, processes the data by calling transform's execute method and returns result in nodes.

Parameters:

  • transform — the pointer to transform object.
  • nodes — the pointer to store popinter to result nodes.
  • transformCtx — the pointer to transform context object.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformCreateOutputBuffer

xmlOutputBufferPtr xmlSecTransformCreateOutputBuffer(xmlSecTransformPtr transform, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Creates an output buffer to write data to transform.

Creates output buffer to write data to transform.

Parameters:

  • transform — the pointer to transform.
  • transformCtx — the pointer to transform context object.

Returns: pointer to new output buffer or NULL if an error occurs.


xmlSecTransformCreateInputBuffer

xmlParserInputBufferPtr xmlSecTransformCreateInputBuffer(xmlSecTransformPtr transform, xmlSecTransformCtxPtr transformCtx);

Source: include/xmlsec/transforms.h

Creates an input buffer to read data from transform.

Creates input buffer to read data from transform.

Parameters:

  • transform — the pointer to transform.
  • transformCtx — the pointer to transform context object.

Returns: pointer to new input buffer or NULL if an error occurs.


xmlSecTransformIdListGetKlass

xmlSecPtrListId xmlSecTransformIdListGetKlass(void);

Source: include/xmlsec/transforms.h

The transform id list klass.

Returns: pointer to the transform id list klass.


xmlSecTransformIdListFind

int xmlSecTransformIdListFind(xmlSecPtrListPtr list, xmlSecTransformId transformId);

Source: include/xmlsec/transforms.h

Lookups dataId in list.

Parameters:

  • list — the pointer to transform ids list.
  • transformId — the transform klass.

Returns: 1 if dataId is found in the list, 0 if not and a negative value if an error occurs.


xmlSecTransformIdListFindByHref

xmlSecTransformId xmlSecTransformIdListFindByHref(xmlSecPtrListPtr list, const xmlChar *href, xmlSecTransformUsage usage);

Source: include/xmlsec/transforms.h

Looks up a transform klass by href and usage in the list.

Lookups data klass in the list with given href and usage in list.

Parameters:

  • list — the pointer to transform ids list.
  • href — the desired transform klass href.
  • usage — the desired transform usage.

Returns: transform klass is found and NULL otherwise.


xmlSecTransformIdListFindByName

xmlSecTransformId xmlSecTransformIdListFindByName(xmlSecPtrListPtr list, const xmlChar *name, xmlSecTransformUsage usage);

Source: include/xmlsec/transforms.h

Looks up a transform klass by name and usage in the list.

Lookups data klass in the list with given name and usage in list.

Parameters:

  • list — the pointer to transform ids list.
  • name — the desired transform klass name.
  • usage — the desired transform usage.

Returns: transform klass is found and NULL otherwise.


xmlSecTransformIdListDebugDump

void xmlSecTransformIdListDebugDump(xmlSecPtrListPtr list, FILE *output);

Source: include/xmlsec/transforms.h

Prints transform ids list debug information to output.

Prints binary transform debug information to output.

Parameters:

  • list — the pointer to transform ids list.
  • output — the pointer to output FILE.

xmlSecTransformIdListDebugXmlDump

void xmlSecTransformIdListDebugXmlDump(xmlSecPtrListPtr list, FILE *output);

Source: include/xmlsec/transforms.h

Prints transform ids list debug information to output in XML format.

Prints binary transform debug information to output in XML format.

Parameters:

  • list — the pointer to transform ids list.
  • output — the pointer to output FILE.

xmlSecTransformBase64GetKlass

xmlSecTransformId xmlSecTransformBase64GetKlass(void);

Source: include/xmlsec/transforms.h

Gets the Base64 transform klass.

The Base64 transform klass (http://www.w3.org/TR/xmldsig-core/#sec-Base-64). The normative specification for base64 decoding transforms is RFC 2045 (http://www.ietf.org/rfc/rfc2045.txt). The base64 Transform element has no content. The input is decoded by the algorithms. This transform is useful if an application needs to sign the raw data associated with the encoded content of an element.

Returns: base64 transform id.


xmlSecTransformBase64SetLineSize

void xmlSecTransformBase64SetLineSize(xmlSecTransformPtr transform, xmlSecSize lineSize);

Source: include/xmlsec/transforms.h

Sets the max line size to lineSize.

Parameters:

  • transform — the pointer to BASE64 encode transform.
  • lineSize — the new max line size.

xmlSecTransformInclC14NGetKlass

xmlSecTransformId xmlSecTransformInclC14NGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the inclusive C14N transform klass.

Inclusive (regular) canonicalization that omits comments transform klass (http://www.w3.org/TR/xmldsig-core/#sec-c14nAlg and http://www.w3.org/TR/2001/REC-xml-c14n-20010315).

Returns: c14n transform id.


xmlSecTransformInclC14NWithCommentsGetKlass

xmlSecTransformId xmlSecTransformInclC14NWithCommentsGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the inclusive C14N with comments transform klass.

Inclusive (regular) canonicalization that includes comments transform klass (http://www.w3.org/TR/xmldsig-core/#sec-c14nAlg and http://www.w3.org/TR/2001/REC-xml-c14n-20010315).

Returns: c14n with comments transform id.


xmlSecTransformInclC14N11GetKlass

xmlSecTransformId xmlSecTransformInclC14N11GetKlass(void);

Source: include/xmlsec/transforms.h

Gets the C14N v1.1 transform klass.

C14N version 1.1 (http://www.w3.org/TR/xml-c14n11)

Returns: c14n v1.1 transform id.


xmlSecTransformInclC14N11WithCommentsGetKlass

xmlSecTransformId xmlSecTransformInclC14N11WithCommentsGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the C14N v1.1 with comments transform klass.

C14N version 1.1 (http://www.w3.org/TR/xml-c14n11) with comments

Returns: c14n v1.1 with comments transform id.


xmlSecTransformExclC14NGetKlass

xmlSecTransformId xmlSecTransformExclC14NGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the exclusive C14N transform klass.

Exclusive canoncicalization that omits comments transform klass (http://www.w3.org/TR/xml-exc-c14n/).

Returns: exclusive c14n transform id.


xmlSecTransformExclC14NWithCommentsGetKlass

xmlSecTransformId xmlSecTransformExclC14NWithCommentsGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the exclusive C14N with comments transform klass.

Exclusive canoncicalization that includes comments transform klass (http://www.w3.org/TR/xml-exc-c14n/).

Returns: exclusive c14n with comments transform id.


xmlSecTransformEnvelopedGetKlass

xmlSecTransformId xmlSecTransformEnvelopedGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the enveloped signature transform klass.

The enveloped transform klass (http://www.w3.org/TR/xmldsig-core/#sec-EnvelopedSignature):

An enveloped signature transform T removes the whole Signature element containing T from the digest calculation of the Reference element containing T. The entire string of characters used by an XML processor to match the Signature with the XML production element is removed. The output of the transform is equivalent to the output that would result from replacing T with an XPath transform containing the following XPath parameter element:

<XPathxmlns:dsig="...">
count(ancestor-or-self::dsig:Signature|
here()/ancestor::dsig:Signature[1])>
count(ancestor-or-self::dsig:Signature)
</XPath>

The input and output requirements of this transform are identical to those of the XPath transform, but may only be applied to a node-set from its parent XML document. Note that it is not necessary to use an XPath expression evaluator to create this transform. However, this transform MUST produce output in exactly the same manner as the XPath transform parameterized by the XPath expression above.

Returns: enveloped transform id.


xmlSecTransformXPathGetKlass

xmlSecTransformId xmlSecTransformXPathGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the XPath transform klass.

The XPath transform evaluates given XPath expression and intersects the result with the previous nodes set. See http://www.w3.org/TR/xmldsig-core/#sec-XPath for more details.

Returns: XPath transform id.


xmlSecTransformXPath2GetKlass

xmlSecTransformId xmlSecTransformXPath2GetKlass(void);

Source: include/xmlsec/transforms.h

Gets the XPath2 transform klass.

The XPath2 transform (http://www.w3.org/TR/xmldsig-filter2/).

Returns: XPath2 transform klass.


xmlSecTransformXPointerGetKlass

xmlSecTransformId xmlSecTransformXPointerGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the XPointer transform klass.

The XPointer transform klass (https://www.rfc-editor.org/rfc/rfc9231.html).

Returns: XPointer transform klass.


xmlSecTransformXPointerSetExpr

int xmlSecTransformXPointerSetExpr(xmlSecTransformPtr transform, const xmlChar *expr, xmlSecNodeSetType nodeSetType, xmlNodePtr hereNode);

Source: include/xmlsec/transforms.h

Sets the XPointer expression for a transform.

Sets the XPointer expression for an XPointer transform.

Parameters:

  • transform — the pointer to XPointer transform.
  • expr — the XPointer expression.
  • nodeSetType — the type of evaluated XPointer expression.
  • hereNode — the pointer to "here" node.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformRelationshipGetKlass

xmlSecTransformId xmlSecTransformRelationshipGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the Relationship transform klass.

Returns: Relationship transform klass.


xmlSecTransformXsltGetKlass

xmlSecTransformId xmlSecTransformXsltGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the XSLT transform klass.

XSLT transform klass (http://www.w3.org/TR/xmldsig-core/#sec-XSLT):

The normative specification for XSL Transformations is [XSLT]. Specification of a namespace-qualified stylesheet element, which MUST be the sole child of the Transform element, indicates that the specified style sheet should be used. Whether this instantiates in-line processing of local XSLT declarations within the resource is determined by the XSLT processing model; the ordered application of multiple stylesheet may require multiple Transforms. No special provision is made for the identification of a remote stylesheet at a given URI because it can be communicated via an xsl:include or xsl:import within the stylesheet child of the Transform.

This transform requires an octet stream as input. If the actual input is an XPath node-set, then the signature application should attempt to convert it to octets (apply Canonical XML]) as described in the Reference Processing Model (section 4.3.3.2).]

The output of this transform is an octet stream. The processing rules for the XSL style sheet or transform element are stated in the XSLT specification [XSLT]. We RECOMMEND that XSLT transform authors use an output method of xml for XML and HTML. As XSLT implementations do not produce consistent serializations of their output, we further RECOMMEND inserting a transform after the XSLT transform to canonicalize the output. These steps will help to ensure interoperability of the resulting signatures among applications that support the XSLT transform. Note that if the output is actually HTML, then the result of these steps is logically equivalent [XHTML].

Returns: pointer to XSLT transform klass.


xmlSecTransformXsltSetDefaultSecurityPrefs

void xmlSecTransformXsltSetDefaultSecurityPrefs(xsltSecurityPrefsPtr sec);

Source: include/xmlsec/transforms.h

Sets the default XSLT security preferences.

Sets the new default security preferences. The xmlsec default security policy is to disable everything.

Parameters:

  • sec — the new security preferences

xmlSecTransformRemoveXmlTagsC14NGetKlass

xmlSecTransformId xmlSecTransformRemoveXmlTagsC14NGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the 'remove xml tags' transform klass.

The "remove xml tags" transform klass (http://www.w3.org/TR/xmldsig-core/#sec-Base-64): Base64 transform requires an octet stream for input. If an XPath node-set (or sufficiently functional alternative) is given as input, then it is converted to an octet stream by performing operations logically equivalent to 1) applying an XPath transform with expression self::text(), then 2) taking the string-value of the node-set. Thus, if an XML element is identified by a barename XPointer in the Reference URI, and its content consists solely of base64 encoded character data, then this transform automatically strips away the start and end tags of the identified element and any of its descendant elements as well as any descendant comments and processing instructions. The output of this transform is an octet stream.

Returns: "remove xml tags" transform id.


xmlSecTransformVisa3DHackGetKlass

xmlSecTransformId xmlSecTransformVisa3DHackGetKlass(void);

Source: include/xmlsec/transforms.h

Gets the Visa3DHack transform klass.

The Visa3DHack transform klass. The only reason why we need this is Visa3D protocol. It doesn't follow XML/XPointer/XMLDSig specs and allows invalid XPointer expressions in the URI attribute. Since we couldn't evaluate such expressions thru XPath/XPointer engine, we need to have this hack here.

Returns: Visa3DHack transform klass.


xmlSecTransformVisa3DHackSetID

int xmlSecTransformVisa3DHackSetID(xmlSecTransformPtr transform, const xmlChar *id);

Source: include/xmlsec/transforms.h

Sets the ID value for an Visa3DHack transform.

Parameters:

  • transform — the pointer to Visa3DHack transform.
  • id — the ID value.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTransformHmacGetMinOutputBitsSize

xmlSecSize xmlSecTransformHmacGetMinOutputBitsSize(void);

Source: include/xmlsec/transforms.h

Gets the minimum size in bits for HMAC output.

Returns: the min HMAC output size in bits.


xmlSecTransformHmacSetMinOutputBitsSize

void xmlSecTransformHmacSetMinOutputBitsSize(xmlSecSize val);

Source: include/xmlsec/transforms.h

Sets the min HMAC output size in bits.

Sets the min HMAC output size in bits. Low value for min output size might create a security vulnerability and is not recommended.

Parameters:

  • val — the new min hmac output size in bits.

Clone this wiki locally