/** * xsltSetSecurityPrefs: * @sec: the security block to update * @option: the option to update * @func: the user callback to use for this option * * Update the security option to use the new callback checking function * * Returns -1 in case of error, 0 otherwise */ int xsltSetSecurityPrefs(xsltSecurityPrefsPtr sec, xsltSecurityOption option, xsltSecurityCheck func) { xsltInitGlobals(); if (sec == NULL) return(-1); switch (option) { case XSLT_SECPREF_READ_FILE: sec->readFile = func; return(0); case XSLT_SECPREF_WRITE_FILE: sec->createFile = func; return(0); case XSLT_SECPREF_CREATE_DIRECTORY: sec->createDir = func; return(0); case XSLT_SECPREF_READ_NETWORK: sec->readNet = func; return(0); case XSLT_SECPREF_WRITE_NETWORK: sec->writeNet = func; return(0); } return(-1); }
/** * xsltNewSecurityPrefs: * * Create a new security preference block * * Returns a pointer to the new block or NULL in case of error */ xsltSecurityPrefsPtr xsltNewSecurityPrefs(void) { xsltSecurityPrefsPtr ret; xsltInitGlobals(); ret = (xsltSecurityPrefsPtr) xmlMalloc(sizeof(xsltSecurityPrefs)); if (ret == NULL) { xsltTransformError(NULL, NULL, NULL, "xsltNewSecurityPrefs : malloc failed\n"); return(NULL); } memset(ret, 0, sizeof(xsltSecurityPrefs)); return(ret); }
/** * exsltRegisterAll: * * Registers all available EXSLT extensions */ void exsltRegisterAll (void) { xsltInitGlobals(); exsltCommonRegister(); #ifdef EXSLT_CRYPTO_ENABLED exsltCryptoRegister(); #endif exsltMathRegister(); exsltSetsRegister(); exsltFuncRegister(); exsltStrRegister(); exsltDateRegister(); exsltSaxonRegister(); exsltDynRegister(); }