From dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:28:20 +0200 Subject: Adding upstream version 8.2402.0. Signed-off-by: Daniel Baumann --- tests/imrelp-tls.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 tests/imrelp-tls.sh (limited to 'tests/imrelp-tls.sh') diff --git a/tests/imrelp-tls.sh b/tests/imrelp-tls.sh new file mode 100755 index 0000000..d0d88ae --- /dev/null +++ b/tests/imrelp-tls.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# addd 2019-01-31 by PascalWithopf, released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +export NUMMESSAGES=1000 +do_skip=0 +generate_conf +add_conf ' +module(load="../plugins/imrelp/.libs/imrelp") +input(type="imrelp" port="'$TCPFLOOD_PORT'" tls="on" + tls.cacert="'$srcdir'/tls-certs/ca.pem" + tls.mycert="'$srcdir'/tls-certs/cert.pem" + tls.myprivkey="'$srcdir'/tls-certs/key.pem" + tls.authmode="certvalid" + tls.permittedpeer="rsyslog") + +template(name="outfmt" type="string" string="%msg:F,58:2%\n") +:msg, contains, "msgnum:" action(type="omfile" template="outfmt" + file=`echo $RSYSLOG_OUT_LOG`) +' +startup +./tcpflood -Trelp-tls -acertvalid -p$TCPFLOOD_PORT -m$NUMMESSAGES -x "$srcdir/tls-certs/ca.pem" -z "$srcdir/tls-certs/key.pem" -Z "$srcdir/tls-certs/cert.pem" -Ersyslog 2> $RSYSLOG_DYNNAME.tcpflood +if [ $? -eq 1 ]; then + cat $RSYSLOG_DYNNAME.tcpflood + if ! grep "could net set.*certvalid" < "$RSYSLOG_DYNNAME.tcpflood" ; then + printf "librelp too old, need to skip this test\n" + do_skip=1 + fi +fi + cat -n $RSYSLOG_DYNNAME.tcpflood +shutdown_when_empty +wait_shutdown +if [ $do_skip -eq 1 ]; then + skip_test +fi +seq_check +exit_test -- cgit v1.2.3