diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
commit | dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch) | |
tree | 66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/imdtls-basic-tlscommands.sh | |
parent | Initial commit. (diff) | |
download | rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip |
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | tests/imdtls-basic-tlscommands.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/imdtls-basic-tlscommands.sh b/tests/imdtls-basic-tlscommands.sh new file mode 100755 index 0000000..0a65351 --- /dev/null +++ b/tests/imdtls-basic-tlscommands.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# added 2018-04-27 by alorbach +# This file is part of the rsyslog project, released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +export NUMMESSAGES=10 +generate_conf +export PORT_RCVR="$(get_free_port)" + +add_conf ' +global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'" + defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'" + defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'" +) + +module( load="../plugins/imdtls/.libs/imdtls" ) +input( type="imdtls" + tls.tlscfgcmd="Protocol=ALL,-SSLv2,-SSLv3,-TLSv1,-TLSv1.1,-TLSv1.3 + Options=Bugs" + port="'$PORT_RCVR'") + +action(type="omfile" file="'$RSYSLOG_OUT_LOG'") +' +startup + +# now inject the messages which will fail due protocol configuration +tcpflood --check-only -k "Protocol=-ALL,TLSv1.3" -p$PORT_RCVR -m$NUMMESSAGES -Tdtls -x$srcdir/tls-certs/ca.pem -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem + +shutdown_when_empty +wait_shutdown + +if content_check --check-only "TLS library does not support SSL_CONF_cmd" +then + echo "SKIP: TLS library does not support SSL_CONF_cmd" + skip_test +else + if content_check --check-only "DTLSv1_listen" + then + # Found DTLSv1_listen error, no further check needed + exit_test + else + # Check for OpenSSL Error Stack + content_check "OpenSSL Error Stack:" + fi +fi + +exit_test |