1# The syslogd listens on localhost TLS socket with client verification.
2# The client connects with a client certificate and writes a message.
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 syslogd accepts client.
8
9use strict;
10use warnings;
11use Socket;
12
13our %args = (
14    client => {
15	connect => { domain => AF_UNSPEC, proto => "tls", addr => "localhost",
16	    port => 6514 },
17	sslcert => "client.crt",
18	sslkey => "client.key",
19	loggrep => {
20	    qr/connect sock: (127.0.0.1|::1) \d+/ => 1,
21	    get_testgrep() => 1,
22	},
23    },
24    syslogd => {
25	options => ["-S", "localhost", "-K", "ca.crt"],
26	ktrace => {
27	    qr{NAMI  "ca.crt"} => 1,
28	},
29	loggrep => {
30	    qr{Server CAfile ca.crt} => 1,
31	    qr{tls logger .* accepted} => 1,
32	},
33    },
34);
35
361;
37