mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds whoAmI method to ModSecurity class
The method returns information about the ModSecurity's version and the platform that it was compiled. Further it will be used by the audit logs and by the connectors. msc_who_am_i was added accordingly, to the C api.
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
#ifdef __cplusplus
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -94,14 +95,14 @@ typedef struct ModSecurity_t ModSecurity;
|
||||
#include "modsecurity/rules.h"
|
||||
|
||||
|
||||
|
||||
#define MODSECURITY_MAJOR "3"
|
||||
#define MODSECURITY_MINOR "0"
|
||||
#define MODSECURITY_PATCHLEVEL "0"
|
||||
|
||||
#define MODSECURITY_TAG "-alpha"
|
||||
|
||||
#define MODSECURITY_VERSION MODSECURITY_MAJOR "." \
|
||||
MODSECURITY_MINOR "." MODSECURITY_PATCHLEVEL
|
||||
MODSECURITY_MINOR "." MODSECURITY_PATCHLEVEL \
|
||||
MODSECURITY_TAG
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -122,6 +123,8 @@ class ModSecurity {
|
||||
ModSecurity();
|
||||
~ModSecurity() { }
|
||||
|
||||
static std::string whoAmI();
|
||||
|
||||
/**
|
||||
*
|
||||
* The Phases enumerator consists in mapping the different stages of a
|
||||
@@ -208,6 +211,8 @@ extern "C" {
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
ModSecurity *msc_init();
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
const char *msc_who_am_i(ModSecurity *msc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user