Blame apache2/msc_remote_rules.h

Packit 284210
/*
Packit 284210
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
Packit 284210
* Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/)
Packit 284210
*
Packit 284210
* You may not use this file except in compliance with
Packit 284210
* the License.  You may obtain a copy of the License at
Packit 284210
*
Packit 284210
*     http://www.apache.org/licenses/LICENSE-2.0
Packit 284210
*
Packit 284210
* If any of the files related to licensing are missing or if you have any
Packit 284210
* other questions related to licensing please contact Trustwave Holdings, Inc.
Packit 284210
* directly using the email address security@modsecurity.org.
Packit 284210
*/
Packit 284210
Packit 284210
#ifndef MSC_REMOTE_RULES_H
Packit 284210
#define MSC_REMOTE_RULES_H
Packit 284210
Packit 284210
/* forward declarations */
Packit 284210
typedef struct msc_remote_rules_server msc_remote_rules_server;
Packit 284210
struct msc_curl_memory_buffer_t;
Packit 284210
Packit 284210
#include "modsecurity.h"
Packit 284210
Packit 284210
#include <apr_general.h>
Packit 284210
#include <apr_optional.h>
Packit 284210
#include <apr_thread_pool.h>
Packit 284210
#include <apr_sha1.h>
Packit 284210
Packit 284210
#include "http_core.h"
Packit 284210
#include "http_config.h"
Packit 284210
Packit 284210
#ifdef WITH_APU_CRYPTO
Packit 284210
#include <apr_crypto.h>
Packit 284210
#endif
Packit 284210
Packit 284210
struct msc_remote_rules_server {
Packit 284210
        directory_config *context;
Packit 284210
        const char *context_label;
Packit 284210
        const char *uri;
Packit 284210
        const char *key;
Packit 284210
        int amount_of_rules;
Packit 284210
	int crypto;
Packit 284210
};
Packit 284210
Packit 284210
const char *msc_remote_invoke_cmd(const command_rec *cmd, cmd_parms *parms,
Packit 284210
                             void *mconfig, const char *args);
Packit 284210
Packit 284210
int msc_remote_download_content(apr_pool_t *mp, const char *uri, const char *key,
Packit 284210
    struct msc_curl_memory_buffer_t *chunk, char **error_msg);
Packit 284210
Packit 284210
#ifdef WITH_APU_CRYPTO
Packit 284210
int msc_remote_enc_key_setup(apr_pool_t *pool,
Packit 284210
        const char *key,
Packit 284210
        apr_crypto_key_t **apr_key,
Packit 284210
        apr_crypto_t *f,
Packit 284210
        unsigned char *salt,
Packit 284210
        char **error_msg);
Packit 284210
Packit 284210
int msc_remote_decrypt(apr_pool_t *pool,
Packit 284210
        const char *key,
Packit 284210
        struct msc_curl_memory_buffer_t *chunk,
Packit 284210
        unsigned char **plain_text,
Packit 284210
        apr_size_t *plain_text_len,
Packit 284210
        char **error_msg);
Packit 284210
#endif
Packit 284210
Packit 284210
int msc_remote_add_rules_from_uri(cmd_parms *orig_parms,
Packit 284210
        msc_remote_rules_server *remote_rules_server,
Packit 284210
        char **error_msg);
Packit 284210
Packit 284210
int msc_remote_clean_chunk(struct msc_curl_memory_buffer_t *chunk);
Packit 284210
Packit 284210
#endif
Packit 284210