summaryrefslogtreecommitdiff
path: root/php_suhosin7.h
diff options
context:
space:
mode:
Diffstat (limited to 'php_suhosin7.h')
-rw-r--r--php_suhosin7.h44
1 files changed, 37 insertions, 7 deletions
diff --git a/php_suhosin7.h b/php_suhosin7.h
index 0a40316..eaf2f87 100644
--- a/php_suhosin7.h
+++ b/php_suhosin7.h
@@ -122,8 +122,6 @@ protected_varname:
122 122
123 123
124ZEND_BEGIN_MODULE_GLOBALS(suhosin7) 124ZEND_BEGIN_MODULE_GLOBALS(suhosin7)
125 // zend_long global_value;
126 // char *global_string;
127 zend_bool protectkey; 125 zend_bool protectkey;
128 126
129 zend_bool simulation; 127 zend_bool simulation;
@@ -307,7 +305,7 @@ ZEND_BEGIN_MODULE_GLOBALS(suhosin7)
307 zend_bool log_file_time; 305 zend_bool log_file_time;
308 306
309 /* header handler */ 307 /* header handler */
310 // zend_bool allow_multiheader; 308 zend_bool allow_multiheader;
311 309
312 /* mailprotect */ 310 /* mailprotect */
313 // long mailprotect; 311 // long mailprotect;
@@ -362,18 +360,43 @@ ZEND_EXTERN_MODULE_GLOBALS(suhosin7)
362 360
363/* functions */ 361/* functions */
364 362
365unsigned int suhosin_input_filter(int arg, char *var, char **val, size_t val_len, size_t *new_val_len); 363// unsigned int suhosin_input_filter(int arg, char *var, char **val, size_t val_len, size_t *new_val_len);
366unsigned int suhosin_input_filter_wrapper(int arg, char *var, char **val, size_t val_len, size_t *new_val_len); 364// unsigned int suhosin_input_filter_wrapper(int arg, char *var, char **val, size_t val_len, size_t *new_val_len);
367SUHOSIN7_API void suhosin_log(int loglevel, char *fmt, ...); 365SUHOSIN7_API void suhosin_log(int loglevel, char *fmt, ...);
368extern unsigned int (*old_input_filter)(int arg, char *var, char **val, size_t val_len, size_t *new_val_len); 366// extern unsigned int (*orig_input_filter)(int arg, char *var, char **val, size_t val_len, size_t *new_val_len);
369char *suhosin_getenv(char *name, size_t name_len); 367char *suhosin_getenv(char *name, size_t name_len);
370 368
369// hooks
371void suhosin_hook_memory_limit(); 370void suhosin_hook_memory_limit();
372void suhosin_hook_treat_data(); 371void suhosin_hook_treat_data();
373void suhosin_hook_execute(); 372void suhosin_hook_input_filter();
374void suhosin_hook_register_server_variables(); 373void suhosin_hook_register_server_variables();
374void suhosin_hook_header_handler();
375void suhosin_unhook_header_handler();
376void suhosin_hook_execute();
375// void suhosin_hook_sha256(); 377// void suhosin_hook_sha256();
376 378
379// ifilter.c
380void suhosin_normalize_varname(char *varname);
381
382// cookiecrypt.c
383char *suhosin_cookie_decryptor(char *raw_cookie);
384zend_string *suhosin_encrypt_single_cookie(char *name, int name_len, char *value, int value_len, char *key);
385char *suhosin_decrypt_single_cookie(char *name, int name_len, char *value, int value_len, char *key, char **out);
386
387// crypt.c
388zend_string *suhosin_encrypt_string(char *str, int len, char *var, int vlen, char *key);
389zend_string *suhosin_decrypt_string(char *str, int padded_len, char *var, int vlen, char *key, int check_ra);
390char *suhosin_generate_key(char *key, zend_bool ua, zend_bool dr, long raddr, char *cryptkey);
391
392// aes.c
393void suhosin_aes_gentables();
394void suhosin_aes_gkey(int nb,int nk,char *key);
395void suhosin_aes_encrypt(char *buff);
396void suhosin_aes_decrypt(char *buff);
397
398//
399
377static inline void suhosin_bailout() 400static inline void suhosin_bailout()
378{ 401{
379 if (!SUHOSIN7_G(simulation)) { 402 if (!SUHOSIN7_G(simulation)) {
@@ -381,6 +404,13 @@ static inline void suhosin_bailout()
381 } 404 }
382} 405}
383 406
407static inline char *suhosin_get_active_function_name() {
408 char *fn = (char *)get_active_function_name();
409 if (fn == NULL) {
410 return "unknown";
411 }
412 return fn;
413}
384 414
385#endif /* PHP_SUHOSIN7_H */ 415#endif /* PHP_SUHOSIN7_H */
386 416