| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # Test for StreamDriver.TlsRevocationCheck parameter with explicit "off" setting |
| 3 | # added 2026-01-19 by rgerhards |
| 4 | # This file is part of the rsyslog project, released under ASL 2.0 |
| 5 | . ${srcdir:=.}/diag.sh init |
| 6 | export NUMMESSAGES=1000 |
| 7 | export QUEUE_EMPTY_CHECK_FUNC=wait_seq_check |
| 8 | generate_conf |
| 9 | add_conf ' |
| 10 | global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'" |
| 11 | defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'" |
| 12 | defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'" |
| 13 | ) |
| 14 | module( load="../plugins/imtcp/.libs/imtcp" |
| 15 | StreamDriver.Name="ossl" |
| 16 | StreamDriver.Mode="1" |
| 17 | StreamDriver.AuthMode="x509/certvalid" |
| 18 | StreamDriver.TlsRevocationCheck="off" ) |
| 19 | input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port") |
| 20 | |
| 21 | $template outfmt,"%msg:F,58:2%\n" |
| 22 | :msg, contains, "msgnum:" action(type="omfile" file="'$RSYSLOG_OUT_LOG'" template="outfmt") |
| 23 | ' |
| 24 | |
| 25 | # Begin actual testcase |
| 26 | # This test verifies that TlsRevocationCheck can be set to "off" and |
| 27 | # connections work normally (OCSP checking is disabled by default anyway, |
| 28 | # but this ensures the parameter is properly parsed and has no adverse effects) |
| 29 | startup |
| 30 | tcpflood -p$TCPFLOOD_PORT -m$NUMMESSAGES -Ttls -x$srcdir/tls-certs/ca.pem -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem |
| 31 | shutdown_when_empty |
| 32 | wait_shutdown |
| 33 | seq_check |
| 34 | exit_test |