# XML Signature
[OMXMLSecurity]

## Functions
AXIS2_EXTERN axis2_status_t | oxs_xml_sig_sign (const axutil_env_t *env, oxs_sign_ctx_t *sign_ctx, axiom_node_t *parent, axiom_node_t **sig_node)
AXIS2_EXTERN axis2_status_t | oxs_xml_sig_verify (const axutil_env_t *env, oxs_sign_ctx_t *sign_ctx, axiom_node_t *signature_node, axiom_node_t *scope_node)
AXIS2_EXTERN axis2_status_t | oxs_xml_sig_verify_sign_part (const axutil_env_t *env, oxs_sign_part_t *sign_part)
AXIS2_EXTERN axis2_status_t | oxs_xml_sig_verify_digests (const axutil_env_t *env, oxs_sign_ctx_t *sign_ctx)
AXIS2_EXTERN axis2_status_t | oxs_xml_sig_process_ref_node (const axutil_env_t *env, oxs_sign_part_t *sign_part, axiom_node_t *ref_node, axiom_node_t *scope_node)
AXIS2_EXTERN axis2_status_t | oxs_xml_sig_process_signature_node (const axutil_env_t *env, oxs_sign_ctx_t *sign_ctx, axiom_node_t *signature_node, axiom_node_t *scope_node)

## Function Documentation

AXIS2_EXTERN axis2_status_t oxs_xml_sig_process_ref_node | ( | const axutil_env_t * | env,
|  | oxs_sign_part_t * | sign_part,
|  | axiom_node_t * | ref_node,
|  | axiom_node_t * | scope_node |
| ) |  |  |

Process the ds:Reference node. Populate a signature part pointer to environment struct the signature part the ds:Reference node the root node in which the referenced are found

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_xml_sig_process_signature_node | ( | const axutil_env_t * | env,
|  | oxs_sign_ctx_t * | sign_ctx,
|  | axiom_node_t * | signature_node,
|  | axiom_node_t * | scope_node |
| ) |  |  |

Process the ds:Signature node. Populate a signature context pointer to environment struct the signature context the ds:Signature node the root node in which the referenced are found

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_xml_sig_sign | ( | const axutil_env_t * | env,
|  | oxs_sign_ctx_t * | sign_ctx,
|  | axiom_node_t * | parent,
|  | axiom_node_t ** | sig_node |
| ) |  |  |

Sign according to the information available in the . pointer to environment struct the signature context the node that the ds:Signature element should be attached. a reference to the ds:Signature node

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_xml_sig_verify | ( | const axutil_env_t * | env,
|  | oxs_sign_ctx_t * | sign_ctx,
|  | axiom_node_t * | signature_node,
|  | axiom_node_t * | scope_node |
| ) |  |  |

Verify a complete xml document pointer to environment struct the signature context the ds:Signature node the root node in which the referenced are found

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_xml_sig_verify_digests | ( | const axutil_env_t * | env,
|  | oxs_sign_ctx_t * | sign_ctx |
| ) |  |  |

Verify all digests in signature parts of a single signature context pointer to environment struct the signature context

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_xml_sig_verify_sign_part | ( | const axutil_env_t * | env,
|  | oxs_sign_part_t * | sign_part |
| ) |  |  |

Verify a single signature part . Do transforms, Generate digest and compare with the digest in hand pointer to environment struct the signature part

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE