File indexing completed on 2024-11-15 09:44:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __XML_XSLT_SECURITY_H__
0013 #define __XML_XSLT_SECURITY_H__
0014
0015 #include <libxml/tree.h>
0016 #include "xsltexports.h"
0017 #include "xsltInternals.h"
0018
0019 #ifdef __cplusplus
0020 extern "C" {
0021 #endif
0022
0023
0024
0025
0026
0027
0028
0029 typedef struct _xsltSecurityPrefs xsltSecurityPrefs;
0030 typedef xsltSecurityPrefs *xsltSecurityPrefsPtr;
0031
0032
0033
0034
0035
0036
0037 typedef enum {
0038 XSLT_SECPREF_READ_FILE = 1,
0039 XSLT_SECPREF_WRITE_FILE,
0040 XSLT_SECPREF_CREATE_DIRECTORY,
0041 XSLT_SECPREF_READ_NETWORK,
0042 XSLT_SECPREF_WRITE_NETWORK
0043 } xsltSecurityOption;
0044
0045
0046
0047
0048
0049
0050
0051 typedef int (*xsltSecurityCheck) (xsltSecurityPrefsPtr sec,
0052 xsltTransformContextPtr ctxt,
0053 const char *value);
0054
0055
0056
0057
0058 XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
0059 xsltNewSecurityPrefs (void);
0060 XSLTPUBFUN void XSLTCALL
0061 xsltFreeSecurityPrefs (xsltSecurityPrefsPtr sec);
0062 XSLTPUBFUN int XSLTCALL
0063 xsltSetSecurityPrefs (xsltSecurityPrefsPtr sec,
0064 xsltSecurityOption option,
0065 xsltSecurityCheck func);
0066 XSLTPUBFUN xsltSecurityCheck XSLTCALL
0067 xsltGetSecurityPrefs (xsltSecurityPrefsPtr sec,
0068 xsltSecurityOption option);
0069
0070 XSLTPUBFUN void XSLTCALL
0071 xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec);
0072 XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
0073 xsltGetDefaultSecurityPrefs (void);
0074
0075 XSLTPUBFUN int XSLTCALL
0076 xsltSetCtxtSecurityPrefs (xsltSecurityPrefsPtr sec,
0077 xsltTransformContextPtr ctxt);
0078
0079 XSLTPUBFUN int XSLTCALL
0080 xsltSecurityAllow (xsltSecurityPrefsPtr sec,
0081 xsltTransformContextPtr ctxt,
0082 const char *value);
0083 XSLTPUBFUN int XSLTCALL
0084 xsltSecurityForbid (xsltSecurityPrefsPtr sec,
0085 xsltTransformContextPtr ctxt,
0086 const char *value);
0087
0088
0089
0090 XSLTPUBFUN int XSLTCALL
0091 xsltCheckWrite (xsltSecurityPrefsPtr sec,
0092 xsltTransformContextPtr ctxt,
0093 const xmlChar *URL);
0094 XSLTPUBFUN int XSLTCALL
0095 xsltCheckRead (xsltSecurityPrefsPtr sec,
0096 xsltTransformContextPtr ctxt,
0097 const xmlChar *URL);
0098
0099 #ifdef __cplusplus
0100 }
0101 #endif
0102
0103 #endif
0104