161ffb8b2Sbluhm# The client writes a message to Sys::Syslog native method.
261ffb8b2Sbluhm# The syslogd writes it into a file and through a pipe.
361ffb8b2Sbluhm# The syslogd passes it via TLS to localhost loghost.
461ffb8b2Sbluhm# The cafile does not exist.
561ffb8b2Sbluhm# Find the message in client, file, pipe, syslogd log.
661ffb8b2Sbluhm# Check that syslogd has verify failure and server has no message.
761ffb8b2Sbluhm
861ffb8b2Sbluhmuse strict;
961ffb8b2Sbluhmuse warnings;
1061ffb8b2Sbluhmuse Socket;
1161ffb8b2Sbluhm
1261ffb8b2Sbluhmour %args = (
1361ffb8b2Sbluhm    syslogd => {
1461ffb8b2Sbluhm	loghost => '@tls://localhost:$connectport',
1561ffb8b2Sbluhm	loggrep => {
16*1c9afadeSbluhm	    qr/syslogd\[\d+\]: load client TLS CA: failed to open CA file/ => 1,
1761ffb8b2Sbluhm	    qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4',
188579df47Sbluhm	    qr/syslogd\[\d+\]: tls_connect_socket .*: /.
198579df47Sbluhm		qr/ssl verify memory setup failure/ => 1,
20bb7ea376Sbluhm	    get_testgrep() => 1,
2161ffb8b2Sbluhm	},
2261ffb8b2Sbluhm	cacrt => "noexist",
2361ffb8b2Sbluhm    },
2461ffb8b2Sbluhm    server => {
2561ffb8b2Sbluhm	listen => { domain => AF_UNSPEC, proto => "tls", addr => "localhost" },
2661ffb8b2Sbluhm	up => "IO::Socket::SSL socket accept failed",
2761ffb8b2Sbluhm	down => "Server",
2861ffb8b2Sbluhm	exit => 255,
2961ffb8b2Sbluhm	loggrep => {
3061ffb8b2Sbluhm	    qr/listen sock: (127.0.0.1|::1) \d+/ => 1,
3161ffb8b2Sbluhm	    qr/SSL accept attempt failed because of handshake problems/ => 1,
32bb7ea376Sbluhm	    get_testgrep() => 0,
3361ffb8b2Sbluhm	},
3461ffb8b2Sbluhm    },
3561ffb8b2Sbluhm);
3661ffb8b2Sbluhm
3761ffb8b2Sbluhm1;
38