/** * xmlSecInit: * * Initializes XML Security Library. The depended libraries * (LibXML and LibXSLT) must be initialized before. * * Returns 0 on success or a negative value otherwise. */ int xmlSecInit(void) { xmlSecErrorsInit(); xmlSecIOInit(); #ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING if(xmlSecCryptoDLInit() < 0) { xmlSecErr_a_ignorar5(XMLSEC_ERRORS_HERE, NULL, "xmlSecCryptoDLInit", XMLSEC_ERRORS_R_XMLSEC_FAILED, XMLSEC_ERRORS_NO_MESSAGE); return(-1); } #endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */ if(xmlSecKeyDataIdsInit() < 0) { xmlSecErr_a_ignorar5(XMLSEC_ERRORS_HERE, NULL, "xmlSecKeyDataIdsInit", XMLSEC_ERRORS_R_XMLSEC_FAILED, XMLSEC_ERRORS_NO_MESSAGE); return(-1); } if(xmlSecTransformIdsInit() < 0) { xmlSecErr_a_ignorar5(XMLSEC_ERRORS_HERE, NULL, "xmlSecTransformIdsInit", XMLSEC_ERRORS_R_XMLSEC_FAILED, XMLSEC_ERRORS_NO_MESSAGE); return(-1); } #ifndef XMLSEC_NO_XKMS if(xmlSecXkmsRespondWithIdsInit() < 0) { xmlSecErr_a_ignorar5(XMLSEC_ERRORS_HERE, NULL, "xmlSecXkmsRespondWithIdsInit", XMLSEC_ERRORS_R_XMLSEC_FAILED, XMLSEC_ERRORS_NO_MESSAGE); return(-1); } if(xmlSecXkmsServerRequestIdsInit() < 0) { xmlSecErr_a_ignorar5(XMLSEC_ERRORS_HERE, NULL, "xmlSecXkmsServerRequestIdsInit", XMLSEC_ERRORS_R_XMLSEC_FAILED, XMLSEC_ERRORS_NO_MESSAGE); return(-1); } #endif /* XMLSEC_NO_XKMS */ /* we use rand() function to generate id attributes */ srand(time(NULL)); return(0); }
/* not wrap */ PyObject *xmlsec_ErrorsInit(PyObject *self, PyObject *args) { xmlSecErrorsInit(); Py_INCREF(Py_None); return (Py_None); }