21 Commits

Author SHA1 Message Date
Jan Gerhards
c0ec6a056c lmcry_gcry: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-23 19:14:17 +01:00
Rainer Gerhards
6839cd5cb6 gcry crypto provider: improve error reporting
plus some truely cosmetic-only changes to silence Coverity scan.
2017-11-12 11:55:57 +01:00
Rainer Gerhards
debeb5d9cb gcry crypto provider: fix potential NULL pointer addressing
happens only during out of memory condition

Detected by Coverity scan, CID 185422
2017-11-02 13:01:50 +01:00
Rainer Gerhards
1ae7b72241 file crypto provider: fix potential misadressing and memory leak
If the config parameters were invalid, a misadressing could occur. If so,
this happens only during startup.

Also, a memory leak existed when the crypto provider errored out. This could
build up if it were used in frequently-changing dynafiles. This was
detected by Coverity scan, CID 185360.

Finally some light code simplification (free handling).
2017-10-30 18:53:21 +01:00
Rainer Gerhards
cbdc147394 file crypto provider: refactor interface
This permits an atomic check for error conditions and helps avoid
inconsistency between check and use of file name, which can also
pose security issues (not in the previous code, as the check was only
used for error-reporting).

Detected by Coverty scan, CID 185400
2017-10-28 11:25:08 +02:00
Rainer Gerhards
f8b466623c fix some unitialized variable warnings
these were cosmetical and had no real effect
2016-01-29 18:54:11 +01:00
Jeremy Qian
a26cac4178 free memory before return 2015-12-11 14:56:17 +08:00
Rainer Gerhards
a336dc690f cleanup 2013-05-16 10:01:02 +02:00
Rainer Gerhards
afe14ce2f6 complete handle multiple blocks in encrypted queue files 2013-05-16 09:49:22 +02:00
Rainer Gerhards
9205c5541b clean up crypto provider state files on queue file rollover 2013-05-15 12:59:11 +02:00
Rainer Gerhards
bad876b265 clean up crypto provider state files on queue file close 2013-05-15 12:08:54 +02:00
Rainer Gerhards
0d000a8b10 basic queue file encryption 2013-05-13 08:04:13 +02:00
Rainer Gerhards
4ae3176e28 extend crypto provider interface so that it can support queue subsystem 2013-05-08 11:19:23 +02:00
Rainer Gerhards
d0cefac7a7 cleanup 2013-04-24 11:09:37 +02:00
Rainer Gerhards
fc0babb27d logenc: add key-program support to rsyslog crypto provider 2013-04-15 09:40:34 +02:00
Rainer Gerhards
97cbbdac13 logenc: full support for keyfiles
including their generation via rscrytool
2013-04-12 15:24:51 +02:00
Rainer Gerhards
815bae1f35 logenc: add parameters to select cipher algo and mode 2013-04-12 11:22:04 +02:00
Rainer Gerhards
5f72832b3d logenc: milestone: rsyslog writes .encinfo side files 2013-04-11 14:49:06 +02:00
Rainer Gerhards
078b010af6 log encryption: check length of "key" parameter 2013-04-11 09:57:18 +02:00
Rainer Gerhards
5242a0b4a3 log encryption: add rscrytool to decrypt log files
also add test parameter to be able to set key
2013-04-05 18:52:52 +02:00
Rainer Gerhards
0cee769fcd log encryption: initial PoC implementation
rough baseline, needs to be extended for actual use.
2013-04-05 12:08:49 +02:00