xref: /openbsd-src/regress/usr.sbin/syslogd/args-server-tls.pl (revision e2a49d81efc03038e49f6939fc70d1ab81c05e2c)
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 an explicit loghost.
4# The server receives the message on its TLS socket.
5# Find the message in client, file, pipe, syslogd, server log.
6# Check that syslogd and server log contain localhost address.
7# Check that with TLS server all other sockets are closed.
8
9use strict;
10use warnings;
11use Socket;
12
13our %args = (
14    syslogd => {
15	loghost => '@tls://localhost:$connectport',
16	loggrep => {
17	    qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4',
18	    get_testgrep() => 1,
19	},
20	fstat => {
21	    qr/internet/ => 1,
22	    qr/^_syslogd .* stream tcp / => 1,
23	},
24    },
25    server => {
26	listen => { domain => AF_UNSPEC, proto => "tls", addr => "localhost" },
27	loggrep => {
28	    qr/listen sock: (127.0.0.1|::1) \d+/ => 1,
29	    get_testgrep() => 1,
30	},
31    },
32);
33
341;
35