#include "file_api.h"
/* Function prototypes */
-void set_mime_decode_config_defauts(DecodeConfig* decode_conf);
-void set_mime_log_config_defauts(MAIL_LogConfig* log_config);
-int parse_mime_decode_args(DecodeConfig* decode_conf, char* arg, const char* preproc_name);
-bool is_decoding_enabled(DecodeConfig* decode_conf);
-bool is_mime_log_enabled(MAIL_LogConfig* log_config);
+void set_mime_decode_config_defauts(DecodeConfig*);
+void set_mime_log_config_defauts(MAIL_LogConfig*);
+int parse_mime_decode_args(DecodeConfig*, char* arg, const char* preproc_name);
+bool is_mime_log_enabled(MAIL_LogConfig*);
+bool is_decoding_enabled(DecodeConfig*);
bool is_decoding_conf_changed(DecodeConfig* configNext, DecodeConfig* config, const
char* preproc_name);
-void check_decode_config(DecodeConfig* currentConfig);
+void check_decode_config(DecodeConfig*);
#endif
#include "protocols/packet.h"
#include "detection_util.h"
#include "framework/data_bus.h"
+#include "file_mime_config.h"
MimePcre mime_boundary_pcre;
return 1;
}
-static inline int is_decoding_enabled(DecodeConfig* pPolicyConfig)
-{
- if ( (pPolicyConfig->b64_depth > -1) || (pPolicyConfig->qp_depth > -1)
- || (pPolicyConfig->uu_depth > -1) || (pPolicyConfig->bitenc_depth > -1)
- || (pPolicyConfig->file_depth > -1))
- {
- return 0;
- }
- else
- return -1;
-}
-
static inline void process_decode_type(const char* start, int length, bool cnt_xf,
MimeState* mime_ssn)
{
uint8_t* file_sig_sha256_get(FileContext* context);
const char* file_type_name(void* conf, uint32_t id);
-extern int64_t file_type_depth;
-extern int64_t file_signature_depth;
void free_file_identifiers(void*);
void file_sha256_print(unsigned char* hash);
// //
//-----------------------------------------------//
-#define BUILD "154"
+#define BUILD "155"
{
config->decode_conf.file_depth = file_api->get_max_file_depth();
- if (config->decode_conf.file_depth > 0)
+ if (config->decode_conf.file_depth > -1)
config->log_config.log_filename = 1;
if (file_api->is_decoding_enabled(&config->decode_conf) )
decode_depth += 4 - (decode_depth & 3);
if (decode_depth > 65535 )
{
- decode_depth = decode_depth - 4;
+ decode_depth = decode_depth - 4; // FIXIT-L what does this do?
}
LogMessage("WARNING: IMAP: 'b64_decode_depth' is not a multiple of 4. "
"Rounding up to the next multiple of 4. The new 'b64_decode_depth' is %d.\n",
{
config->decode_conf.file_depth = file_api->get_max_file_depth();
- if (config->decode_conf.file_depth > 0)
+ if (config->decode_conf.file_depth > -1)
config->log_config.log_filename = 1;
if (file_api->is_decoding_enabled(&config->decode_conf) )
{
config->decode_conf.file_depth = file_api->get_max_file_depth();
- if (config->decode_conf.file_depth > 0)
+ if (config->decode_conf.file_depth > -1)
config->log_config.log_filename = 1;
if (file_api->is_decoding_enabled(&config->decode_conf) )