ivykis: updated to latest commit in ivykis-0.30 branch

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
tfuuid: rename to cryptofuncs

Some further crypto related functions are to be added to syslog-ng, I'd
like to avoid the profileration of modules just for single functions.

Thus "cryptofuncs" is born, a place for stuff that depeeds on OpenSSL.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
$(hash): New template function to calculate the hash of its inputs

This patch adds a family of new template functions called
$(hash), $(md5), $(md4), $(sha1), $(sha256), $(sha512)

These can be used to calculate the cryptographic hash of its arguments.

As it uses the SHA1() function from OpenSSL, it is only available if syslog-ng
is compiled using --enable-ssl.

One use case for it can be when you'd like to anonymize sensitive parts of the
log message (eg. the user name) you parsed out using patterndb before storing
or forwarding it for further analysis but would like to retain the ability to
correlate messages along this value. Beware though that such simple anonymization
can be broken if there's enough data available, see

    http://arxiv.org/pdf/cs/0610105v2.pdf for references and examples.

Another use-case is to generate quasi-unique-ids for data, using the
--length option that truncates the length of the hash to a shorter form.
In real life the chances of the collision is slim, but still makes it
possible to use a shorter id, than in most cases is unique, especially
when constrained to a time period, which is often the case for logs.

Syntax:
  $(<method> [opts] $arg1 $arg2 $arg3...)

Options:
  --length N, -l N    Truncate the hash to the first N characters

The generic name "hash" refers to md5. Arguments are concatenated w/o the
use of additional characters.

Thanks for the original idea to Martin Grauel.

Signed-off-by: Peter Gyongyosi <gyp@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cryptofuncs: refactor hash related tests to a separate unit test program

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
msg_parse_lib: rearranged includes

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
value-pairs: clarified some error messages

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
libtest: added assert_template_format_with_context() function

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
tfjson: added skeleton unit tests
test_template: remove cryptofuncs unit tests

As they were moved to a separate test program in an earlier commit.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
basicfuncs: unit tests moved to a separate program

Continuing the refactor to independent unit tests, this patch moves stuff
from test_template to modules/basicfuncs/tests using the new
template_lib.c in libtest.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
test_template_speed: indent output so that unit test runs are more readable

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
test_template: refactor to use testutils

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
fixed invalid declarations for bison generated yyparse() functions

The new bison finally declares the yyparse() function in its header, which
revealed a couple of invalid declarations in a couple of parsers.

This patch fixes that.

Reported-By: Conrad Hoffmann <ch@bitfehler.net>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>