mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix C api signatures
This commit is contained in:
parent
e016b72a8e
commit
6beca48c54
@ -58,7 +58,7 @@ class Rules : public RulesProperties {
|
||||
void decrementReferenceCount(void);
|
||||
|
||||
bool loadFromUri(const char *uri);
|
||||
bool loadRemote(char *key, char *uri);
|
||||
bool loadRemote(const char *key, const char *uri);
|
||||
bool load(const char *rules);
|
||||
bool load(const char *rules, const std::string &ref);
|
||||
|
||||
@ -89,9 +89,9 @@ extern "C" {
|
||||
Rules *msc_create_rules_set();
|
||||
void msc_rules_dump(Rules *rules);
|
||||
int msc_rules_merge(Rules *rules_dst, Rules *rules_from);
|
||||
int msc_rules_add_remote(Rules *rules, char *key, char *uri,
|
||||
int msc_rules_add_remote(Rules *rules, const char *key, const char *uri,
|
||||
const char **error);
|
||||
int msc_rules_add_file(Rules *rules, char *file, const char **error);
|
||||
int msc_rules_add_file(Rules *rules, const char *file, const char **error);
|
||||
int msc_rules_add(Rules *rules, const char *plain_rules, const char **error);
|
||||
int msc_rules_cleanup(Rules *rules);
|
||||
|
||||
|
@ -137,7 +137,7 @@ bool Rules::load(const char *file, const std::string &ref) {
|
||||
}
|
||||
|
||||
|
||||
bool Rules::loadRemote(char *key, char *uri) {
|
||||
bool Rules::loadRemote(const char *key, const char *uri) {
|
||||
HttpsClient client;
|
||||
bool ret = client.download(uri);
|
||||
|
||||
@ -298,7 +298,7 @@ extern "C" int msc_rules_merge(Rules *rules_dst,
|
||||
|
||||
|
||||
extern "C" int msc_rules_add_remote(Rules *rules,
|
||||
char *key, char *uri, const char **error) {
|
||||
const char *key, const char *uri, const char **error) {
|
||||
int ret = rules->loadRemote(key, uri);
|
||||
if (ret == 0) {
|
||||
*error = rules->getParserError().c_str();
|
||||
@ -307,7 +307,7 @@ extern "C" int msc_rules_add_remote(Rules *rules,
|
||||
}
|
||||
|
||||
|
||||
extern "C" int msc_rules_add_file(Rules *rules, char *file,
|
||||
extern "C" int msc_rules_add_file(Rules *rules, const char *file,
|
||||
const char **error) {
|
||||
int ret = rules->loadFromUri(file);
|
||||
if (ret == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user