Debian Codegraph @

tests/sndrcv_tls_ossl_anon_rebind.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # rgerhards, 2011-04-04
3 # testing sending and receiving via TLS with anon auth and rebind
4 # This file is part of the rsyslog project, released under ASL 2.0
5 . ${srcdir:=.}/diag.sh init
6 export NUMMESSAGES=25000
7 export QUEUE_EMPTY_CHECK_FUNC=wait_file_lines
8 # debugging activated to try to solve https://github.com/rsyslog/rsyslog/issues/3256
9 export RSYSLOG_DEBUG="debug nostdout"
10 test_error_exit_handlerscip-shell shell rsyslog 8.2604.0-4 test_error_exit_handler().() {
11 set -x
12 catscip-shell system . . cat. "$RSYSLOG_DYNNAME.receiver.debuglog"
13 catscip-shell system . . cat. "$RSYSLOG_DYNNAME.sender.debuglog"
14 set +x
15 }
16
17 #receiver
18 export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog"
19 generate_conf
20 add_conf '
21 global(
22 defaultNetstreamDriverCAFile="'$srcdir/testsuites/x.509/ca.pem'"
23 defaultNetstreamDriverCertFile="'$srcdir/testsuites/x.509/client-cert.pem'"
24 defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
25 defaultNetstreamDriver="ossl"
26 debug.whitelist="on"
27 debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
28 )
29
30 module( load="../plugins/imtcp/.libs/imtcp"
31 StreamDriver.Name="ossl"
32 StreamDriver.Mode="1"
33 StreamDriver.AuthMode="anon" )
34 # then SENDER sends to this port (not tcpflood!)
35 input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port")
36
37 template(name="outfmt" type="string" string="%msg:F,58:2%\n")
38 :msg, contains, "msgnum:" action( type="omfile"
39 template="outfmt"
40 file="'$RSYSLOG_OUT_LOG'")
41 '
42 startup
43
44 #sender
45 export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.sender.debuglog"
46 #valgrind="valgrind"
47 export PORT_RCVR=$TCPFLOOD_PORT # save TCPFLOOD_PORT, generate_conf will overwrite it!
48 generate_conf 2
49 add_conf '
50 global(
51 defaultNetstreamDriverCAFile="'$srcdir/testsuites/x.509/ca.pem'"
52 defaultNetstreamDriverCertFile="'$srcdir/testsuites/x.509/client-cert.pem'"
53 defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
54 defaultNetstreamDriver="ossl"
55 )
56
57 # set up the action
58 $DefaultNetstreamDriver ossl
59 $ActionSendStreamDriverMode 1
60 $ActionSendStreamDriverAuthMode anon
61 $ActionSendTCPRebindInterval 100
62 *.* @@127.0.0.1:'$PORT_RCVR'
63 ' 2
64 startup 2
65
66 # now inject the messages into instance 2. It will connect to instance 1,
67 # and that instance will record the data.
68 injectmsg2
69 shutdown_when_empty 2
70 wait_shutdown 2
71 # now it is time to stop the receiver as well
72 shutdown_when_empty
73 wait_shutdown
74
75 export SEQ_CHECK_OPTIONS=-d
76 seq_check
77
78 exit_test