14 Commits

Author SHA1 Message Date
Rainer Gerhards
b326c76f45 style: normalize C source formatting via clang-format (PoC)
This commit applies the new canonical formatting style using `clang-format` with custom settings (notably 4-space indentation), as part of our shift toward automated formatting normalization.

⚠️ No functional changes are included — only whitespace and layout modifications as produced by `clang-format`.

This change is part of the formatting modernization strategy discussed in:
https://github.com/rsyslog/rsyslog/issues/5747

Key context:
- Formatting is now treated as a disposable view, normalized via tooling.
- The `.clang-format` file defines the canonical style.
- A fixup script (`devtools/format-code.sh`) handles remaining edge cases.
- Formatting commits are added to `.git-blame-ignore-revs` to reduce noise.
- Developers remain free to format code however they prefer locally.
2025-07-16 13:56:21 +02:00
Rainer Gerhards
b5e552c8de
imtcp: add "socketBacklog" parameter to configure TCP backlog size
A new "socketBacklog" parameter has been added to the imtcp module, allowing
users to override the default TCP SYN backlog size. Previously, the backlog
was set to roughly 10% of the configured max sessions, which remains the
default if the parameter is not specified. This enhancement enables better
configuration for high-performance servers. The parameter name aligns with
the "socketBacklog" parameter in imptcp for consistency.

The "socketBacklog" parameter should be set based on the anticipated connection
rate and the server's ability to handle incoming connections. For high-performance
environments with heavy traffic, a larger value may be needed to avoid dropped
connections during bursts. If unsure, leave the parameter unset to use the default
(10% of max sessions), which is suitable for typical workloads.
2025-01-23 16:50:17 +01:00
6c3795ea75 openssl: evp support and custom openssl engine support
- output all loaded ciphers and engines.
- Add new global option "defaultopensslengine" to customize the
  default openssl engine. If not defined, openssl will handle the
  default engine automatically.
- Add simple openssl performance test with defaultopensslengine
  set to rdrand (Intel).
- removed unneeded testcase files in runtime folder.
- corrected whitelist settings for debug.files in TLS testcases
2024-05-02 12:07:14 +02:00
Darren J Moffat
844d1795a2 TLS CRL Support Issue 5081 2023-07-06 10:36:39 +02:00
Rainer Gerhards
13f5dfe2e2
imtcp: permit to use different certificate files per input/action 2021-08-04 10:23:24 +02:00
fcffb063e3 tls: Added support to configure certificate verify depth
Support added in omfwd as instance parameter:
streamdriver.TlsVerifyDepth
Support added in imtcp as module parameter:
streamdriver.TlsVerifyDepth

Can be 2 or higher.

Support added into ossl driver
Support added into gtls driver
Added testcases for both drivers.

Parameter
streamdriver.TlsVerifyDepth

closes: https://github.com/rsyslog/rsyslog/issues/4035
2020-01-08 11:40:14 +01:00
Jiri Vymazal
937e278fdf Stricter GnuTLS operation
This commit adds to new flags which can be set to allow
1) checking of extendedKeyUsage certificate field
2) stricter checking of certificate name/adresses
2019-08-30 09:40:25 +02:00
3d9b8df6fb tls(ossl/gtls): add new Option "StreamDriver.PermitExpiredCerts"
The new Option can have one of the following values:
on = Expired certificates are allowed
off = Expired certificates are not allowed
warn = Expired certificates are allowed but warning will be logged (Default)

Includes necessary tests to validate new code.

closes https://github.com/rsyslog/rsyslog/issues/3364
2018-12-21 15:24:41 +01:00
PascalWithopf
56e3132320 imtcp bugfix: priorityString was not set
The variable priorityString was not used when rsyslog acted as the
server and the defaults were always set. Now the priorityString
is used when specified.

fixes https://github.com/rsyslog/rsyslog/issues/1722
2017-09-05 11:19:29 +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
7022e9019e support for different forwarding stream drivers added
they can now be set on an action-by-action basis
2008-05-05 14:19:12 +02:00
Rainer Gerhards
da88900143 added $InputTCPServerStreamDriverMode config directive 2008-04-30 18:53:21 +02:00
Rainer Gerhards
1cce2e35b0 removed loadbale module leak
- moved netstrms, netstrm and nssel into a single loadble module
  because they belong together
- fixed "loadbale module leak"
2008-04-29 12:21:52 +02:00
Rainer Gerhards
1892fc75f9 added new netstrms class
netstrms is at the top layer of the socket abstraction
2008-04-23 15:07:19 +02:00