Esempio n. 1
0
/**
 * xmlSecEncCtxFinalize:
 * @encCtx:             the pointer to <enc:EncryptedData/> processing context.
 *
 * Cleans up @encCtx object.
 */
void
xmlSecEncCtxFinalize(xmlSecEncCtxPtr encCtx) {
    xmlSecAssert(encCtx != NULL);

    xmlSecEncCtxReset(encCtx);

    xmlSecTransformCtxFinalize(&(encCtx->transformCtx));
    xmlSecKeyInfoCtxFinalize(&(encCtx->keyInfoReadCtx));
    xmlSecKeyInfoCtxFinalize(&(encCtx->keyInfoWriteCtx));

    memset(encCtx, 0, sizeof(xmlSecEncCtx));
}
Esempio n. 2
0
PyObject *xmlsec_TransformCtxFinalize(PyObject *self, PyObject *args) {
  PyObject *ctx_obj;
  xmlSecTransformCtxPtr ctx;

  if (CheckArgs(args, "O:transformCtxFinalize")) {
    if(!PyArg_ParseTuple(args, (char *) "O:transformCtxFinalize", &ctx_obj))
      return NULL;
  }
  else return NULL;

  ctx = xmlSecTransformCtxPtr_get(ctx_obj);
  xmlSecTransformCtxFinalize(ctx);

  Py_INCREF(Py_None);
  return (Py_None);
}