1# The syslogd listens on ::1 TLS socket.
2# The client writes a message into a ::1 TLS socket.
3# The syslogd writes it into a file and through a pipe.
4# The syslogd passes it via UDP to the loghost.
5# The server receives the message on its UDP socket.
6# Find the message in client, file, pipe, syslogd, server log.
7# Check that the file log contains the hostname and message.
8
9use strict;
10use warnings;
11use Socket;
12
13our %args = (
14    client => {
15	connect => { domain => AF_INET6, proto => "tls", addr => "::1",
16	    port => 6514 },
17	loggrep => {
18	    qr/connect sock: ::1 \d+/ => 1,
19	    get_testgrep() => 1,
20	},
21    },
22    syslogd => {
23	options => ["-S", "[::1]:6514"],
24	fstat => {
25	    qr/^root .* internet/ => 0,
26	    qr/ internet6 stream tcp \w+ \[::1\]:6514$/ => 1,
27	},
28	ktrace => {
29	    qr{NAMI  "/etc/ssl/private/\[::1\]:6514.key"} => 1,
30	    qr{NAMI  "/etc/ssl/\[::1\]:6514.crt"} => 0,
31	    qr{NAMI  "/etc/ssl/private/::1.key"} => 1,
32	    qr{NAMI  "/etc/ssl/::1.crt"} => 1,
33	},
34	loggrep => {
35	    qr{Keyfile /etc/ssl/private/::1.key} => 1,
36	    qr{Certfile /etc/ssl/::1.crt} => 1,
37	},
38    },
39    file => {
40	loggrep => {
41	    qr/ localhost /. get_testgrep() => 1,
42	},
43    },
44);
45
461;
47