1# The client writes a message to Sys::Syslog native method.
2# The syslogd writes it into a file and through a pipe.
3# The syslogd passes it via TLS to 127.0.0.1 loghost.
4# Server certificate is issued for localhost.
5# Find the message in client, file, pipe, syslogd log.
6# Check that syslogd denies host `127.0.0.1' and server has no message.
7
8use strict;
9use warnings;
10use Socket;
11
12our %args = (
13    syslogd => {
14	loghost => '@tls://127.0.0.1:$connectport',
15	loggrep => {
16	    qr/Logging to FORWTLS \@tls:\/\/127.0.0.1:\d+/ => '>=4',
17	    qr/syslogd: loghost .* connection error: /.
18		qr/name `127.0.0.1' not present in server/ => '>=1',
19	    get_testlog() => 1,
20	},
21	cacrt => "ca.crt",
22    },
23    server => {
24	listen => { domain => AF_INET, proto => "tls", addr => "127.0.0.1" },
25	loggrep => {
26	    qr/listen sock: 127.0.0.1 \d+/ => 1,
27	    get_testlog() => 0,
28	},
29    },
30);
31
321;
33