Debian Codegraph @

tests/imtcp-tls-mbedtls-x509valid.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # added 2018-04-27 by alorbach
3 # This file is part of the rsyslog project, released under GPLv3
4 . ${srcdir:=.}/diag.sh init
5 export NUMMESSAGES=10000
6 generate_conf
7 add_conf '
8 global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
9 defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
10 defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
11 )
12
13 module( load="../plugins/imtcp/.libs/imtcp"
14 StreamDriver.Name="mbedtls"
15 StreamDriver.Mode="1"
16 StreamDriver.AuthMode="x509/certvalid" )
17 input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port")
18
19 template(name="outfmt" type="string" string="%msg:F,58:2%\n")
20 :msg, contains, "msgnum:" action( type="omfile"
21 template="outfmt"
22 file=`echo $RSYSLOG_OUT_LOG`)
23 '
24 # Begin actual testcase
25 startup
26 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
27 wait_file_lines
28 shutdown_when_empty # shut down rsyslogd when done processing messages
29 wait_shutdown
30 seq_check
31 exit_test