65 Commits

Author SHA1 Message Date
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
Rainer Gerhards
e623b1a06b added TODO item 2008-05-15 11:57:18 +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
f027201679 bugfix: gtls netstram driver did not specify threading model
(could possibly lead to "interesting effects" ;))
2008-05-08 10:17:03 +02:00
Rainer Gerhards
442dad3521 limited number of unavoidable compiler warnings when compiling with GnuTLS 2008-05-07 12:33:18 +02:00
Rainer Gerhards
346a9e6379 added missing includes (noticed under SuSe Linux) 2008-05-06 18:32:59 +02:00
Rainer Gerhards
02795031a3 final touches for 3.19.0 2008-05-06 10:58:06 +02:00