1# Test TLS with rsyslogd as sender. 2# The client writes a message to rsyslogd UDP socket. 3# The rsyslogd forwards the message to syslogd TLS listen socket. 4# The syslogd writes it into a file and through a pipe. 5# The syslogd passes it via UDP to the rsyslogd. 6# The rsyslogd receives the message on its UDP socket. 7# Find the message in rsyslogd, file, pipe, syslogd, server log. 8# Check that the message is in rsyslogd, syslogd, server log. 9 10use strict; 11use warnings; 12use Socket; 13 14our %args = ( 15 client => { 16 connect => { domain => AF_INET, proto => "udp", addr => "127.0.0.1" }, 17 }, 18 rsyslogd => { 19 listen => { domain => AF_INET, proto => "udp", addr => "127.0.0.1" }, 20 connect => { domain => AF_INET, proto => "tls", addr => "127.0.0.1", 21 port => 6514 }, 22 loggrep => { 23 qr/omfile.* /.get_testgrep() => 1, 24 qr/GnuTLS handshake succeeded/ => 1, 25 }, 26 }, 27 syslogd => { 28 options => ["-S", "127.0.0.1"], 29 loggrep => { 30 get_testgrep() => 1, 31 qr/syslogd\[\d+\]: tls logger .* accepted/ => 1, 32 }, 33 }, 34); 35 361; 37