#include <criterion/criterion.h>#include "libtest/cr_template.h"#include "libtest/msg_parse_lib.h"#include "libtest/stopwatch.h"#include "slog.h"#include "apphook.h"#include "cfg.h"#include "logmatcher.h"#include "timeutils/cache.h"#include <errno.h>#include <string.h>#include <unistd.h>
Classes | |
| struct | TestData |
Macros | |
| #define | MAX_TEST_MESSAGES 1000 |
| #define | MIN_TEST_MESSAGES 10 |
| #define | PERFORMANCE_COUNTER 100000 |
Functions | |
| int | randomNumber (int low, int high) |
| LogMessage * | create_random_sample_message (void) |
| LogTemplate * | createTemplate (TestData *testData) |
| void | createLogMessages (gint num, LogMessage **log) |
| GString * | applyTemplate (LogTemplate *templ, LogMessage *msg) |
| int | findInArray (int index, int *buffer, int size) |
| GString ** | verifyMaliciousMessages (guchar *hostkey, gchar *macFileName, GString **templateOutput, size_t totalNumberOfMessages, int *brokenEntries) |
| void | verifyMessages (guchar *hostkey, gchar *macFileName, GString **templateOutput, LogMessage **original, size_t totalNumberOfMessages) |
| void | generateHostKey (guchar *hostkey, gchar *hostKeyFileName) |
| GString * | createTemporaryDirectory (gchar *template) |
| GString * | createTemporaryFilePath (GString *dirname, gchar *basename) |
| void | removeTemporaryFile (gchar *fileName, gboolean force) |
| void | removeTemporaryDirectory (gchar *dirName, gboolean force) |
| TestData * | initialize (gchar *name) |
| void | closure (TestData *testData) |
| void | corruptKey (TestData *testData) |
| void | setup (void) |
| void | teardown (void) |
| TestSuite (secure_logging,.init=setup,.fini=teardown) | |
| void | test_slog_template_format (void) |
| void | test_slog_verification (void) |
| void | test_slog_verification_bulk (void) |
| void | test_slog_corrupted_key (void) |
| void | test_slog_malicious_modifications (void) |
| void | test_slog_performance (void) |
| Test (secure_logging, test_slog_template_format) | |
| Test (secure_logging, test_slog_performance) | |
| Test (secure_logging, test_slog_verification_bulk) | |
| Test (secure_logging, test_slog_verification) | |
| Test (secure_logging, test_slog_corrupted_key) | |
| Test (secure_logging, test_slog_malicious_modifications) | |
| #define MAX_TEST_MESSAGES 1000 |
| #define MIN_TEST_MESSAGES 10 |
| #define PERFORMANCE_COUNTER 100000 |
| GString* applyTemplate | ( | LogTemplate * | templ, |
| LogMessage * | msg | ||
| ) |
| void closure | ( | TestData * | testData | ) |
| void corruptKey | ( | TestData * | testData | ) |
| LogMessage* create_random_sample_message | ( | void | ) |
| void createLogMessages | ( | gint | num, |
| LogMessage ** | log | ||
| ) |
| LogTemplate* createTemplate | ( | TestData * | testData | ) |
| GString* createTemporaryDirectory | ( | gchar * | template | ) |
| GString* createTemporaryFilePath | ( | GString * | dirname, |
| gchar * | basename | ||
| ) |
| int findInArray | ( | int | index, |
| int * | buffer, | ||
| int | size | ||
| ) |
| void generateHostKey | ( | guchar * | hostkey, |
| gchar * | hostKeyFileName | ||
| ) |
| TestData* initialize | ( | gchar * | name | ) |
| int randomNumber | ( | int | low, |
| int | high | ||
| ) |
| void removeTemporaryDirectory | ( | gchar * | dirName, |
| gboolean | force | ||
| ) |
| void removeTemporaryFile | ( | gchar * | fileName, |
| gboolean | force | ||
| ) |
| void setup | ( | void | ) |
| void teardown | ( | void | ) |
| Test | ( | secure_logging | , |
| test_slog_corrupted_key | |||
| ) |
| Test | ( | secure_logging | , |
| test_slog_malicious_modifications | |||
| ) |
| Test | ( | secure_logging | , |
| test_slog_performance | |||
| ) |
| Test | ( | secure_logging | , |
| test_slog_template_format | |||
| ) |
| Test | ( | secure_logging | , |
| test_slog_verification | |||
| ) |
| Test | ( | secure_logging | , |
| test_slog_verification_bulk | |||
| ) |
| void test_slog_corrupted_key | ( | void | ) |
| void test_slog_malicious_modifications | ( | void | ) |
| void test_slog_performance | ( | void | ) |
| void test_slog_template_format | ( | void | ) |
| void test_slog_verification | ( | void | ) |
| void test_slog_verification_bulk | ( | void | ) |
| GString** verifyMaliciousMessages | ( | guchar * | hostkey, |
| gchar * | macFileName, | ||
| GString ** | templateOutput, | ||
| size_t | totalNumberOfMessages, | ||
| int * | brokenEntries | ||
| ) |
| void verifyMessages | ( | guchar * | hostkey, |
| gchar * | macFileName, | ||
| GString ** | templateOutput, | ||
| LogMessage ** | original, | ||
| size_t | totalNumberOfMessages | ||
| ) |