Debian Codegraph @

tests/imtcp-tls-ossl-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 # debug.whitelist="on"
12 # debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
13 )
14
15 module( load="../plugins/imtcp/.libs/imtcp"
16 StreamDriver.Name="ossl"
17 StreamDriver.Mode="1"
18 StreamDriver.AuthMode="x509/certvalid" )
19 input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port")
20
21 template(name="outfmt" type="string" string="%msg:F,58:2%\n")
22 :msg, contains, "msgnum:" action( type="omfile"
23 template="outfmt"
24 file=`echo $RSYSLOG_OUT_LOG`)
25 '
26 # Begin actual testcase
27 startup
28 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
29 wait_file_lines
30 shutdown_when_empty # shut down rsyslogd when done processing messages
31 wait_shutdown
32 seq_check
33 exit_test