29 Commits

Author SHA1 Message Date
2f30c4270a add openssl TLS driver (#2761)
add openssl TLS driver

Also fixes some nits in existing testbench tests (e.g. expired test certs) and extend tcpflood to support openssl as well.

closes: https://github.com/rsyslog/rsyslog/issues/1390
closes: https://github.com/rsyslog/rsyslog/issues/1840
closes: https://github.com/rsyslog/rsyslog/issues/1352
closes: https://github.com/rsyslog/rsyslog/issues/1702
closes: https://github.com/rsyslog/rsyslog/issues/2547
2018-06-13 13:20:23 +02:00
Jan Gerhards
b01506c62f nsdsel_gtls: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-04-13 09:55:36 +02:00
Pascal Withopf
b63a6b9010 codestyle: line length adjusted 2017-01-17 08:54:37 +01:00
Rainer Gerhards
51c03c66e0 make inline functions C99-compliant
As it seems, different C compilers have different rules/interpretations
on inline functions. The current code base did not properly obey all C99
rules. We fix this by converting some functions to macros and others to
include the necessary C99 plumbing. We also remove some inline attributes
for functions where this seems to be to agressive (aka "function to big").

This fixes build problems in some environments and is a general code
cleanup measure.
2016-09-05 16:47:14 +02:00
Rainer Gerhards
5e3b075d53 fix compiler warnings 2016-06-02 12:08:55 +02:00
Rainer Gerhards
07a074dd88 cleanup: remove dbgprintf's not intended to stay
those starting at column 0 are temporary debug aids during development.
Some of them I intend to keep in for a version or two. Some of them
I tend to forget later. This is a cleanup of those. Most are removed,
some are promoted to be permanently there - now indicated by proper
indention.
2016-01-13 09:20:07 -05:30
Reed Morrison
b4b5ac3230 Potential fix for imtcp/TLS hangs on dropped packets 2015-08-20 10:48:27 -07:00
Rainer Gerhards
20d8a9904e make gntls tcp syslog driver emit more error messages
Messages previously emitted only to the debug log are now emitted as
syslog error messages. It has shown that they contain information
helpful to the user for troubleshooting config issues. Note that this
change is a bit experimental, as we are not sure if there are situations
where large amounts of error messages may be emitted.
2014-09-05 13:02:28 +02:00
Rainer Gerhards
18e60f46a1 Merge branch 'v4-stable' into v5-stable
Conflicts:
	runtime/debug.h
	runtime/obj.c
	runtime/parser.h
	runtime/wti.h
2012-01-16 16:14:30 +01:00
Rainer Gerhards
bd22bf8cb4 license changes 2012-01-16 15:23:01 +01:00
Rainer Gerhards
2c81df12bc bugfix: memory leak in imtcp & subsystems under some circumstances
This leak is tied to error conditions which lead to incorrect cleanup
of some data structures.

Note: this is a backport from v6. In v5, we currently do not have
the toolchain to verify the original problem and that it is solved.
So this patch is preliminary and subject to change as work progresses.
2011-06-10 22:50:25 +02:00
Rainer Gerhards
925504d565 bugfix(important): problem in TLS handling could cause rsyslog to loop
... in a tight loop, effectively disabling functionality and bearing the
risk of unresponsiveness of the whole system.
Bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=194
2010-11-24 11:14:21 +01:00
Rainer Gerhards
a6de2e5892 cleanup of debugging messages (removed no longer needed ones) 2008-07-14 11:39:58 +02:00
Rainer Gerhards
c01daffb94 fixed invalid state checking inside gtls retry handler 2008-06-25 08:30:01 +02:00
Rainer Gerhards
3f55816a77 gnu error status must be set after retry operation
... otherwise, we check an invalid error state.
2008-06-24 18:54:04 +02:00
Rainer Gerhards
b5d8f5d96a added support for EGAIN while trying to receive data on gTLS session
This maps to bugzilla bug 83: http://bugzilla.adiscon.com/show_bug.cgi?id=83
This is the first test version, posted to user for repro of the problem.

It contains code to handle the case, HOWEVER, I have not been able to test it
in a scenario where a retry actually happens while receiving (I dont't get this
in my environment). So I assume it is buggy and will probably not work.
2008-06-24 15:12:22 +02:00
Rainer Gerhards
68a2c3d512 implemented x509/certvalid "authentication" 2008-05-21 14:59:24 +02:00
Rainer Gerhards
2b90fa41fd changed default GnuTLS key material to more reasonable values
We now also provide everything to sign with a common CA.
NOTE: none of this is for production use!
2008-05-20 15:13:17 +02:00
Rainer Gerhards
85b587f93d first implementation of TLS server client authentication check
The TLS server now checks the client fingerprint. This works, but
is highly experimental. Needs to be refined for practice. Also:
- implemented permittedPeers helper construct to store names
- changed omfwd implementation to use new permittedPeers
2008-05-19 18:52:44 +02:00
Rainer Gerhards
29ebd4ab3e Merge branch 'master' into ietf-tls 2008-05-16 15:11:24 +02:00
Rainer Gerhards
770b709654 fixed potential uninitialzed var access (highly improbable) 2008-05-16 14:53:12 +02:00
Rainer Gerhards
ffa17a25d2 client provides x.509 and server prints fingerprint 2008-05-15 16:58:25 +02:00
Rainer Gerhards
d8b191a1f3 bugfix: TLS server went into an endless loop in some situations.
Thanks to Michael Biebl for reporting the problem.
2008-05-15 07:58:01 +02:00
Rainer Gerhards
d594f83a89 server's X509 cert fingerprint is obtained by client on connect 2008-05-08 16:00:57 +02:00
Rainer Gerhards
3d74096021 added a bit of doc (at least something...) 2008-05-08 13:24:20 +02:00
Rainer Gerhards
1c2268faa8 restructured netstrm driver layer
the new structure prevents repetitive loads and unloads of
driver files; it also has less overhead
The "select" and regular driver are now contained in a single
file.
2008-04-30 17:41:17 +02:00
Rainer Gerhards
c370fc6305 server handshake now works with nonblocking sockets 2008-04-30 16:35:35 +02:00
Rainer Gerhards
75cf92117c made gtls server driver work in plain tcp mode 2008-04-25 12:54:59 +02:00
Rainer Gerhards
af30c9f8f2 added select() driver for GnuTls 2008-04-24 20:10:24 +02:00