73 Commits

Author SHA1 Message Date
Rainer Gerhards
e61672c693 removed dependency on gcrypt for recently-enough GnuTLS
see: http://bugzilla.adiscon.com/show_bug.cgi?id=289
2011-10-17 15:49:20 +02:00
Rainer Gerhards
f4c5f0a4cc Merge branch 'v4-devel' into v5-devel
Conflicts:
	tcpsrv.c
2011-06-14 14:22:37 +02:00
Rainer Gerhards
bcd956d4d5 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. [backport from v6, limited testing under v4]
2011-06-14 12:52:02 +02:00
Bojan Smojver
d1eb6e0edc added work-around for bug in gtls, which causes fd leak when using TLS
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2011-02-23 11:25:43 +01:00
Rainer Gerhards
1f48ed19f3 Merge branch 'v4-beta' into beta
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	doc/rsyslog_conf_modules.html
	tests/Makefile.am
	tests/sndrcv_drvr.sh
2009-11-25 19:13:30 +01:00
Jonathan Bond-Caron
3056c15ef4 bugfix (kind of): check if TCP connection is still alive if using TLS
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2009-11-25 16:35:54 +01:00
Rainer Gerhards
8b246de2a5 some light performance enhancement
...by replacing time() call with much faster (at least under linux)
gettimeofday() calls.
2009-11-12 17:12:10 +01:00
Rainer Gerhards
e04e1b5002 enhanced test environment (including testbench)
support for enhancing probability of memory addressing failure by
using non-NULL default value for malloced memory (optional, only if
requested by configure option). This helps to track down some
otherwise undetected issues within the testbench and is expected
to be very useful in the future.
2009-10-22 11:33:38 +02:00
Rainer Gerhards
d2d54013ae going forward in moving string-handling functions to new interface... 2009-06-17 15:22:13 +02:00
Rainer Gerhards
f7579e68a6 done various optimizations to the stringbuf and its users 2009-06-16 11:36:05 +02:00
Rainer Gerhards
b61e5fffc4 strmsrv now supports KEEPALIVE socket option 2009-06-02 13:11:18 +02:00
Rainer Gerhards
889a0a1da8 some cleanup
... mostly removal of compile-time warnings (thanks to Michael
Biebl for suggesting to look after that)
2009-04-17 15:19:57 +02:00
Rainer Gerhards
4252edfebe bugfix: memory leaks in gtls netstream driver 2008-12-03 15:45:54 +01:00
Rainer Gerhards
61b59a78c6 added interface function to nsd_gtls needed for ACL control
The legacy ACL system needs access to the remote sockaddr_storage
data structure. This has been implemented for the ptcp driver and
now follows for gtls. See recent commits for reason.

We also moved up the version numbers in preparation of the release.
2008-12-01 18:39:57 +01:00
varmojfekoj
38cdfcfbe1 bugfix (cosmetical): authorization was not checked when gtls handshake completed immediately.
While this sounds scary, the situation can not
happen in practice. We use non-blocking IO only for server-based gtls
session setup. As TLS requires the exchange of multiple frames before
the handshake completes, it simply is impossible to do this in one
step. However, it is useful to have the code path correct even for
this case - otherwise, we may run into problems if the code is changed
some time later (e.g. to use blocking sockets).

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2008-07-15 09:02:37 +02:00
Rainer Gerhards
aeef9bbe72 bugfix: machine certificate was required for client even in TLS anon mode
Reference: http://bugzilla.adiscon.com/show_bug.cgi?id=85
The fix also slightly improves performance by not storing certificates in
client sessions when there is no need to do so.
2008-07-02 11:56:54 +02:00
Rainer Gerhards
4fd9852957 Merge branch 'beta'
Conflicts:

	ChangeLog
	conf.c
	doc/Makefile.am
	doc/manual.html
	omfwd.c
	plugins/omgssapi/omgssapi.c

This was a bit hard to merge; if there are problems, they
may be in the area of the new "comment in action line" code
that came from the beta.
2008-07-01 15:09:07 +02:00
Rainer Gerhards
3f6c73a8b7 added (internal) error codes to error messages
Also added redirector to web description of error codes
closes bug http://bugzilla.adiscon.com/show_bug.cgi?id=20
2008-06-27 12:52:45 +02:00
Rainer Gerhards
2c46f3de7d bugfix: gtls always read only 8 bytes per recv call 2008-06-25 15:47:50 +02:00
Rainer Gerhards
75063e54b2 bugfix: gtls und ptcp netstream driver communicated invalid iRet
This was introduced due to recent interface change.
2008-06-24 18:27:52 +02:00
Rainer Gerhards
dd3e2cae9d improved gtls error reporting 2008-06-24 17:44:16 +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
b711a34a07 disabled compile warnings caused by third-party libraries 2008-06-23 11:29:47 +02:00
Rainer Gerhards
7b1a570d54 changed Rcv-Interface in tcpsrv subsystem
It is now iRet based. This enables us to communicate
more in-depth information to the upper peers. This is needed
to handle the EGAIN case on rcv (not yet implemented)
2008-06-23 10:29:15 +02:00
Rainer Gerhards
716ab25446 disabled in-depth GnuTLS debugging aid
This is a debug aid, only. Note that it may reveal sensitive
information, so it should never be active in production code.
Currently, this is a compile-time switch and requires code changes
to (de)activate.
2008-06-23 09:04:00 +02:00
Rainer Gerhards
083d52c861 bugfix: some error states were swapped
... in gnutls code, resulting in some hard too
understand error messages. Also genereally improved certificate
error messages a bit.

Also, added GnuTLS debugging support.
2008-06-20 08:53:58 +02:00
Rainer Gerhards
abc7034f0d begun step-by-step guide for TLS protected syslog 2008-06-18 14:40:08 +02:00
Rainer Gerhards
55e01da2ec somewhat improved plain tcp syslog reliability
...by doing a connection check before sending. Credits to Martin
Schuette for providing the idea. Details are available at
http://blog.gerhards.net/2008/06/reliable-plain-tcp-syslog-once-again.html
2008-06-09 12:40:54 +02:00
Rainer Gerhards
9c7207bb7b preparing 3.19.6 2008-06-06 11:25:06 +02:00
Rainer Gerhards
531f27a8c3 implemented wildcards inside certificate name check authentication 2008-05-27 14:49:45 +02:00
Rainer Gerhards
ae387d6900 client now provides cert even if it is not signed by one of the server's trusted CAs (gtls) 2008-05-27 09:46:30 +02:00
Rainer Gerhards
331a644202 protected gtls error string function by a mutex.
Without it, we could have a race condition in extreme cases.
This was very remote, but now can no longer happen.
2008-05-26 15:49:32 +02:00
Rainer Gerhards
fce6ddc99f fixed fingerprint generator
fixed problem introduced earlier today
2008-05-26 15:31:41 +02:00
Rainer Gerhards
7918bbe7fc fixed wrong cert expiration date check 2008-05-26 15:11:00 +02:00
Rainer Gerhards
bc5eb93e40 added certificate validity date check (gtls) 2008-05-26 14:47:36 +02:00
Rainer Gerhards
b674dd69bd added gtls name authentication based on common name (inside DN)
also changed fingerprint gtls auth mode to new format fingerprint
2008-05-26 12:53:49 +02:00
Rainer Gerhards
7b604269c7 added capability to auto-configure tls auth rule for client connecting to server
must match hostname in send action
2008-05-26 11:01:42 +02:00
Rainer Gerhards
f31a0537c6 improved gtls error reporting 2008-05-26 10:15:49 +02:00
Rainer Gerhards
3b5c252784 checking if client provided a cert and complain if not 2008-05-23 11:39:37 +02:00
Rainer Gerhards
57b2032235 added x509/name authentication (so far based on dnsName only) 2008-05-22 18:48:09 +02:00
Rainer Gerhards
0b2e858a42 added code to pull the subjectAltName - dNSName 2008-05-21 18:18:20 +02:00
Rainer Gerhards
68a2c3d512 implemented x509/certvalid "authentication" 2008-05-21 14:59:24 +02:00
Rainer Gerhards
cb8188da16 re-enabled anon mode (failed if client did not provide cert) 2008-05-21 11:04:01 +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
48684ceac5 improved error messages and corrected fingerprint format 2008-05-19 09:43:37 +02:00
Rainer Gerhards
edf41396ef regained netstream driver genericity; improved drivers
- made action logic pass optional auth params only if they are
  actually configured
- added new authMode and Fingerprint methods to ptcp netstream
  driver (keeping them once again generic)
- added diagnostics messages when invalid auth modes were
  configured
2008-05-17 11:19:12 +02:00
Rainer Gerhards
6ea98ec5ff added first rough ability to authenticate the server against its certificate
This is very experimental and needs some more work. It probably even
segfaults - but the base code is there and running. The rest is
refinement.

While working on this, I did these two bugfixes:
- bugfix: small mem leak in omfwd on exit (strmdriver name was not freed)
- bugfix: $ActionSendStreamDriver had no effect
2008-05-16 18:26:25 +02:00
Rainer Gerhards
29ebd4ab3e Merge branch 'master' into ietf-tls 2008-05-16 15:11:24 +02:00
Rainer Gerhards
09afe64f29 added fromhost-ip properties and some bugfixes
- bugfix: TCP input modules did incorrectly set fromhost property
  (always blank)
- bugfix: imklog did not set fromhost property
- added "fromhost-ip" property
- added "RSYSLOG_DebugFormat" canned template
- bugfix: hostname and fromhost were swapped when a persisted message
  (in queued mode) was read in
2008-05-16 13:36:41 +02:00
Rainer Gerhards
ffa17a25d2 client provides x.509 and server prints fingerprint 2008-05-15 16:58:25 +02:00