<commit_before># The client writes a message to Sys::Syslog native method.
# The syslogd writes it into a file and through a pipe.
# The syslogd passes it via TLS to localhost loghost.
# The server offers only the null cipher on its TLS socket.
# Find the message in client, file, pipe, syslogd log.
# Check that server log contains the no shared cipher error.

use strict;
use warnings;
use Socket;

our %args = (
    syslogd => {
	loghost => '@tls://localhost:$connectport',
	loggrep => {
	    qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4',
	    get_testlog() => 1,
	},
	cacrt => "ca.crt",
    },
    server => {
	listen => { domain => AF_UNSPEC, proto => "tls", addr => "localhost" },
	sslciphers => "NULL",
	up => "IO::Socket::SSL socket accept failed",
	down => "Server",
	exit => 255,
	loggrep => {
	    qr/listen sock: (127.0.0.1|::1) \d+/ => 1,
	    qr/no shared cipher/ => 1,
	    get_testlog() => 0,
	},
    },
);

1;<commit_msg>Check SSL error in syslogd log.<commit_after># The client writes a message to Sys::Syslog native method.
# The syslogd writes it into a file and through a pipe.
# The syslogd passes it via TLS to localhost loghost.
# The server offers only the null cipher on its TLS socket.
# Find the message in client, file, pipe, syslogd log.
# Check that server log contains the no shared cipher error.

use strict;
use warnings;
use Socket;

our %args = (
    syslogd => {
	loghost => '@tls://localhost:$connectport',
	loggrep => {
	    qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4',
	    qr/connection error: SSL connect failed: 1/ => 2,
	    get_testlog() => 1,
	},
	cacrt => "ca.crt",
    },
    server => {
	listen => { domain => AF_UNSPEC, proto => "tls", addr => "localhost" },
	sslciphers => "NULL",
	up => "IO::Socket::SSL socket accept failed",
	down => "Server",
	exit => 255,
	loggrep => {
	    qr/listen sock: (127.0.0.1|::1) \d+/ => 1,
	    qr/no shared cipher/ => 1,
	    get_testlog() => 0,
	},
    },
);

1;
{'fraction_non_alphanumeric': 0.1613394216133942, 'fraction_numerical': 0.017250126839167934, 'mean_word_length': 3.1083333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7623384', 'n_tokens_mistral': 740, 'n_tokens_neox': 676, 'n_words': 237}