tlscontext: Make hostname check in tls certificate case insensitive
tlscontext: do not accept certificate which is not contained by the list of fingerprints

Signed-off-by: Juhász Viktor <jviktor@balabit.hu>
Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
Merge pull request #293 from lbudai/3.6/tlscontext-fix

3.6/tlscontext fix
afsmtp: linkage order fixed

Suggested-by: Michael Sterrett <mr_bones_@gentoo.org>
Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
Merge pull request #295 from lbudai/3.6/master

afsmtp: linkage order fixed
scl/scl.conf: Use a wildcard to include SCL snippets

To be able to install SCL snippets to be included by default, without
modifying scl.conf itself, use a wildcard-include. This allows
distributions to ship some of the SCLs in different packages, without
breaking the default config, or having to enable them in other ways.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #296 from algernon/f/scl/wildcard-include

scl/scl.conf: Use a wildcard to include SCL snippets
afsql: trying to do a better transaction handling

syslog-ng checks whether a table exists or not by 'select * from table'
(and get structure of the table as a side-effect...)

There are some DB-providers which abort current transaction when try to
select from a non-existing table (eg.:mssql).

libdbi provides a better, db-provider specific way to checking table existance
(this is a meta-query which always succeed).
Unfortunately, this function is buggy in pgsql driver, so we had to do
something else).

syslog-ng asks db only when the name of the table to be checked is not seen
before (this is based on a runtime information: every table is validated and
name of all validated tables are stored in a hashtable).

When the table not found in the list of validated tables:
 - active transaction is commited (if exists)
 - new transaction is started for checking if the table exists or not
    - if the table exists, its structure is updated according to the
      structure given in the config file
    - otherwise a new table is created

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
afsql: validate_table() refactored

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
afsql: afsql_dd_sql_identifier_sanitize() renamed to _sanitize_sql_identifier()

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
afsql: _table_is_exist() renamed to _is_table_present()

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
afsql: afsql_dd_sql_identifier_is_sanitized() -> _is_sql_identifier_sanitized()

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
afsql: `validate table` renamed to `syslog conform table`

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>