1# The syslogd listens on 127.0.0.1 TLS socket with self-signed certificate.
2# The client validates cert and writes message into a 127.0.0.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 client file log contains the syslogd certifcate.
8
9use strict;
10use warnings;
11use Socket;
12
13our %args = (
14    client => {
15	connect => { domain => AF_UNSPEC, proto => "tls", addr => "127.0.0.1",
16	    port => 6514 },
17	loggrep => {
18	    qr/connect sock: 127.0.0.1 \d+/ => 1,
19	    qr/ssl subject: /.
20		qr{/L=OpenBSD/O=syslogd-regress/OU=syslogd/CN=127.0.0.1} => 1,
21	    get_testgrep() => 1,
22	},
23	sslca => "127.0.0.1.crt",
24    },
25    syslogd => {
26	options => ["-S", "127.0.0.1"],
27    },
28);
29
301;
31